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

public class SslConnection.DecryptedEndPoint extends AbstractEndPoint
  • Field Details

    • _incompleteWriteCallback

      private final Callback _incompleteWriteCallback
    • _failure

      private Throwable _failure
  • Constructor Details

    • DecryptedEndPoint

      public DecryptedEndPoint()
  • Method Details

    • 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 interface EndPoint
      Overrides:
      getIdleTimeout in class IdleTimeout
      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 interface EndPoint
      Overrides:
      setIdleTimeout in class IdleTimeout
      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 interface EndPoint
      Overrides:
      isOpen in class AbstractEndPoint
      Returns:
      True if the entity monitored should still be checked for idle timeouts
    • getLocalAddress

      public InetSocketAddress getLocalAddress()
      Returns:
      The local Inet address to which this EndPoint is bound, or null if this EndPoint does not represent a network connection.
    • getRemoteAddress

      public InetSocketAddress getRemoteAddress()
      Returns:
      The remote Inet address to which this EndPoint is bound, or null if this EndPoint does not represent a network connection.
    • getWriteFlusher

      public WriteFlusher getWriteFlusher()
      Overrides:
      getWriteFlusher in class AbstractEndPoint
    • onFillable

      protected void onFillable()
    • onFillableFail

      protected void onFillableFail(Throwable failure)
    • setConnection

      public void setConnection(Connection connection)
      Specified by:
      setConnection in interface EndPoint
      Overrides:
      setConnection in class AbstractEndPoint
      Parameters:
      connection - the Connection associated with this EndPoint
      See Also:
    • getSslConnection

      public SslConnection getSslConnection()
    • fill

      public int fill(ByteBuffer buffer) throws IOException
      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.
      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 class AbstractEndPoint
    • handshakeSucceeded

      private void handshakeSucceeded() throws SSLException
      Throws:
      SSLException
    • handshakeFailed

      private Throwable handshakeFailed(Throwable failure)
    • terminateInput

      private void terminateInput()
    • closeInbound

      private Throwable closeInbound() throws SSLException
      Throws:
      SSLException
    • flush

      public boolean flush(ByteBuffer... appOuts) throws IOException
      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.
      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 class AbstractEndPoint
    • doShutdownOutput

      public void doShutdownOutput()
      Overrides:
      doShutdownOutput in class AbstractEndPoint
    • closeOutbound

      private void closeOutbound()
    • ensureFillInterested

      private void ensureFillInterested()
    • isOutputShutdown

      public boolean isOutputShutdown()
      Description copied from interface: EndPoint
      Test if output is shutdown. The output is shutdown by a call to EndPoint.shutdownOutput() or EndPoint.close().
      Specified by:
      isOutputShutdown in interface EndPoint
      Overrides:
      isOutputShutdown in class AbstractEndPoint
      Returns:
      true if the output is shutdown or the endpoint is closed.
    • isOutboundDone

      private boolean isOutboundDone()
    • doClose

      public void doClose()
      Overrides:
      doClose in class AbstractEndPoint
    • getTransport

      public Object getTransport()
      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 a 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.
      Specified by:
      isInputShutdown in interface EndPoint
      Overrides:
      isInputShutdown in class AbstractEndPoint
      Returns:
      True if the input is shutdown or the endpoint is closed.
    • isInboundDone

      private boolean isInboundDone()
    • notifyHandshakeSucceeded

      private void notifyHandshakeSucceeded(SSLEngine sslEngine) throws SSLException
      Throws:
      SSLException
    • notifyHandshakeFailed

      private void notifyHandshakeFailed(SSLEngine sslEngine, Throwable failure)
    • isRenegotiating

      private boolean isRenegotiating()
    • allowRenegotiate

      private boolean allowRenegotiate()
    • isTLS13

      private boolean isTLS13()
    • handleException

      private Throwable handleException(Throwable x, String context)
    • rethrow

      private void rethrow(Throwable x) throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class AbstractEndPoint