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
,EndPoint.Wrapper
- Enclosing class:
- SslConnection
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.EndPoint
EndPoint.Wrapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doClose()
void
int
fill
(ByteBuffer buffer) Fill the passed buffer with data from this endpoint.boolean
flush
(ByteBuffer... appOuts) Flush data from the passed header/buffer to this endpoint.long
Get the max idle time in ms.boolean
Test if the input is shutdown.boolean
isOpen()
This abstract method should be called to check if idle timeouts should still be checked.boolean
Test if output is shutdown.protected void
protected void
protected void
onFillableFail
(Throwable failure) protected void
void
setConnection
(Connection connection) void
setIdleTimeout
(long idleTimeout) Sets the idle timeout in milliseconds.toString()
unwrap()
Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, isFillInterested, onClose, onClose, onIdleExpired, onOpen, reset, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, write
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
checkIdleTimeout, getIdleFor, getScheduler, notIdle
-
Constructor Details
-
DecryptedEndPoint
public DecryptedEndPoint()
-
-
Method Details
-
unwrap
- Specified by:
unwrap
in interfaceEndPoint.Wrapper
- Returns:
- The wrapped
EndPoint
-
getIdleTimeout
public long getIdleTimeout()Description copied from interface:EndPoint
Get 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:
getIdleTimeout
in interfaceEndPoint
- Overrides:
getIdleTimeout
in classIdleTimeout
- Returns:
- the idle timeout in milliseconds
- See Also:
-
setIdleTimeout
public void setIdleTimeout(long idleTimeout) Description copied from class:IdleTimeout
Sets the idle timeout in milliseconds.
A value that is less than or zero disables the idle timeout checks.
- Specified by:
setIdleTimeout
in interfaceEndPoint
- Overrides:
setIdleTimeout
in classIdleTimeout
- Parameters:
idleTimeout
- the idle timeout in milliseconds- See Also:
-
isOpen
public boolean isOpen()Description copied from class:IdleTimeout
This abstract method should be called to check if idle timeouts should still be checked.- Specified by:
isOpen
in interfaceEndPoint
- Overrides:
isOpen
in classAbstractEndPoint
- Returns:
- True if the entity monitored should still be checked for idle timeouts
-
getLocalSocketAddress
- Specified by:
getLocalSocketAddress
in interfaceEndPoint
- Overrides:
getLocalSocketAddress
in classAbstractEndPoint
- Returns:
- the local SocketAddress to which this
EndPoint
is bound ornull
if thisEndPoint
is not bound to a Socket address.
-
getRemoteSocketAddress
- Specified by:
getRemoteSocketAddress
in interfaceEndPoint
- Overrides:
getRemoteSocketAddress
in classAbstractEndPoint
- Returns:
- The remote SocketAddress to which this
EndPoint
is connected, ornull
if thisEndPoint
is not connected to a Socket address.
-
getWriteFlusher
- Overrides:
getWriteFlusher
in classAbstractEndPoint
-
onFillable
protected void onFillable() -
onFillableFail
-
setConnection
- Specified by:
setConnection
in interfaceEndPoint
- Overrides:
setConnection
in classAbstractEndPoint
- Parameters:
connection
- theConnection
associated with this EndPoint- See Also:
-
getSslConnection
-
fill
Description copied from interface:EndPoint
Fill 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.- Specified by:
fill
in interfaceEndPoint
- 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
int
value 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:
needsFillInterest
in classAbstractEndPoint
-
flush
Description copied from interface:EndPoint
Flush 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.- Specified by:
flush
in interfaceEndPoint
- 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:
onIncompleteFlush
in classAbstractEndPoint
-
doShutdownOutput
public void doShutdownOutput()- Overrides:
doShutdownOutput
in classAbstractEndPoint
-
isOutputShutdown
public boolean isOutputShutdown()Description copied from interface:EndPoint
Test if output is shutdown. The output is shutdown by a call toEndPoint.shutdownOutput()
orEndPoint.close()
.- Specified by:
isOutputShutdown
in interfaceEndPoint
- Overrides:
isOutputShutdown
in classAbstractEndPoint
- Returns:
- true if the output is shutdown or the endpoint is closed.
-
doClose
public void doClose()- Overrides:
doClose
in classAbstractEndPoint
-
getTransport
- Specified by:
getTransport
in interfaceEndPoint
- Returns:
- The underlying transport object (socket, channel, etc.)
-
isInputShutdown
public boolean isInputShutdown()Description copied from interface:EndPoint
Test 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:
isInputShutdown
in interfaceEndPoint
- Overrides:
isInputShutdown
in classAbstractEndPoint
- Returns:
- True if the input is shutdown or the endpoint is closed.
-
toString
- Overrides:
toString
in classAbstractEndPoint
-