Package org.eclipse.jetty.proxy
Class ConnectHandler.DownstreamConnection
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.proxy.ProxyConnection
org.eclipse.jetty.proxy.ConnectHandler.DownstreamConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
,Connection.UpgradeTo
- Enclosing class:
- ConnectHandler
public class ConnectHandler.DownstreamConnection
extends ProxyConnection
implements Connection.UpgradeTo
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
-
Field Summary
Fields inherited from class org.eclipse.jetty.proxy.ProxyConnection
LOG
-
Constructor Summary
ConstructorDescriptionDownstreamConnection
(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap<String, Object> context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onOpen()
Callback method invoked when this connection is opened.void
onUpgradeTo
(ByteBuffer buffer) Invoked during anupgrade
to receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.protected int
read
(EndPoint endPoint, ByteBuffer buffer) protected void
write
(EndPoint endPoint, ByteBuffer buffer, Callback callback) Methods inherited from class org.eclipse.jetty.proxy.ProxyConnection
close, getByteBufferPool, getConnection, getContext, onFillable, setConnection, toConnectionString
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, close, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, 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.UpgradeTo
Invoked during an
upgrade
to 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:
onUpgradeTo
in 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:Connection
Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpen
in interfaceConnection
- Overrides:
onOpen
in classAbstractConnection
-
read
- Specified by:
read
in classProxyConnection
- Throws:
IOException
-
write
- Specified by:
write
in classProxyConnection
-