Package org.eclipse.jetty.io.ssl
Class SslConnection.DecryptedEndPoint
java.lang.Object
org.eclipse.jetty.io.IdleTimeout
org.eclipse.jetty.io.AbstractEndPoint
org.eclipse.jetty.io.ssl.SslConnection.DecryptedEndPoint
- All Implemented Interfaces:
Closeable,AutoCloseable,EndPoint
- Enclosing class:
SslConnection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprivate Throwableprivate voidvoiddoClose()voidprivate voidintfill(ByteBuffer buffer) Fill the passed buffer with data from this endpoint.booleanflush(ByteBuffer... appOuts) Flush data from the passed header/buffer to this endpoint.longGet the max idle time in ms.private ThrowablehandleException(Throwable x, String context) private ThrowablehandshakeFailed(Throwable failure) private voidprivate booleanbooleanTest if the input is shutdown.booleanisOpen()This abstract method should be called to check if idle timeouts should still be checked.private booleanbooleanTest if output is shutdown.private booleanprivate booleanisTLS13()protected voidprivate voidnotifyHandshakeFailed(SSLEngine sslEngine, Throwable failure) private voidnotifyHandshakeSucceeded(SSLEngine sslEngine) protected voidprotected voidonFillableFail(Throwable failure) protected voidprivate voidvoidsetConnection(Connection connection) voidsetIdleTimeout(long idleTimeout) Sets the idle timeout in milliseconds.private voidtoString()Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
checkFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, isFillInterested, isOptimizedForDirectBuffers, onClose, onClose, onIdleExpired, onOpen, reset, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, writeMethods inherited from class org.eclipse.jetty.io.IdleTimeout
checkIdleTimeout, getIdleFor, getScheduler, notIdle
-
Field Details
-
_incompleteWriteCallback
-
_failure
-
-
Constructor Details
-
DecryptedEndPoint
public DecryptedEndPoint()
-
-
Method Details
-
getIdleTimeout
public long getIdleTimeout()Description copied from interface:EndPointGet the max idle time in ms.The max idle time is the time the endpoint can be idle before extraordinary handling takes place.
- Specified by:
getIdleTimeoutin interfaceEndPoint- Overrides:
getIdleTimeoutin classIdleTimeout- Returns:
- the idle timeout in milliseconds
- See Also:
-
setIdleTimeout
public void setIdleTimeout(long idleTimeout) Description copied from class:IdleTimeoutSets the idle timeout in milliseconds.
A value that is less than or zero disables the idle timeout checks.
- Specified by:
setIdleTimeoutin interfaceEndPoint- Overrides:
setIdleTimeoutin classIdleTimeout- Parameters:
idleTimeout- the idle timeout in milliseconds- See Also:
-
isOpen
public boolean isOpen()Description copied from class:IdleTimeoutThis abstract method should be called to check if idle timeouts should still be checked.- Specified by:
isOpenin interfaceEndPoint- Overrides:
isOpenin classAbstractEndPoint- Returns:
- True if the entity monitored should still be checked for idle timeouts
-
getLocalAddress
- Returns:
- The local Inet address to which this
EndPointis bound, ornullif thisEndPointdoes not represent a network connection.
-
getRemoteAddress
- Returns:
- The remote Inet address to which this
EndPointis bound, ornullif thisEndPointdoes not represent a network connection.
-
getWriteFlusher
- Overrides:
getWriteFlusherin classAbstractEndPoint
-
onFillable
protected void onFillable() -
onFillableFail
-
setConnection
- Specified by:
setConnectionin interfaceEndPoint- Overrides:
setConnectionin classAbstractEndPoint- Parameters:
connection- theConnectionassociated with this EndPoint- See Also:
-
getSslConnection
-
fill
Description copied from interface:EndPointFill the passed buffer with data from this endpoint. The bytes are appended to any data already in the buffer by writing from the buffers limit up to it's capacity. The limit is updated to include the filled bytes.- Parameters:
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.- Returns:
- an
intvalue indicating the number of bytes filled or -1 if EOF is read or the input is shutdown. - Throws:
IOException- if the endpoint is closed.
-
needsFillInterest
protected void needsFillInterest()- Specified by:
needsFillInterestin classAbstractEndPoint
-
handshakeSucceeded
- Throws:
SSLException
-
handshakeFailed
-
terminateInput
private void terminateInput() -
closeInbound
- Throws:
SSLException
-
flush
Description copied from interface:EndPointFlush data from the passed header/buffer to this endpoint. As many bytes as can be consumed are taken from the header/buffer position up until the buffer limit. The header/buffers position is updated to indicate how many bytes have been consumed.- Parameters:
appOuts- the buffers to flush- Returns:
- True IFF all the buffers have been consumed and the endpoint has flushed the data to its destination (ie is not buffering any data).
- Throws:
IOException- If the endpoint is closed or output is shutdown.
-
onIncompleteFlush
protected void onIncompleteFlush()- Specified by:
onIncompleteFlushin classAbstractEndPoint
-
doShutdownOutput
public void doShutdownOutput()- Overrides:
doShutdownOutputin classAbstractEndPoint
-
closeOutbound
private void closeOutbound() -
ensureFillInterested
private void ensureFillInterested() -
isOutputShutdown
public boolean isOutputShutdown()Description copied from interface:EndPointTest if output is shutdown. The output is shutdown by a call toEndPoint.shutdownOutput()orEndPoint.close().- Specified by:
isOutputShutdownin interfaceEndPoint- Overrides:
isOutputShutdownin classAbstractEndPoint- Returns:
- true if the output is shutdown or the endpoint is closed.
-
isOutboundDone
private boolean isOutboundDone() -
doClose
public void doClose()- Overrides:
doClosein classAbstractEndPoint
-
getTransport
- Returns:
- The underlying transport object (socket, channel, etc.)
-
isInputShutdown
public boolean isInputShutdown()Description copied from interface:EndPointTest if the input is shutdown. The input is shutdown if an EOF has been read while doing aEndPoint.fill(ByteBuffer). Once the input is shutdown, all calls toEndPoint.fill(ByteBuffer)will return -1, until such time as the end point is close, when they will returnEofException.- Specified by:
isInputShutdownin interfaceEndPoint- Overrides:
isInputShutdownin classAbstractEndPoint- Returns:
- True if the input is shutdown or the endpoint is closed.
-
isInboundDone
private boolean isInboundDone() -
notifyHandshakeSucceeded
- Throws:
SSLException
-
notifyHandshakeFailed
-
isRenegotiating
private boolean isRenegotiating() -
allowRenegotiate
private boolean allowRenegotiate() -
isTLS13
private boolean isTLS13() -
handleException
-
rethrow
- Throws:
IOException
-
toString
- Overrides:
toStringin classAbstractEndPoint
-