Class LocalConnector.LocalEndPoint

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.eclipse.jetty.io.EndPoint
    Enclosing class:
    LocalConnector

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

      Constructors 
      Constructor Description
      LocalEndPoint()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doShutdownOutput()  
      protected void execute​(java.lang.Runnable task)  
      java.lang.String getResponse()
      Wait for a response using a parser to detect the end of message
      java.lang.String getResponse​(boolean head, long time, java.util.concurrent.TimeUnit unit)
      Wait for a response using a parser to detect the end of message
      java.nio.ByteBuffer getResponseData()
      Remaining output ByteBuffer after calls to getResponse() or waitForResponse(boolean, long, TimeUnit)
      void onClose​(java.lang.Throwable cause)  
      java.nio.ByteBuffer waitForResponse​(boolean head, long time, java.util.concurrent.TimeUnit unit)
      Wait for a response using a parser to detect the end of message
      void waitUntilClosed()  
      void waitUntilClosedOrIdleFor​(long idleFor, java.util.concurrent.TimeUnit units)  
      • Methods inherited from class org.eclipse.jetty.io.ByteArrayEndPoint

        addInput, addInput, addInput, addInputAndExecute, addInputEOF, doClose, fill, flush, getLocalAddress, getOutput, getOutputString, getOutputString, getRemoteAddress, getTransport, hasMore, isGrowOutput, needsFillInterest, onIncompleteFlush, reset, setGrowOutput, setOutput, takeOutput, takeOutputString, takeOutputString, toString, waitForOutput
      • Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint

        checkFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.jetty.io.EndPoint

        getIdleTimeout, setIdleTimeout
    • Constructor Detail

      • LocalEndPoint

        public LocalEndPoint()
    • Method Detail

      • execute

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

        public void onClose​(java.lang.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,
                                             java.util.concurrent.TimeUnit units)
      • getResponse

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

        public java.lang.String getResponse​(boolean head,
                                            long time,
                                            java.util.concurrent.TimeUnit unit)
                                     throws java.lang.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:
        java.lang.Exception - if the response cannot be parsed
      • waitForResponse

        public java.nio.ByteBuffer waitForResponse​(boolean head,
                                                   long time,
                                                   java.util.concurrent.TimeUnit unit)
                                            throws java.lang.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:
        java.lang.Exception - if the response cannot be parsed