Class WebSocketClientConnection
- java.lang.Object
-
- org.eclipse.jetty.io.AbstractConnection
-
- org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection
-
- org.eclipse.jetty.websocket.client.io.WebSocketClientConnection
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Connection,Connection.UpgradeTo,Dumpable,OutgoingFrames,SuspendToken,LogicalConnection
public class WebSocketClientConnection extends AbstractWebSocketConnection
Client side WebSocket physical connection.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection
AbstractWebSocketConnection.Stats
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
-
-
Constructor Summary
Constructors Constructor Description WebSocketClientConnection(EndPoint endp, java.util.concurrent.Executor executor, Scheduler scheduler, WebSocketPolicy websocketPolicy, ByteBufferPool bufferPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetSocketAddressgetLocalAddress()Get the localInetSocketAddressin use for this connection.java.net.InetSocketAddressgetRemoteAddress()Get the remote Address in use for this connection.voidoutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)Override to set the masker.voidsetNextIncomingFrames(IncomingFrames incoming)Set where the connection should send the incoming frames to.-
Methods inherited from class org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection
canReadWebSocketFrames, canWriteWebSocketFrames, close, close, close, disconnect, dump, dumpSelf, fillInterested, getBufferPool, getBytesIn, getBytesOut, getExecutor, getExtensions, getGenerator, getId, getIdleTimeout, getMaxIdleTimeout, getMessagesIn, getMessagesOut, getParser, getPolicy, getScheduler, getStats, isOpen, isReading, onFillable, onFillInterestedFailed, onIdleExpired, onReadTimeout, onUpgradeTo, opened, opening, remoteClose, resume, setExtensions, setInitialBuffer, setInputBufferSize, setMaxIdleTimeout, setSession, suspend, toConnectionString, toStateString
-
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addListener, failedCallback, getCreatedTimeStamp, getEndPoint, getInputBufferSize, isFillInterested, onClose, onOpen, removeListener, toString, tryFillInterested, tryFillInterested
-
-
-
-
Constructor Detail
-
WebSocketClientConnection
public WebSocketClientConnection(EndPoint endp, java.util.concurrent.Executor executor, Scheduler scheduler, WebSocketPolicy websocketPolicy, ByteBufferPool bufferPool)
-
-
Method Detail
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
Description copied from interface:LogicalConnectionGet the localInetSocketAddressin 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.
- Returns:
- the local address.
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
Description copied from interface:LogicalConnectionGet the remote Address 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.
- Specified by:
getRemoteAddressin interfaceLogicalConnection- Overrides:
getRemoteAddressin classAbstractWebSocketConnection- Returns:
- the remote address.
-
outgoingFrame
public void outgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
Override to set the masker.- Specified by:
outgoingFramein interfaceOutgoingFrames- Overrides:
outgoingFramein classAbstractWebSocketConnection- Parameters:
frame- the frame to eventually write to the network layer.callback- the callback to notify when the frame is written.batchMode- the batch mode requested by the sender.
-
setNextIncomingFrames
public void setNextIncomingFrames(IncomingFrames incoming)
Description copied from interface:LogicalConnectionSet where the connection should send the incoming frames to.Often this is from the Parser to the start of the extension stack, and eventually on to the session.
- Parameters:
incoming- the incoming frames handler
-
-