Class HttpRequestMonitoringWebSocketResponse
java.lang.Object
net.targetr.wtm3.net.http.HttpResponse
net.targetr.wtm3.net.http.websocket.WebSocketResponse
net.targetr.rc.monitoring.logs.http.HttpRequestMonitoringWebSocketResponse
- All Implemented Interfaces:
Runnable
WebSocket response stream for HTTP request monitoring.
-
Field Summary
Fields inherited from class net.targetr.wtm3.net.http.websocket.WebSocketResponse
TIMEOUT, webSocketFields inherited from class net.targetr.wtm3.net.http.HttpResponse
bytesWritten, code, headerLength, headers, info, version, writeErrorHandler -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new HttpRequestMonitoringWebSocketResponse. -
Method Summary
Modifier and TypeMethodDescriptionvoidnotify(HttpRequestLogEntry entry) Notifies the WebSocket response of a new HTTP request log entry.protected voidonClose()Called when WebSocket connection is closed by the client.protected voidonReceiveText(ReusableBufferList buffers) Called when text is received from the WebSocket.protected voidCalled when WebSocket connection is first opened.Methods inherited from class net.targetr.wtm3.net.http.websocket.WebSocketResponse
run, setInterceptor, writeMethods inherited from class net.targetr.wtm3.net.http.HttpResponse
getBodyInputStream, getContentLength, parseResponse, toString
-
Constructor Details
-
HttpRequestMonitoringWebSocketResponse
public HttpRequestMonitoringWebSocketResponse()Constructs a new HttpRequestMonitoringWebSocketResponse.
-
-
Method Details
-
notify
Notifies the WebSocket response of a new HTTP request log entry.- Parameters:
entry- the log entry to add
-
writeResponse
Description copied from class:WebSocketResponseCalled when WebSocket connection is first opened. This method is called once and should not return until all communication with the client is complete. Implementations of this method will typically call writeText() or writeBinary() to send data to the client.- Specified by:
writeResponsein classWebSocketResponse- Throws:
Exception- If an error occurs while responding to the client.
-
onClose
protected void onClose()Description copied from class:WebSocketResponseCalled when WebSocket connection is closed by the client.- Specified by:
onClosein classWebSocketResponse
-
onReceiveText
Description copied from class:WebSocketResponseCalled when text is received from the WebSocket.- Specified by:
onReceiveTextin classWebSocketResponse- Parameters:
buffers- The raw data received from the WebSocket as a buffer list- Throws:
Exception- If an error occurs while processing the received text.
-