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 WebSocket frame log entry to JSON.
      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
    • santizeRoomAndClient

      public static String santizeRoomAndClient(String uri)
      Masks r and c query parameter values while preserving the rest of the URI.
      Parameters:
      uri - The input URI
      Returns:
      The URI with r values replaced by "XXXX-XXXX" and c values by "XXXXXXXX"