Class WebSocketFrameLogEntry

java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
net.targetr.rc.monitoring.logs.websocket.WebSocketFrameLogEntry
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class WebSocketFrameLogEntry extends HashMap<String,Object>
Represents a log entry for a WebSocket frame.
See Also:
  • Constructor Details

    • WebSocketFrameLogEntry

      public WebSocketFrameLogEntry()
      Constructs a new WebSocket frame log entry.
  • Method Details

    • toJson

      public String toJson()
      Serializes this health stat object to a JSON string.
      Returns:
      the JSON representation of this object
    • getSanitised

      public WebSocketFrameLogEntry getSanitised()
      Gets a sanitised version of this log entry.
      Returns:
      a sanitised version of this log entry
    • sanitize

      public static void sanitize(Map<String,Object> input, Map<String,Object> output)
      Sanitizes a map of header values based on the header key.
      Parameters:
      input - The map of header values
      output - The map to populate with sanitized values
    • sanitize

      public static void sanitize(String key, List<String> input, List<String> output)
      Sanitizes a list of header values based on the header key.
      Parameters:
      key - The header key
      input - The list of header values
      output - The list to populate with sanitized values
    • sanitize

      public static String sanitize(String key, String value)
      Sanitizes a header value based on the header key.
      Parameters:
      key - The header key
      value - The header value
      Returns:
      The sanitized header value
    • sanitizeIpValue

      public static String sanitizeIpValue(String ip)
      Replaces the final number of an IP address string with an asterisk.
      Parameters:
      ip - The input IP address (e.g., "10.0.0.1")
      Returns:
      The masked IP string (e.g., "10.0.0.*")