public class UpgradeConnection extends AbstractConnection implements Connection.UpgradeFrom
Eventually, upon successful Upgrade request/response, this connection swaps itself out for the WebSocektClientConnection handler.
Modifier and Type | Class and Description |
---|---|
class |
UpgradeConnection.SendUpgradeRequest |
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
Constructor and Description |
---|
UpgradeConnection(EndPoint endp,
Executor executor,
ConnectPromise connectPromise) |
Modifier and Type | Method and Description |
---|---|
void |
disconnect(boolean onlyOutput) |
void |
onClose()
Callback method invoked when this connection is closed.
|
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
void |
onOpen()
Callback method invoked when this connection is opened.
|
protected boolean |
onReadTimeout()
Callback method invoked when the endpoint failed to be ready to be read after a timeout
|
ByteBuffer |
onUpgradeFrom()
Takes the input buffer from the connection on upgrade.
|
addListener, close, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isDispatchIO, isFillInterested, onFillInterestedFailed, onIdleExpired, removeListener, setInputBufferSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, close, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getMessagesIn, getMessagesOut, onIdleExpired, removeListener
public UpgradeConnection(EndPoint endp, Executor executor, ConnectPromise connectPromise)
public void disconnect(boolean onlyOutput)
public ByteBuffer onUpgradeFrom()
Connection.UpgradeFrom
Takes the input buffer from the connection on upgrade.
This method is used to take any unconsumed input from a connection during an upgrade.
onUpgradeFrom
in interface Connection.UpgradeFrom
public void onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
public 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
public void onClose()
Connection
Callback method invoked when this connection is closed.
Creators of the connection implementation are responsible for calling this method.
onClose
in interface Connection
onClose
in class AbstractConnection
protected boolean onReadTimeout()
AbstractConnection
Callback method invoked when the endpoint failed to be ready to be read after a timeout
onReadTimeout
in class AbstractConnection
Copyright © 1995-2016 Webtide. All Rights Reserved.