Class WebSocketFrameMonitor
java.lang.Object
net.targetr.rc.monitoring.logs.websocket.WebSocketFrameMonitor
Monitors WebSocket frames and dispatches them to active WebSocket monitoring sessions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidattach(WebSocketFrameMonitoringWebSocketResponse webSocketResponse) Attaches a WebSocket session to receive output from the request monitor.voiddetach(WebSocketFrameMonitoringWebSocketResponse webSocketResponse) Detaches a WebSocket session from receiving output from the request monitor.static WebSocketFrameMonitorget()Retrieves the singleton instance of the WebSocketFrameMonitor.booleanChecks if there are any actively listening WebSocket sessions.voidnotify(WebSocketFrameLogEntry entry) Notifies all attached WebSocket sessions of a new WebSocket frame log entry.
-
Method Details
-
get
Retrieves the singleton instance of the WebSocketFrameMonitor.- Returns:
- the singleton instance
-
attach
Attaches a WebSocket session to receive output from the request monitor.- Parameters:
webSocketResponse- the WebSocket session to attach
-
detach
Detaches a WebSocket session from receiving output from the request monitor.- Parameters:
webSocketResponse- the WebSocket session to detach
-
notify
Notifies all attached WebSocket sessions of a new WebSocket frame log entry.- Parameters:
entry- the request log entry
-
isListening
public boolean isListening()Checks if there are any actively listening WebSocket sessions.- Returns:
- true if there is at least one listener, false otherwise
-