org.eclipse.jetty.io.Connection.UpgradeTo, org.eclipse.jetty.util.component.Dumpable, OutgoingFrames, SuspendToken, IOState.ConnectionStateListener, LogicalConnectionpublic abstract class AbstractWebSocketConnection extends org.eclipse.jetty.io.AbstractConnection implements LogicalConnection, org.eclipse.jetty.io.Connection.UpgradeTo, IOState.ConnectionStateListener, org.eclipse.jetty.util.component.Dumpable
LogicalConnection within the framework of the new Connection framework of jetty-io.| Modifier and Type | Class | Description |
|---|---|---|
static class |
AbstractWebSocketConnection.Stats |
| Constructor | Description |
|---|---|
AbstractWebSocketConnection(org.eclipse.jetty.io.EndPoint endp,
java.util.concurrent.Executor executor,
org.eclipse.jetty.util.thread.Scheduler scheduler,
WebSocketPolicy policy,
org.eclipse.jetty.io.ByteBufferPool bufferPool) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Jetty Connection Close
|
void |
disconnect() |
Terminate the connection (no close frame sent)
|
java.lang.String |
dump() |
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
|
boolean |
equals(java.lang.Object obj) |
|
void |
fillInterested() |
|
org.eclipse.jetty.io.ByteBufferPool |
getBufferPool() |
Get the ByteBufferPool in use by the connection
|
java.util.concurrent.Executor |
getExecutor() |
Get the Executor used by this connection.
|
java.util.List<ExtensionConfig> |
getExtensions() |
Get the list of extensions in use.
|
Generator |
getGenerator() |
|
java.lang.String |
getId() |
Get Unique ID for the Connection
|
long |
getIdleTimeout() |
Get the read/write idle timeout.
|
IOState |
getIOState() |
Get the IOState of the connection.
|
long |
getMaxIdleTimeout() |
Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)
|
Parser |
getParser() |
|
WebSocketPolicy |
getPolicy() |
The policy that the connection is running under.
|
java.net.InetSocketAddress |
getRemoteAddress() |
Get the remote Address in use for this connection.
|
org.eclipse.jetty.util.thread.Scheduler |
getScheduler() |
|
AbstractWebSocketConnection.Stats |
getStats() |
|
int |
hashCode() |
|
boolean |
isOpen() |
Test if logical connection is still open
|
boolean |
isReading() |
Tests if the connection is actively reading.
|
void |
onClose() |
Physical connection disconnect.
|
void |
onConnectionStateChange(ConnectionState state) |
|
void |
onFillable() |
|
protected void |
onFillInterestedFailed(java.lang.Throwable cause) |
|
boolean |
onIdleExpired() |
|
void |
onLocalClose(CloseInfo close) |
Called to indicate a close frame was successfully sent to the remote.
|
void |
onOpen() |
|
protected boolean |
onReadTimeout() |
Event for no activity on connection (read or write)
|
void |
onUpgradeTo(java.nio.ByteBuffer prefilled) |
Extra bytes from the initial HTTP upgrade that need to
be processed by the websocket parser before starting
to read bytes from the connection
|
void |
outgoingFrame(Frame frame,
WriteCallback callback,
BatchMode batchMode) |
Frame from API, User, or Internal implementation destined for network.
|
void |
resume() |
|
void |
setExtensions(java.util.List<ExtensionConfig> extensions) |
Get the list of extensions in use.
|
protected void |
setInitialBuffer(java.nio.ByteBuffer prefilled) |
Extra bytes from the initial HTTP upgrade that need to
be processed by the websocket parser before starting
to read bytes from the connection
|
void |
setInputBufferSize(int inputBufferSize) |
|
void |
setMaxIdleTimeout(long ms) |
Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)
|
void |
setSession(WebSocketSession session) |
Associate the Active Session with the connection.
|
SuspendToken |
suspend() |
Suspend a the incoming read events on the connection.
|
java.lang.String |
toConnectionString() |
addListener, failedCallback, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, removeListener, toString, tryFillInterested, tryFillInterestedgetLocalAddress, setNextIncomingFramespublic AbstractWebSocketConnection(org.eclipse.jetty.io.EndPoint endp,
java.util.concurrent.Executor executor,
org.eclipse.jetty.util.thread.Scheduler scheduler,
WebSocketPolicy policy,
org.eclipse.jetty.io.ByteBufferPool bufferPool)
public java.util.concurrent.Executor getExecutor()
LogicalConnectiongetExecutor in interface LogicalConnectiongetExecutor in class org.eclipse.jetty.io.AbstractConnectionpublic void onLocalClose(CloseInfo close)
LogicalConnectiononLocalClose in interface LogicalConnectionclose - the close detailspublic void setSession(WebSocketSession session)
LogicalConnectionsetSession in interface LogicalConnectionsession - the session for this connectionpublic boolean onIdleExpired()
onIdleExpired in class org.eclipse.jetty.io.AbstractConnectionpublic void close()
close in class org.eclipse.jetty.io.AbstractConnectionpublic void disconnect()
LogicalConnectiondisconnect in interface LogicalConnectionpublic void fillInterested()
fillInterested in class org.eclipse.jetty.io.AbstractConnectionpublic org.eclipse.jetty.io.ByteBufferPool getBufferPool()
LogicalConnectiongetBufferPool in interface LogicalConnectionpublic java.util.List<ExtensionConfig> getExtensions()
This list is negotiated during the WebSocket Upgrade Request/Response handshake.
public Generator getGenerator()
public java.lang.String getId()
LogicalConnectiongetId in interface LogicalConnectionpublic long getIdleTimeout()
LogicalConnectiongetIdleTimeout in interface LogicalConnectionpublic IOState getIOState()
LogicalConnectiongetIOState in interface LogicalConnectionpublic long getMaxIdleTimeout()
LogicalConnectiongetMaxIdleTimeout in interface LogicalConnectionpublic Parser getParser()
public WebSocketPolicy getPolicy()
LogicalConnectiongetPolicy in interface LogicalConnectionpublic java.net.InetSocketAddress getRemoteAddress()
LogicalConnectionNote: 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 LogicalConnectionpublic org.eclipse.jetty.util.thread.Scheduler getScheduler()
public AbstractWebSocketConnection.Stats getStats()
public boolean isOpen()
LogicalConnectionisOpen in interface LogicalConnectionpublic boolean isReading()
LogicalConnectionisReading in interface LogicalConnectionpublic void onClose()
Not related to WebSocket close handshake.
onClose in class org.eclipse.jetty.io.AbstractConnectionpublic void onConnectionStateChange(ConnectionState state)
onConnectionStateChange in interface IOState.ConnectionStateListenerpublic void onFillable()
onFillable in class org.eclipse.jetty.io.AbstractConnectionprotected void onFillInterestedFailed(java.lang.Throwable cause)
onFillInterestedFailed in class org.eclipse.jetty.io.AbstractConnectionprotected void setInitialBuffer(java.nio.ByteBuffer prefilled)
prefilled - the bytes of prefilled content encountered during upgradepublic void onOpen()
onOpen in class org.eclipse.jetty.io.AbstractConnectionprotected boolean onReadTimeout()
onReadTimeout in class org.eclipse.jetty.io.AbstractConnectionpublic void outgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
outgoingFrame in interface OutgoingFramespublic void resume()
resume in interface SuspendTokenpublic void setExtensions(java.util.List<ExtensionConfig> extensions)
This list is negotiated during the WebSocket Upgrade Request/Response handshake.
extensions - the list of negotiated extensions in use.public void setInputBufferSize(int inputBufferSize)
setInputBufferSize in class org.eclipse.jetty.io.AbstractConnectionpublic void setMaxIdleTimeout(long ms)
LogicalConnectionThis idle timeout cannot be garunteed to take immediate effect for any active read/write actions. New read/write actions will have this new idle timeout.
setMaxIdleTimeout in interface LogicalConnectionms - the number of milliseconds of idle timeoutpublic SuspendToken suspend()
LogicalConnectionsuspend in interface LogicalConnectionpublic java.lang.String dump()
dump in interface org.eclipse.jetty.util.component.Dumpablepublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
dump in interface org.eclipse.jetty.util.component.Dumpablejava.io.IOExceptionpublic java.lang.String toConnectionString()
toConnectionString in class org.eclipse.jetty.io.AbstractConnectionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void onUpgradeTo(java.nio.ByteBuffer prefilled)
onUpgradeTo in interface org.eclipse.jetty.io.Connection.UpgradeToCopyright © 1995–2018 Webtide. All rights reserved.