public abstract class NegotiatingServerConnection extends AbstractConnection
| Modifier and Type | Class and Description |
|---|---|
static interface |
NegotiatingServerConnection.CipherDiscriminator |
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo| Modifier and Type | Field and Description |
|---|---|
private Connector |
connector |
private java.lang.String |
defaultProtocol |
private javax.net.ssl.SSLEngine |
engine |
private static Logger |
LOG |
private java.lang.String |
protocol |
private java.util.List<java.lang.String> |
protocols |
| Modifier | Constructor and Description |
|---|---|
protected |
NegotiatingServerConnection(Connector connector,
EndPoint endPoint,
javax.net.ssl.SSLEngine engine,
java.util.List<java.lang.String> protocols,
java.lang.String defaultProtocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Performs a logical close of this connection.
|
private int |
fill() |
Connector |
getConnector() |
java.lang.String |
getDefaultProtocol() |
java.lang.String |
getProtocol() |
java.util.List<java.lang.String> |
getProtocols() |
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.
|
protected void |
setProtocol(java.lang.String protocol) |
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 Connector connector
private final javax.net.ssl.SSLEngine engine
private final java.util.List<java.lang.String> protocols
private final java.lang.String defaultProtocol
private java.lang.String protocol
public java.util.List<java.lang.String> getProtocols()
public java.lang.String getDefaultProtocol()
public Connector getConnector()
public javax.net.ssl.SSLEngine getSSLEngine()
public java.lang.String getProtocol()
protected void setProtocol(java.lang.String protocol)
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()
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