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

      • onClose

        public void onClose​(java.lang.Throwable cause)
        Description copied from interface: EndPoint

        Callback method invoked when this EndPoint is closed.

        Specified by:
        onClose in interface EndPoint
        Overrides:
        onClose in class AbstractEndPoint
        Parameters:
        cause - The reason for the close, or null if a normal close.
        See Also:
        EndPoint.onOpen()
      • 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