Package org.eclipse.jetty.io
Class NegotiatingClientConnection
- java.lang.Object
-
- org.eclipse.jetty.io.AbstractConnection
-
- org.eclipse.jetty.io.NegotiatingClientConnection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Connection
public abstract class NegotiatingClientConnection extends AbstractConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
-
-
Field Summary
Fields Modifier and Type Field 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
-
Constructor Summary
Constructors 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addListener, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterested
-
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
engine
private final javax.net.ssl.SSLEngine engine
-
connectionFactory
private final ClientConnectionFactory connectionFactory
-
context
private final java.util.Map<java.lang.String,java.lang.Object> context
-
completed
private volatile boolean completed
-
-
Constructor Detail
-
NegotiatingClientConnection
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)
-
-
Method Detail
-
getSSLEngine
public javax.net.ssl.SSLEngine getSSLEngine()
-
completed
protected void completed()
-
onOpen
public void onOpen()
Description copied from interface:Connection
Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpen
in interfaceConnection
- Overrides:
onOpen
in classAbstractConnection
-
onFillable
public void onFillable()
Description copied from class:AbstractConnection
Callback method invoked when the endpoint is ready to be read.
- Specified by:
onFillable
in classAbstractConnection
- See Also:
AbstractConnection.fillInterested()
-
fill
private int fill()
-
replaceConnection
private void replaceConnection()
-
close
public void close()
Description copied from interface: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 associatedEndPoint
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceConnection
- Overrides:
close
in classAbstractConnection
-
-