Interface LogicalConnection

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean canReadWebSocketFrames()
      Deprecated.
      Test if Connection State allows for reading of frames.
      boolean canWriteWebSocketFrames()
      Deprecated.
      Test if Connection State allows for writing frames.
      void close​(java.lang.Throwable cause)
      Deprecated.
      Close the connection based on the cause.
      void close​(CloseInfo closeInfo, Callback callback)
      Deprecated.
      Request a local close.
      void disconnect()
      Deprecated.
      Terminate the connection (no close frame sent)
      ByteBufferPool getBufferPool()
      Deprecated.
      Get the ByteBufferPool in use by the connection
      java.util.concurrent.Executor getExecutor()
      Deprecated.
      Get the Executor used by this connection.
      java.lang.String getId()
      Deprecated.
      Get Unique ID for the Connection
      long getIdleTimeout()
      Deprecated.
      Get the read/write idle timeout.
      java.net.InetSocketAddress getLocalAddress()
      Deprecated.
      Get the local InetSocketAddress in use for this connection.
      long getMaxIdleTimeout()
      Deprecated.
      Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)
      WebSocketPolicy getPolicy()
      Deprecated.
      The policy that the connection is running under.
      java.net.InetSocketAddress getRemoteAddress()
      Deprecated.
      Get the remote Address in use for this connection.
      boolean isOpen()
      Deprecated.
      Test if logical connection is still open
      boolean isReading()
      Deprecated.
      Tests if the connection is actively reading.
      boolean opened()
      Deprecated.
      Set the state to opened (the application onOpen() method has been called successfully).
      boolean opening()
      Deprecated.
      Set the state to upgrade/opening handshake has completed.
      void remoteClose​(CloseInfo close)
      Deprecated.
      Report that the Remote Endpoint CLOSE Frame has been received
      void setMaxIdleTimeout​(long ms)
      Deprecated.
      Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)
      void setNextIncomingFrames​(IncomingFrames incoming)
      Deprecated.
      Set where the connection should send the incoming frames to.
      void setSession​(WebSocketSession session)
      Deprecated.
      Associate the Active Session with the connection.
      SuspendToken suspend()
      Deprecated.
      Suspend a the incoming read events on the connection.
      java.lang.String toStateString()
      Deprecated.
      Get the Connection State as a String
    • Method Detail

      • canReadWebSocketFrames

        boolean canReadWebSocketFrames()
        Deprecated.
        Test if Connection State allows for reading of frames.
        Returns:
        true if able to read, false otherwise.
      • canWriteWebSocketFrames

        boolean canWriteWebSocketFrames()
        Deprecated.
        Test if Connection State allows for writing frames.
        Returns:
        true if able to write, false otherwise.
      • close

        void close​(java.lang.Throwable cause)
        Deprecated.
        Close the connection based on the cause.
        Parameters:
        cause - the cause
      • close

        void close​(CloseInfo closeInfo,
                   Callback callback)
        Deprecated.
        Request a local close.
      • disconnect

        void disconnect()
        Deprecated.
        Terminate the connection (no close frame sent)
      • getBufferPool

        ByteBufferPool getBufferPool()
        Deprecated.
        Get the ByteBufferPool in use by the connection
        Returns:
        the buffer pool
      • getExecutor

        java.util.concurrent.Executor getExecutor()
        Deprecated.
        Get the Executor used by this connection.
        Returns:
        the executor
      • getId

        java.lang.String getId()
        Deprecated.
        Get Unique ID for the Connection
        Returns:
        the unique ID for the connection
      • getIdleTimeout

        long getIdleTimeout()
        Deprecated.
        Get the read/write idle timeout.
        Returns:
        the idle timeout in milliseconds
      • getLocalAddress

        java.net.InetSocketAddress getLocalAddress()
        Deprecated.
        Get the local InetSocketAddress in use for this connection.

        Note: Non-physical connections, like during the Mux extensions, or during unit testing can result in a InetSocketAddress on port 0 and/or on localhost.

        Returns:
        the local address.
      • getMaxIdleTimeout

        long getMaxIdleTimeout()
        Deprecated.
        Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)
        Returns:
        the idle timeout in milliseconds
      • setMaxIdleTimeout

        void setMaxIdleTimeout​(long ms)
        Deprecated.
        Set the maximum number of milliseconds of idleness before the connection is closed/disconnected, (ie no frames are either sent or received)

        This idle timeout cannot be garunteed to take immediate effect for any active read/write actions. New read/write actions will have this new idle timeout.

        Parameters:
        ms - the number of milliseconds of idle timeout
      • getPolicy

        WebSocketPolicy getPolicy()
        Deprecated.
        The policy that the connection is running under.
        Returns:
        the policy for the connection
      • getRemoteAddress

        java.net.InetSocketAddress getRemoteAddress()
        Deprecated.
        Get the remote Address in use for this connection.

        Note: Non-physical connections, like during the Mux extensions, or during unit testing can result in a InetSocketAddress on port 0 and/or on localhost.

        Returns:
        the remote address.
      • isOpen

        boolean isOpen()
        Deprecated.
        Test if logical connection is still open
        Returns:
        true if connection is open
      • isReading

        boolean isReading()
        Deprecated.
        Tests if the connection is actively reading.
        Returns:
        true if connection is actively attempting to read.
      • opened

        boolean opened()
        Deprecated.
        Set the state to opened (the application onOpen() method has been called successfully).

        Reads from network begin here.

        Returns:
        true if state is OPENED, false otherwise
      • opening

        boolean opening()
        Deprecated.
        Set the state to upgrade/opening handshake has completed.
        Returns:
        true if state is OPENING, false otherwise
      • remoteClose

        void remoteClose​(CloseInfo close)
        Deprecated.
        Report that the Remote Endpoint CLOSE Frame has been received
        Parameters:
        close - the close frame details
      • setNextIncomingFrames

        void setNextIncomingFrames​(IncomingFrames incoming)
        Deprecated.
        Set where the connection should send the incoming frames to.

        Often this is from the Parser to the start of the extension stack, and eventually on to the session.

        Parameters:
        incoming - the incoming frames handler
      • setSession

        void setSession​(WebSocketSession session)
        Deprecated.
        Associate the Active Session with the connection.
        Parameters:
        session - the session for this connection
      • suspend

        SuspendToken suspend()
        Deprecated.
        Suspend a the incoming read events on the connection.
        Returns:
        the suspend token
      • toStateString

        java.lang.String toStateString()
        Deprecated.
        Get the Connection State as a String
        Returns:
        the Connection State string