Class HttpRequestMonitor
java.lang.Object
net.targetr.rc.monitoring.logs.http.HttpRequestMonitor
- Direct Known Subclasses:
HttpRequestMonitorAndLog
Monitors HTTP requests and dispatches them to active WebSocket monitoring sessions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(HttpRequestMonitoringWebSocketResponse webSocketResponse) Attaches a WebSocket session to receive output from the request monitor.voiddetach(HttpRequestMonitoringWebSocketResponse webSocketResponse) Detaches a WebSocket session from receiving output from the request monitor.booleanChecks if there are any actively listening WebSocket sessions.voidnotify(HttpRequestLogEntry entry) Notifies all attached WebSocket sessions of a new request log entry.
-
Constructor Details
-
HttpRequestMonitor
public HttpRequestMonitor()Constructs a new HttpRequestMonitor.
-
-
Method Details
-
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 request 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
-