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, write
checkIdleTimeout, getIdleFor, getScheduler, notIdle
private final Callback _incompleteWriteCallback
private java.lang.Throwable _failure
public long getIdleTimeout()
EndPoint
The max idle time is the time the endpoint can be idle before extraordinary handling takes place.
getIdleTimeout
in interface EndPoint
getIdleTimeout
in class IdleTimeout
IdleTimeout.setIdleTimeout(long)
public void setIdleTimeout(long idleTimeout)
IdleTimeout
Sets the idle timeout in milliseconds.
A value that is less than or zero disables the idle timeout checks.
setIdleTimeout
in interface EndPoint
setIdleTimeout
in class IdleTimeout
idleTimeout
- the idle timeout in millisecondsIdleTimeout.getIdleTimeout()
public boolean isOpen()
IdleTimeout
isOpen
in interface EndPoint
isOpen
in class AbstractEndPoint
public 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 AbstractEndPoint
protected void onFillable()
protected void onFillableFail(java.lang.Throwable failure)
public void setConnection(Connection connection)
setConnection
in interface EndPoint
setConnection
in class AbstractEndPoint
connection
- the Connection
associated with this EndPoint
EndPoint.getConnection()
,
EndPoint.upgrade(Connection)
public SslConnection getSslConnection()
public int fill(java.nio.ByteBuffer buffer) throws java.io.IOException
EndPoint
buffer
- 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 AbstractEndPoint
private void handshakeSucceeded() throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
private java.lang.Throwable handshakeFailed(java.lang.Throwable failure)
private void terminateInput()
private java.lang.Throwable closeInbound() throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
public boolean flush(java.nio.ByteBuffer... appOuts) throws java.io.IOException
EndPoint
appOuts
- the buffers to flushjava.io.IOException
- If the endpoint is closed or output is shutdown.protected void onIncompleteFlush()
onIncompleteFlush
in class AbstractEndPoint
public void doShutdownOutput()
doShutdownOutput
in class AbstractEndPoint
private void closeOutbound()
private void ensureFillInterested()
public boolean isOutputShutdown()
EndPoint
EndPoint.shutdownOutput()
or EndPoint.close()
.isOutputShutdown
in interface EndPoint
isOutputShutdown
in class AbstractEndPoint
private boolean isOutboundDone()
public void doClose()
doClose
in class AbstractEndPoint
public java.lang.Object getTransport()
public boolean isInputShutdown()
EndPoint
EndPoint.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 EndPoint
isInputShutdown
in class AbstractEndPoint
private boolean isInboundDone()
private void notifyHandshakeSucceeded(javax.net.ssl.SSLEngine sslEngine) throws javax.net.ssl.SSLException
javax.net.ssl.SSLException
private 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.IOException
public java.lang.String toString()
toString
in class AbstractEndPoint