Class LocalConnector.LocalEndPoint

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

    public class LocalConnector.LocalEndPoint
    extends ByteArrayEndPoint
    Local EndPoint
    • Constructor Detail

      • LocalEndPoint

        public LocalEndPoint()
    • Method Detail

      • 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