public class WebSocketClientConnection extends AbstractWebSocketConnection
Connection.Listener
Constructor and Description |
---|
WebSocketClientConnection(EndPoint endp,
Executor executor,
DefaultWebSocketClient client) |
Modifier and Type | Method and Description |
---|---|
DefaultWebSocketClient |
getClient() |
InetSocketAddress |
getLocalAddress()
Get the local
InetSocketAddress in use for this connection. |
InetSocketAddress |
getRemoteAddress()
Get the remote Address in use for this connection.
|
void |
onClose()
Callback method invoked when this
Connection is closed. |
void |
onOpen()
Callback method invoked when this
Connection is opened. |
Future<javax.net.websocket.SendResult> |
outgoingFrame(Frame frame) |
void |
setNextIncomingFrames(IncomingFrames incoming)
Set where the connection should send the incoming frames to.
|
assertInputOpen, assertOutputOpen, close, close, complete, disconnect, disconnect, flush, getBufferPool, getExtensions, getGenerator, getParser, getPolicy, getQueue, getScheduler, getSession, getState, isInputClosed, isOpen, isOutputClosed, isReading, onCloseHandshake, onFillable, onReadTimeout, resume, setExtensions, setSession, suspend, toString
addListener, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, onFillInterestedFailed, setInputBufferSize
public WebSocketClientConnection(EndPoint endp, Executor executor, DefaultWebSocketClient client)
public DefaultWebSocketClient getClient()
public InetSocketAddress getLocalAddress()
LogicalConnection
InetSocketAddress
in use for this connection.
Note: Non-physical connections, like during the Mux extensions, or during unit testing can result in a InetSocketAddress on port 0 and/or on localhost.
public InetSocketAddress getRemoteAddress()
LogicalConnection
Note: Non-physical connections, like during the Mux extensions, or during unit testing can result in a InetSocketAddress on port 0 and/or on localhost.
getRemoteAddress
in interface LogicalConnection
getRemoteAddress
in class AbstractWebSocketConnection
public void onClose()
Connection
Callback method invoked when this Connection
is closed.
Creators of the connection implementation are responsible for calling this method.
onClose
in interface Connection
onClose
in class AbstractWebSocketConnection
public void onOpen()
Connection
Callback method invoked when this Connection
is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen
in interface Connection
onOpen
in class AbstractWebSocketConnection
public Future<javax.net.websocket.SendResult> outgoingFrame(Frame frame) throws IOException
outgoingFrame
in interface OutgoingFrames
outgoingFrame
in class AbstractWebSocketConnection
IOException
public void setNextIncomingFrames(IncomingFrames incoming)
LogicalConnection
Often this is from the Parser to the start of the extension stack, and eventually on to the session.
incoming
- the incoming frames handlerCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.