Class ConnectHandler.DownstreamConnection
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.server.handler.ConnectHandler.DownstreamConnection
- All Implemented Interfaces:
Closeable, AutoCloseable, Connection, Connection.UpgradeTo, Invocable
- Enclosing class:
ConnectHandler
public class ConnectHandler.DownstreamConnection
extends AbstractConnection
implements Connection.UpgradeTo
-
Nested Class Summary
Nested classes/interfaces inherited from interface Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeToNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task -
Field Summary
Fields inherited from interface Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionDownstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap<String, Object> context) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidCallback method invoked when the endpoint is ready to be read.voidonOpen()Callback method invoked when this connection is opened.voidonUpgradeTo(ByteBuffer buffer) Invoked during anupgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.protected intread(EndPoint endPoint, ByteBuffer buffer) voidsetConnection(org.eclipse.jetty.server.handler.ConnectHandler.TunnelConnection connection) protected voidwrite(EndPoint endPoint, ByteBuffer buffer, Callback callback) Methods inherited from class AbstractConnection
addEventListener, close, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getInvocationType, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onReadTimeout, removeEventListener, setInputBufferSize, toString, tryFillInterested
-
Constructor Details
-
DownstreamConnection
public DownstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap<String, Object> context)
-
-
Method Details
-
onUpgradeTo
Description copied from interface:Connection.UpgradeToInvoked during an
upgradeto receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.- Specified by:
onUpgradeToin interfaceConnection.UpgradeTo- Parameters:
buffer- a non-null buffer of unconsumed bytes received from the upgrade-from connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes.
-
onOpen
public void onOpen()Description copied from interface:ConnectionCallback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpenin interfaceConnection- Overrides:
onOpenin classAbstractConnection
-
read
- Throws:
IOException
-
write
-
getByteBufferPool
-
getContext
-
getConnection
-
setConnection
public void setConnection(org.eclipse.jetty.server.handler.ConnectHandler.TunnelConnection connection) -
onFillable
public void onFillable()Description copied from class:AbstractConnectionCallback method invoked when the endpoint is ready to be read.
- Specified by:
onFillablein classAbstractConnection- See Also:
-
close
-
toConnectionString
- Overrides:
toConnectionStringin classAbstractConnection
-