Class ChannelSession

    • Field Detail

      • pumper

        protected java.util.concurrent.Future<?> pumper
      • env

        private final java.util.Map<java.lang.String,​java.lang.Object> env
    • Constructor Detail

      • ChannelSession

        public ChannelSession()
    • Method Detail

      • doOpen

        protected void doOpen()
                       throws java.io.IOException
        Specified by:
        doOpen in class AbstractClientChannel
        Throws:
        java.io.IOException
      • handleInternalRequest

        protected RequestHandler.Result handleInternalRequest​(java.lang.String req,
                                                              boolean wantReply,
                                                              Buffer buffer)
                                                       throws java.io.IOException
        Description copied from class: AbstractChannel
        Called by AbstractChannel.handleUnknownChannelRequest(String, boolean, Buffer) in order to allow channel request handling if none of the registered handlers processed the request - last chance.
        Overrides:
        handleInternalRequest in class AbstractChannel
        Parameters:
        req - The request type
        wantReply - Whether reply is requested
        buffer - The Buffer containing extra request-specific data
        Returns:
        The handling result - if null or Unsupported and reply is required then a failure message will be sent
        Throws:
        java.io.IOException - If failed to process the request internally
      • handleXonXoff

        protected RequestHandler.Result handleXonXoff​(Buffer buffer,
                                                      boolean wantReply)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • closeImmediately0

        protected void closeImmediately0()
      • pumpInputStream

        protected void pumpInputStream()
      • securedRead

        protected int securedRead​(java.io.InputStream in,
                                  int maxChunkSize,
                                  byte[] buf,
                                  int off,
                                  int len)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • setEnv

        public java.lang.Object setEnv​(java.lang.String key,
                                       java.lang.Object value)
        Parameters:
        key - The (never null) key (Note: may be empty...)
        value - The value to set - if null then the pre-existing value for the key (if any) is removed.
        Returns:
        The replaced/removed previous value - null if no previous value set for the key.
      • sendEnvVariables

        protected void sendEnvVariables​(Session session)
                                 throws java.io.IOException
        Throws:
        java.io.IOException