public class SslConnection.DecryptedEndPoint extends AbstractEndPoint
| Modifier and Type | Class and Description |
|---|---|
private class |
SslConnection.DecryptedEndPoint.IncompleteWriteCallback |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Throwable |
_failure |
private Callback |
_incompleteWriteCallback |
| Constructor and Description |
|---|
DecryptedEndPoint() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
allowRenegotiate() |
private java.lang.Throwable |
closeInbound() |
private void |
closeOutbound() |
void |
doClose() |
void |
doShutdownOutput() |
private void |
ensureFillInterested() |
int |
fill(java.nio.ByteBuffer buffer)
Fill the passed buffer with data from this endpoint.
|
boolean |
flush(java.nio.ByteBuffer... appOuts)
Flush data from the passed header/buffer to this endpoint.
|
long |
getIdleTimeout()
Get the max idle time in ms.
|
java.net.InetSocketAddress |
getLocalAddress() |
java.net.InetSocketAddress |
getRemoteAddress() |
SslConnection |
getSslConnection() |
java.lang.Object |
getTransport() |
WriteFlusher |
getWriteFlusher() |
private java.lang.Throwable |
handleException(java.lang.Throwable x,
java.lang.String context) |
private java.lang.Throwable |
handshakeFailed(java.lang.Throwable failure) |
private void |
handshakeSucceeded() |
private boolean |
isInboundDone() |
boolean |
isInputShutdown()
Test if the input is shutdown.
|
boolean |
isOpen()
This abstract method should be called to check if idle timeouts
should still be checked.
|
private boolean |
isOutboundDone() |
boolean |
isOutputShutdown()
Test if output is shutdown.
|
private boolean |
isRenegotiating() |
private boolean |
isTLS13() |
protected void |
needsFillInterest() |
private void |
notifyHandshakeFailed(javax.net.ssl.SSLEngine sslEngine,
java.lang.Throwable failure) |
private void |
notifyHandshakeSucceeded(javax.net.ssl.SSLEngine sslEngine) |
protected void |
onFillable() |
protected void |
onFillableFail(java.lang.Throwable failure) |
protected void |
onIncompleteFlush() |
private void |
rethrow(java.lang.Throwable x) |
void |
setConnection(Connection connection) |
void |
setIdleTimeout(long idleTimeout)
Sets the idle timeout in milliseconds.
|
private void |
terminateInput() |
java.lang.String |
toString() |
checkFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, isFillInterested, isOptimizedForDirectBuffers, onClose, onClose, onIdleExpired, onOpen, reset, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, writecheckIdleTimeout, getIdleFor, getScheduler, notIdleprivate final Callback _incompleteWriteCallback
private java.lang.Throwable _failure
public long getIdleTimeout()
EndPointThe max idle time is the time the endpoint can be idle before extraordinary handling takes place.
getIdleTimeout in interface EndPointgetIdleTimeout in class IdleTimeoutIdleTimeout.setIdleTimeout(long)public void setIdleTimeout(long idleTimeout)
IdleTimeoutSets the idle timeout in milliseconds.
A value that is less than or zero disables the idle timeout checks.
setIdleTimeout in interface EndPointsetIdleTimeout in class IdleTimeoutidleTimeout - the idle timeout in millisecondsIdleTimeout.getIdleTimeout()public boolean isOpen()
IdleTimeoutisOpen in interface EndPointisOpen in class AbstractEndPointpublic java.net.InetSocketAddress getLocalAddress()
EndPoint is bound, or null
if this EndPoint does not represent a network connection.public java.net.InetSocketAddress getRemoteAddress()
EndPoint is bound, or null
if this EndPoint does not represent a network connection.public WriteFlusher getWriteFlusher()
getWriteFlusher in class AbstractEndPointprotected void onFillable()
protected void onFillableFail(java.lang.Throwable failure)
public void setConnection(Connection connection)
setConnection in interface EndPointsetConnection in class AbstractEndPointconnection - the Connection associated with this EndPointEndPoint.getConnection(),
EndPoint.upgrade(Connection)public SslConnection getSslConnection()
public int fill(java.nio.ByteBuffer buffer)
throws java.io.IOException
EndPointbuffer - The buffer to fill. The position and limit are modified during the fill. After the
operation, the position is unchanged and the limit is increased to reflect the new data filled.int value indicating the number of bytes
filled or -1 if EOF is read or the input is shutdown.java.io.IOException - if the endpoint is closed.protected void needsFillInterest()
needsFillInterest in class AbstractEndPointprivate void handshakeSucceeded()
throws javax.net.ssl.SSLException
javax.net.ssl.SSLExceptionprivate java.lang.Throwable handshakeFailed(java.lang.Throwable failure)
private void terminateInput()
private java.lang.Throwable closeInbound()
throws javax.net.ssl.SSLException
javax.net.ssl.SSLExceptionpublic boolean flush(java.nio.ByteBuffer... appOuts)
throws java.io.IOException
EndPointappOuts - the buffers to flushjava.io.IOException - If the endpoint is closed or output is shutdown.protected void onIncompleteFlush()
onIncompleteFlush in class AbstractEndPointpublic void doShutdownOutput()
doShutdownOutput in class AbstractEndPointprivate void closeOutbound()
private void ensureFillInterested()
public boolean isOutputShutdown()
EndPointEndPoint.shutdownOutput()
or EndPoint.close().isOutputShutdown in interface EndPointisOutputShutdown in class AbstractEndPointprivate boolean isOutboundDone()
public void doClose()
doClose in class AbstractEndPointpublic java.lang.Object getTransport()
public boolean isInputShutdown()
EndPointEndPoint.fill(ByteBuffer). Once the input is shutdown, all calls to
EndPoint.fill(ByteBuffer) will return -1, until such time as the
end point is close, when they will return EofException.isInputShutdown in interface EndPointisInputShutdown in class AbstractEndPointprivate boolean isInboundDone()
private void notifyHandshakeSucceeded(javax.net.ssl.SSLEngine sslEngine)
throws javax.net.ssl.SSLException
javax.net.ssl.SSLExceptionprivate void notifyHandshakeFailed(javax.net.ssl.SSLEngine sslEngine,
java.lang.Throwable failure)
private boolean isRenegotiating()
private boolean allowRenegotiate()
private boolean isTLS13()
private java.lang.Throwable handleException(java.lang.Throwable x,
java.lang.String context)
private void rethrow(java.lang.Throwable x)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class AbstractEndPoint