public class WebSocketImpl extends WebSocketBase
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
extensions
The extensions.
|
protected String[] |
serverExtentions
The server extentions.
|
bufferSize, closeLatch, connectionReadTimeout, connectionTimeout, downstreamBuffer, endpointAddress, executorService, handler, handshakeLatch, location, origin, path, pipeline, protocols, proxy, quit, requestHeader, responseHeader, responseStatus, selector, serverProtocols, socket, sslHandshake, state, upstreamBuffer, upstreamQueue, useSsl| Constructor and Description |
|---|
WebSocketImpl(String url,
Proxy proxy,
WebSocketHandler handler,
String... protocols)
Instantiates a new web socket RFC6455.
|
WebSocketImpl(String url,
String origin,
Proxy proxy,
WebSocketHandler handler,
String... protocols)
Instantiates a new web socket RFC6455.
|
WebSocketImpl(String url,
String origin,
WebSocketHandler handler,
String... protocols)
Instantiates a new web socket RFC6455.
|
WebSocketImpl(String url,
WebSocketHandler handler,
String... protocols)
Instantiates a new web socket RFC6455.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(String extension)
Adds the extension.
|
protected void |
closeWebSocket()
Close web socket.
|
Frame |
createFrame(byte[] bytes)
Creates the frame.
|
Frame |
createFrame(String str)
Creates the frame.
|
protected int |
getWebSocketVersion()
Gets the web socket version.
|
protected void |
initializePipeline(WebSocketPipeline pipeline)
Initialize pipeline.
|
protected FrameParser |
newFrameParserInstance()
New frame parser instance.
|
protected Handshake |
newHandshakeInstance()
New handshake instance.
|
void |
removeExtension(String extension)
Removes the extension.
|
addHeader, awaitClose, awaitTermination, close, connect, createFrame, createFrame, createSocket, getBufferSize, getConnectionReadTimeout, getConnectionTimeout, getEndpoint, getFrameParser, getHandshake, getLocation, getOrigin, getPacketDumpMode, getPath, getProtocols, getRequestHeader, getResponseHeader, getResponseStatus, getServerProtocols, init, initializePipeline, initializeProperties, isBlockingMode, isConnected, join, join, join, processBuffer, read, send, send, send, send, send, setBlockingMode, setConnectionReadTimeout, setConnectionTimeout, setOrigin, setPacketDumpMode, setServerProtocols, state, transitionToprotected String[] serverExtentions
public WebSocketImpl(String url, String origin, WebSocketHandler handler, String... protocols) throws WebSocketException
url - the urlorigin - the originhandler - the handlerprotocols - the protocolsWebSocketException - the web socket exceptionpublic WebSocketImpl(String url, WebSocketHandler handler, String... protocols) throws WebSocketException
url - the urlhandler - the handlerprotocols - the protocolsWebSocketException - the web socket exceptionpublic WebSocketImpl(String url, String origin, Proxy proxy, WebSocketHandler handler, String... protocols) throws WebSocketException
url - the urlorigin - the originproxy - the proxyhandler - the handlerprotocols - the protocolsWebSocketException - the web socket exceptionpublic WebSocketImpl(String url, Proxy proxy, WebSocketHandler handler, String... protocols) throws WebSocketException
url - the urlproxy - the proxyhandler - the handlerprotocols - the protocolsWebSocketException - the web socket exceptionprotected void initializePipeline(WebSocketPipeline pipeline) throws WebSocketException
WebSocketBaseinitializePipeline in class WebSocketBasepipeline - the pipelineWebSocketException - the web socket exceptionprotected Handshake newHandshakeInstance()
WebSocketBasenewHandshakeInstance in class WebSocketBaseprotected FrameParser newFrameParserInstance()
WebSocketBasenewFrameParserInstance in class WebSocketBasepublic Frame createFrame(byte[] bytes) throws WebSocketException
WebSocketcreateFrame in interface WebSocketcreateFrame in class WebSocketBasebytes - the byte arrayWebSocketException - the web socket exceptionpublic Frame createFrame(String str) throws WebSocketException
WebSocketcreateFrame in interface WebSocketcreateFrame in class WebSocketBasestr - the strWebSocketException - the web socket exceptionprotected int getWebSocketVersion()
WebSocketBasegetWebSocketVersion in class WebSocketBasepublic void addExtension(String extension)
extension - the extensionpublic void removeExtension(String extension)
extension - the extensionprotected void closeWebSocket()
throws WebSocketException
WebSocketBasecloseWebSocket in class WebSocketBaseWebSocketException - the web socket exceptionCopyright © 2021. All rights reserved.