public interface WSTransport extends Transport
Modifier and Type | Interface and Description |
---|---|
static interface |
WSTransport.WSTransportSink
WS Transport output sink, used to give the WS Transport implementation
a way to produce output back to the WS connection without coupling it
to the implementation.
|
Modifier and Type | Method and Description |
---|---|
String |
getSubProtocol() |
void |
onWebSocketBinary(ByteBuffer data)
Called from the WebSocket framework when new incoming Binary data is received.
|
void |
onWebSocketClosed()
Called from the WebSocket framework when the socket has been closed unexpectedly.
|
void |
onWebSocketText(String data)
Called from the WebSocket framework when new incoming String data is received.
|
void |
setTransportSink(WSTransport.WSTransportSink outputSink)
Called to provide the WS with the output data sink.
|
asyncRequest, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, oneway, reconnect, request, request, setPeerCertificates, setTransportListener, updateURIs
String getSubProtocol()
void setTransportSink(WSTransport.WSTransportSink outputSink)
void onWebSocketText(String data) throws IOException
data
- The newly received incoming data.IOException
- if an error occurs or the socket doesn't support text data.void onWebSocketBinary(ByteBuffer data) throws IOException
data
- The newly received incoming data.IOException
- if an error occurs or the socket doesn't support binary data.void onWebSocketClosed() throws IOException
IOException
- if an error while processing the close.Copyright © 2005–2018 The Apache Software Foundation. All rights reserved.