public abstract class NegotiatingClientConnection extends AbstractConnection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo| Modifier and Type | Field and Description |
|---|---|
private boolean |
completed |
private ClientConnectionFactory |
connectionFactory |
private java.util.Map<java.lang.String,java.lang.Object> |
context |
private javax.net.ssl.SSLEngine |
engine |
private static Logger |
LOG |
| Modifier | Constructor and Description |
|---|---|
protected |
NegotiatingClientConnection(EndPoint endp,
java.util.concurrent.Executor executor,
javax.net.ssl.SSLEngine sslEngine,
ClientConnectionFactory connectionFactory,
java.util.Map<java.lang.String,java.lang.Object> context) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Performs a logical close of this connection.
|
protected void |
completed() |
private int |
fill() |
javax.net.ssl.SSLEngine |
getSSLEngine() |
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
void |
onOpen()
Callback method invoked when this connection is opened.
|
private void |
replaceConnection() |
addListener, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterestedprivate static final Logger LOG
private final javax.net.ssl.SSLEngine engine
private final ClientConnectionFactory connectionFactory
private final java.util.Map<java.lang.String,java.lang.Object> context
private volatile boolean completed
protected NegotiatingClientConnection(EndPoint endp, java.util.concurrent.Executor executor, javax.net.ssl.SSLEngine sslEngine, ClientConnectionFactory connectionFactory, java.util.Map<java.lang.String,java.lang.Object> context)
public javax.net.ssl.SSLEngine getSSLEngine()
protected void completed()
public void onOpen()
ConnectionCallback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen in interface ConnectiononOpen in class AbstractConnectionpublic void onFillable()
AbstractConnectionCallback method invoked when the endpoint is ready to be read.
onFillable in class AbstractConnectionAbstractConnection.fillInterested()private int fill()
private void replaceConnection()
public void close()
ConnectionPerforms a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint but, for example, SSL connections should write the SSL close message
before closing the associated EndPoint.
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface Connectionclose in class AbstractConnection