java.io.Closeable
, java.lang.AutoCloseable
, Connection
public abstract class NegotiatingClientConnection extends AbstractConnection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
Modifier | Constructor | 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 | Description |
---|---|---|
void |
close() |
Performs a logical close of this connection.
|
protected void |
completed() |
|
protected 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.
|
addListener, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterested
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)
protected javax.net.ssl.SSLEngine getSSLEngine()
protected void completed()
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 onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
public void close()
Connection
Performs 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.lang.AutoCloseable
close
in interface java.io.Closeable
close
in interface Connection
close
in class AbstractConnection
Copyright © 1995–2018 Webtide. All rights reserved.