public class ConnectHandler.DownstreamConnection extends ProxyConnection implements Connection.UpgradeTo
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
LOG
Constructor and Description |
---|
DownstreamConnection(EndPoint endPoint,
Executor executor,
ByteBufferPool bufferPool,
ConcurrentMap<String,Object> context) |
DownstreamConnection(EndPoint endPoint,
Executor executor,
ByteBufferPool bufferPool,
ConcurrentMap<String,Object> context,
ByteBuffer buffer)
Deprecated.
use
#DownstreamConnection(EndPoint, Executor, ByteBufferPool, ConcurrentMap) instead |
Modifier and Type | Method and Description |
---|---|
void |
onOpen()
Callback method invoked when this connection is opened.
|
void |
onUpgradeTo(ByteBuffer buffer)
Callback method invoked when this connection is upgraded.
|
protected int |
read(EndPoint endPoint,
ByteBuffer buffer) |
protected void |
write(EndPoint endPoint,
ByteBuffer buffer,
Callback callback) |
getByteBufferPool, getConnection, getContext, onFillable, setConnection, toString
addListener, close, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isDispatchIO, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onReadTimeout, removeListener, setInputBufferSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, close, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getMessagesIn, getMessagesOut, onClose, onIdleExpired, removeListener
public DownstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap<String,Object> context)
@Deprecated public DownstreamConnection(EndPoint endPoint, Executor executor, ByteBufferPool bufferPool, ConcurrentMap<String,Object> context, ByteBuffer buffer)
#DownstreamConnection(EndPoint, Executor, ByteBufferPool, ConcurrentMap)
insteadpublic void onUpgradeTo(ByteBuffer buffer)
Connection.UpgradeTo
Callback method invoked when this connection is upgraded.
This must be called before Connection.onOpen()
.
onUpgradeTo
in interface Connection.UpgradeTo
buffer
- An optional buffer that can contain prefilled data. Typically this
results from an upgrade of one protocol to the other where the old connection has buffered
data destined for the new connection. The new connection must take ownership of the buffer
and is responsible for returning it to the buffer poolpublic 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 AbstractConnection
protected int read(EndPoint endPoint, ByteBuffer buffer) throws IOException
read
in class ProxyConnection
IOException
protected void write(EndPoint endPoint, ByteBuffer buffer, Callback callback)
write
in class ProxyConnection
Copyright © 1995-2016 Webtide. All Rights Reserved.