Class ConnectHandler.DownstreamConnection

    • Constructor Detail

      • DownstreamConnection

        public DownstreamConnection​(EndPoint endPoint,
                                    java.util.concurrent.Executor executor,
                                    ByteBufferPool bufferPool,
                                    java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Object> context)
    • Method Detail

      • onUpgradeTo

        public void onUpgradeTo​(java.nio.ByteBuffer buffer)
        Description copied from interface: Connection.UpgradeTo

        Invoked during an upgrade to receive a buffer containing bytes that have not been consumed by the upgrade-from connection, and that must be consumed by this connection.

        Specified by:
        onUpgradeTo in interface Connection.UpgradeTo
        buffer - a non-null buffer of unconsumed bytes received from the upgrade-from connection. The buffer does not belong to any pool and should be discarded after having consumed its bytes.
      • onOpen

        public void onOpen()
        Description copied from interface: Connection

        Callback method invoked when this connection is opened.

        Creators of the connection implementation are responsible for calling this method.

        Specified by:
        onOpen in interface Connection
        onOpen in class AbstractConnection
      • read

        protected int read​(EndPoint endPoint,
                           java.nio.ByteBuffer buffer)
        Specified by:
        read in class ProxyConnection