public class WebSocketUpgradeHandler extends Object implements AsyncHandler<NettyWebSocket>
AsyncHandler which is able to execute WebSocket upgrade. Use the Builder for configuring WebSocket options.| Modifier and Type | Class and Description |
|---|---|
static class |
WebSocketUpgradeHandler.Builder
Build a
WebSocketUpgradeHandler |
AsyncHandler.State| Constructor and Description |
|---|
WebSocketUpgradeHandler(List<WebSocketListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
AsyncHandler.State |
onBodyPartReceived(HttpResponseBodyPart bodyPart)
Invoked as soon as some response body part are received.
|
protected void |
onBodyPartReceived0(HttpResponseBodyPart bodyPart) |
NettyWebSocket |
onCompleted()
Invoked once the HTTP response processing is finished.
|
protected void |
onCompleted0() |
AsyncHandler.State |
onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)
Invoked as soon as the HTTP headers have been received.
|
protected void |
onHeadersReceived0(io.netty.handler.codec.http.HttpHeaders headers) |
void |
onOpen() |
protected void |
onOpen0() |
AsyncHandler.State |
onStatusReceived(HttpResponseStatus responseStatus)
Invoked as soon as the HTTP status line has been received
|
protected void |
onStatusReceived0(HttpResponseStatus responseStatus) |
void |
onThrowable(Throwable t)
Invoked when an unexpected exception occurs during the processing of the response.
|
protected void |
onThrowable0(Throwable t) |
void |
setWebSocket(NettyWebSocket webSocket) |
protected void |
setWebSocket0(NettyWebSocket webSocket) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonConnectionOffer, onConnectionPoolAttempt, onConnectionPooled, onHostnameResolutionAttempt, onHostnameResolutionFailure, onHostnameResolutionSuccess, onRequestSend, onRetry, onTcpConnectAttempt, onTcpConnectFailure, onTcpConnectSuccess, onTlsHandshakeAttempt, onTlsHandshakeFailure, onTlsHandshakeSuccess, onTrailingHeadersReceivedpublic WebSocketUpgradeHandler(List<WebSocketListener> listeners)
protected void setWebSocket0(NettyWebSocket webSocket)
protected void onStatusReceived0(HttpResponseStatus responseStatus) throws Exception
Exceptionprotected void onHeadersReceived0(io.netty.handler.codec.http.HttpHeaders headers)
throws Exception
Exceptionprotected void onBodyPartReceived0(HttpResponseBodyPart bodyPart) throws Exception
Exceptionprotected void onThrowable0(Throwable t)
protected void onOpen0()
public final AsyncHandler.State onStatusReceived(HttpResponseStatus responseStatus) throws Exception
AsyncHandleronStatusReceived in interface AsyncHandler<NettyWebSocket>responseStatus - the status code and test of the responseAsyncHandler.State telling to CONTINUE or ABORT the current processing.Exception - if something wrong happenspublic final AsyncHandler.State onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers) throws Exception
AsyncHandleronHeadersReceived in interface AsyncHandler<NettyWebSocket>headers - the HTTP headers.AsyncHandler.State telling to CONTINUE or ABORT the current processing.Exception - if something wrong happenspublic final AsyncHandler.State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception
AsyncHandleronBodyPartReceived in interface AsyncHandler<NettyWebSocket>bodyPart - response's body part.AsyncHandler.State telling to CONTINUE or ABORT the current processing. Aborting will also close the connection.Exception - if something wrong happenspublic final NettyWebSocket onCompleted() throws Exception
AsyncHandleronCompleted in interface AsyncHandler<NettyWebSocket>FutureException - if something wrong happenspublic final void onThrowable(Throwable t)
AsyncHandleronThrowable in interface AsyncHandler<NettyWebSocket>t - a Throwablepublic final void setWebSocket(NettyWebSocket webSocket)
public final void onOpen()
Copyright © 2024. All rights reserved.