public class WebSocketUpgradeHandler extends java.lang.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(java.util.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(java.lang.Throwable t)
Invoked when an unexpected exception occurs during the processing of the response.
|
protected void |
onThrowable0(java.lang.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(java.util.List<WebSocketListener> listeners)
protected void setWebSocket0(NettyWebSocket webSocket)
protected void onStatusReceived0(HttpResponseStatus responseStatus) throws java.lang.Exception
java.lang.Exceptionprotected void onHeadersReceived0(io.netty.handler.codec.http.HttpHeaders headers)
throws java.lang.Exception
java.lang.Exceptionprotected void onBodyPartReceived0(HttpResponseBodyPart bodyPart) throws java.lang.Exception
java.lang.Exceptionprotected void onCompleted0()
throws java.lang.Exception
java.lang.Exceptionprotected void onThrowable0(java.lang.Throwable t)
protected void onOpen0()
public final AsyncHandler.State onStatusReceived(HttpResponseStatus responseStatus) throws java.lang.Exception
AsyncHandleronStatusReceived in interface AsyncHandler<NettyWebSocket>responseStatus - the status code and test of the responseAsyncHandler.State telling to CONTINUE or ABORT the current processing.java.lang.Exception - if something wrong happenspublic final AsyncHandler.State onHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers) throws java.lang.Exception
AsyncHandleronHeadersReceived in interface AsyncHandler<NettyWebSocket>headers - the HTTP headers.AsyncHandler.State telling to CONTINUE or ABORT the current processing.java.lang.Exception - if something wrong happenspublic final AsyncHandler.State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws java.lang.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.java.lang.Exception - if something wrong happenspublic final NettyWebSocket onCompleted() throws java.lang.Exception
AsyncHandleronCompleted in interface AsyncHandler<NettyWebSocket>Futurejava.lang.Exception - if something wrong happenspublic final void onThrowable(java.lang.Throwable t)
AsyncHandleronThrowable in interface AsyncHandler<NettyWebSocket>t - a Throwablepublic final void setWebSocket(NettyWebSocket webSocket)
public final void onOpen()
Copyright © 2018. All Rights Reserved.