The internal state is protected using the synchronized keyword. If always used on the same event loop, then we benefit from biased locking which makes the overhead of synchronized near zero.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private MessageConsumer | |
| private ChannelHandlerContext | |
| private boolean | |
| private Handler | |
| private String | |
| private Short | |
| private long | |
| protected final Http1xConnectionBase | |
| protected final ContextInternal | |
| private Handler | |
| private Handler | |
| private WebSocketImplBase | |
| private Handler | |
| private Handler | |
| private MultiMap | |
| private final int | |
| private final int | |
| private Object | |
| private final InboundBuffer | |
| private Handler | |
| private String | |
| private final boolean | |
| private final String | |
| private MessageConsumer | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | WebSocketImplBase(ContextInternal context, Http1xConnectionBase<S extends WebSocketImplBase<S>> conn, boolean supportsContinuation, int maxWebSocketFrameSize, int maxWebSocketMessageSize, boolean registerWebSocketWriteHandlers)
|
| Modifier and Type | Method and Description |
|---|---|
| public String | binaryHandlerID()
Implements io. When a |
| public S | |
| public ChannelHandlerContext | |
| pack-priv void | |
| public Future | close()
Implements io. Close the WebSocket sending the default close frame. |
| public void | close(Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| public Future | close(short
the status code statusCode)Implements io. Close the WebSocket sending a close frame with specified status code. |
| public void | close(short statusCode, Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| public void | |
| public Future | |
| pack-priv void | |
| public S | |
| public String | closeReason()
Implements io. Returns the close reason message from the remote endpoint or |
| public Short | closeStatusCode()
Implements io. Returns the close status code received from the remote endpoint or |
| public HttpConnection | |
| public S | |
| private static WebSocketFrame | |
| public Future | |
| public void | end(Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| public S | |
| private Handler | |
| public S | exceptionHandler(Handler<Throwable> handler)
Implements io.
|
| public S | fetch(long amount)
Implements io. Fetch the specified |
| public S | |
| pack-priv synchronized Object | |
| protected void | |
| protected abstract void | |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public S | |
| private Handler | |
| pack-priv void | |
| public MultiMap | headers()
Implements io. Returns the HTTP headers when the WebSocket is first obtained in the handler. |
| pack-priv void | |
| pack-priv void | initiateConnectionCloseTimeout(long
the timeout in milliseconds timeoutMillis)Initiate a timeout that will close the TCP connection. |
| public boolean | |
| public boolean | |
| public SocketAddress | |
| public S | pause()
Implements io. Pause the |
| public X509Certificate[] | peerCertificateChain()
Implements io.
References Deprecated
X509Certificate is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public List | |
| public WebSocketBase | |
| private Handler | |
| private void | |
| pack-priv void | |
| public SocketAddress | |
| public S | resume()
Implements io. Resume reading, and sets the buffer in |
| pack-priv synchronized void | |
| public S | setWriteQueueMaxSize(int
the max size of the write stream maxSize)Implements io. Set the maximum size of the write queue to |
| public SSLSession | |
| public String | subProtocol()
Implements io. Returns the WebSocket sub protocol selected by the WebSocket handshake. |
| pack-priv void | |
| public String | textHandlerID()
Implements io. When a |
| public WebSocketBase | |
| private boolean | |
| protected final Future | |
| public Future | write(Buffer
the data to write data)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Write some data to the stream. |
| public final void | write(Buffer data, Handler<AsyncResult<Void>> handler)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Same as |
| private void | writeBinaryFrameInternal(Buffer data)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public Future | writeBinaryMessage(Buffer
the data to write data)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Writes a (potentially large) piece of binary data to the connection. |
| public final S | writeBinaryMessage(Buffer data, Handler<AsyncResult<Void>> handler)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Same as |
| public Future | writeFinalBinaryFrame(Buffer
The data to write data)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Write a final WebSocket binary frame to the connection |
| public S | writeFinalBinaryFrame(Buffer data, Handler<AsyncResult<Void>> handler)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Same as |
| public Future | writeFinalTextFrame(String
The text to write text)Implements io. Write a final WebSocket text frame to the connection |
| public S | writeFinalTextFrame(String text, Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| public Future | writeFrame(WebSocketFrame
the frame to write frame)Implements io. Write a WebSocket frame to the connection |
| public final S | writeFrame(WebSocketFrame frame, Handler<AsyncResult<Void>> handler)
Implements io. Same as |
| private Future | writePartialMessage(WebSocketFrameType frameType, Buffer data, int offset)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Splits the provided buffer into multiple frames (which do not exceed the maximum web socket frame size) and writes them in order to the socket. |
| public Future | writePing(Buffer data)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Like |
| public final S | writePing(Buffer
the data to write, may be at most 125 bytes data, Handler<AsyncResult<Void>> called when the ping frame has been successfully written handler)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Writes a ping frame to the connection. |
| public Future | writePong(Buffer data)
Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Like |
| public final S | writePong(Buffer
the data to write, may be at most 125 bytes data, Handler<AsyncResult<Void>> called when the pong frame has been successfully written handler)Implements io.
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Writes a pong frame to the connection. |
| public boolean | writeQueueFull()
Implements io. This will return |
| private void | |
| public Future | writeTextMessage(String
the data to write text)Implements io. Writes a (potentially large) piece of text data to the connection. |
| public final S | writeTextMessage(String text, Handler<AsyncResult<Void>> handler)
Implements io. Same as |