Top Description Fields Constructors Methods
io.vertx.core.http.impl

public Class WebSocketImpl

extends WebSocketImplBase<WebSocketImpl>
implements WebSocket
Class Inheritance
All Implemented Interfaces
io.vertx.core.http.WebSocket, io.vertx.core.http.WebSocketBase, io.vertx.core.streams.WriteStream, io.vertx.core.streams.StreamBase, io.vertx.core.streams.ReadStream
Imports
io.vertx.core.http.WebSocket, io.vertx.core.impl.ContextInternal, io.vertx.core.spi.metrics.HttpClientMetrics

This class is optimised for performance when used on the same event loop. However it can be used safely from other threads. 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.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private final long
private final Http1xClientConnection
Inherited from io.vertx.core.http.impl.WebSocketImplBase:
context

Constructor Summary

AccessConstructor and Description
public
WebSocketImpl(ContextInternal context, Http1xClientConnection conn, boolean supportsContinuation, long closingTimeout, int maxWebSocketFrameSize, int maxWebSocketMessageSize, boolean registerWebSocketWriteHandlers)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
handleCloseConnection()

Implements abstract io.vertx.core.http.impl.WebSocketImplBase.handleCloseConnection.

Called when a close frame is received and the WebSocket.

Inherited from io.vertx.core.http.impl.WebSocketImplBase:
binaryHandlerIDbinaryMessageHandlerchannelHandlerContextcheckClosedcloseclosecloseclosecloseclosecloseConnectioncloseHandlercloseReasoncloseStatusCodeconnectiondrainHandlerendendendHandlerexceptionHandlerfetchframeHandlergetMetrichandleConnectionClosedhandleExceptionhandleFramehandlerhandleWritabilityChangedheadersheadersinitiateConnectionCloseTimeoutisClosedisSsllocalAddresspausepeerCertificateChainpeerCertificatespongHandlerregisterHandlerremoteAddressresumesetMetricsetWriteQueueMaxSizesslSessionsubProtocolsubProtocoltextHandlerIDtextMessageHandlerunsafeWriteFramewritewritewriteBinaryMessagewriteBinaryMessagewriteFinalBinaryFramewriteFinalBinaryFramewriteFinalTextFramewriteFinalTextFramewriteFramewriteFramewritePingwritePingwritePongwritePongwriteQueueFullwriteTextMessagewriteTextMessage

Field Detail

closingTimeoutMSback to summary
private final long closingTimeoutMS
connback to summary
private final Http1xClientConnection conn

Hides io.vertx.core.http.impl.WebSocketImplBase.conn.

Constructor Detail

WebSocketImplback to summary
public WebSocketImpl(ContextInternal context, Http1xClientConnection conn, boolean supportsContinuation, long closingTimeout, int maxWebSocketFrameSize, int maxWebSocketMessageSize, boolean registerWebSocketWriteHandlers)

Method Detail

handleCloseback to summary
protected void handleClose(boolean graceful)

Overrides io.vertx.core.http.impl.WebSocketImplBase.handleClose.

Annotations
@Override
handleCloseConnectionback to summary
protected void handleCloseConnection()

Implements abstract io.vertx.core.http.impl.WebSocketImplBase.handleCloseConnection.

Doc from io.vertx.core.http.impl.WebSocketImplBase.handleCloseConnection.

Called when a close frame is received and the WebSocket.

Annotations
@Override