Class LocalConnector.LocalEndPoint

java.lang.Object
org.eclipse.jetty.io.IdleTimeout
org.eclipse.jetty.io.AbstractEndPoint
org.eclipse.jetty.io.ByteArrayEndPoint
org.eclipse.jetty.server.LocalConnector.LocalEndPoint
All Implemented Interfaces:
Closeable, AutoCloseable, org.eclipse.jetty.io.EndPoint
Enclosing class:
LocalConnector

public class LocalConnector.LocalEndPoint extends org.eclipse.jetty.io.ByteArrayEndPoint
Local EndPoint
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.io.EndPoint

    org.eclipse.jetty.io.EndPoint.Pipe, org.eclipse.jetty.io.EndPoint.SslSessionData, org.eclipse.jetty.io.EndPoint.Wrapper
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
     
    Wait for a response using a parser to detect the end of message
    getResponse(boolean head, long time, TimeUnit unit)
    Wait for a response using a parser to detect the end of message
    Remaining output ByteBuffer after calls to getResponse() or waitForResponse(boolean, long, TimeUnit)
    void
     
    waitForResponse(boolean head, long time, TimeUnit unit)
    Wait for a response using a parser to detect the end of message
    waitForResponse(boolean head, long time, TimeUnit unit, Consumer<Integer> statusConsumer)
    Wait for a response using a parser to detect the end of message
    void
     
    void
    waitUntilClosedOrIdleFor(long idleFor, TimeUnit units)
     

    Methods inherited from class org.eclipse.jetty.io.ByteArrayEndPoint

    addInput, addInput, addInput, addInputAndExecute, addInputAndExecute, addInputEOF, doClose, fill, flush, getLocalSocketAddress, getOutput, getOutputString, getOutputString, getRemoteSocketAddress, getTransport, hasMore, isGrowOutput, needsFillInterest, onIncompleteFlush, reset, setGrowOutput, setOutput, takeOutput, takeOutputString, takeOutputString, toString, waitForOutput

    Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint

    close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, isInputShutdown, isOpen, isOutputShutdown, onClose, onIdleExpired, onOpen, setConnection, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, tryFillInterested, upgrade, write

    Methods inherited from class org.eclipse.jetty.io.IdleTimeout

    checkIdleTimeout, getIdleFor, getIdleTimeout, getScheduler, notIdle, setIdleTimeout

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.io.EndPoint

    getIdleTimeout, getSslSessionData, isSecure, receive, send, setIdleTimeout, write
  • Constructor Details

    • LocalEndPoint

      public LocalEndPoint()
  • Method Details

    • execute

      protected void execute(Runnable task)
      Overrides:
      execute in class org.eclipse.jetty.io.ByteArrayEndPoint
    • onClose

      public void onClose(Throwable cause)
      Specified by:
      onClose in interface org.eclipse.jetty.io.EndPoint
      Overrides:
      onClose in class org.eclipse.jetty.io.AbstractEndPoint
    • doShutdownOutput

      public void doShutdownOutput()
      Overrides:
      doShutdownOutput in class org.eclipse.jetty.io.ByteArrayEndPoint
    • waitUntilClosed

      public void waitUntilClosed()
    • waitUntilClosedOrIdleFor

      public void waitUntilClosedOrIdleFor(long idleFor, TimeUnit units)
    • getResponseData

      public ByteBuffer getResponseData()
      Remaining output ByteBuffer after calls to getResponse() or waitForResponse(boolean, long, TimeUnit)
      Returns:
      the remaining response data buffer
    • getResponse

      public String getResponse() throws Exception
      Wait for a response using a parser to detect the end of message
      Returns:
      Buffer containing full response or null for EOF;
      Throws:
      Exception - if the response cannot be parsed
    • getResponse

      public String getResponse(boolean head, long time, TimeUnit unit) throws Exception
      Wait for a response using a parser to detect the end of message
      Parameters:
      head - whether the request is a HEAD request
      time - the maximum time to wait
      unit - the time unit of the timeout argument
      Returns:
      Buffer containing full response or null for EOF;
      Throws:
      Exception - if the response cannot be parsed
    • waitForResponse

      public ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit) throws Exception
      Wait for a response using a parser to detect the end of message
      Parameters:
      head - whether the request is a HEAD request
      time - the maximum time to wait
      unit - the time unit of the timeout argument
      Returns:
      Buffer containing full response or null for EOF;
      Throws:
      Exception - if the response cannot be parsed
    • waitForResponse

      public ByteBuffer waitForResponse(boolean head, long time, TimeUnit unit, Consumer<Integer> statusConsumer) throws Exception
      Wait for a response using a parser to detect the end of message
      Parameters:
      head - whether the request is a HEAD request
      time - the maximum time to wait
      unit - the time unit of the timeout argument
      statusConsumer - a consumer to be called with the response's status code
      Returns:
      Buffer containing full response or null for EOF;
      Throws:
      Exception - if the response cannot be parsed