Class NioSession

    • Field Detail

      • channel

        protected final java.nio.channels.Channel channel
        The communication channel
      • key

        private java.nio.channels.SelectionKey key
        The SelectionKey used for this session
      • filterChain

        private final IoFilterChain filterChain
        The FilterChain created for this session
    • Constructor Detail

      • NioSession

        protected NioSession​(IoProcessor<NioSession> processor,
                             IoService service,
                             java.nio.channels.Channel channel)
        Creates a new instance of NioSession, with its associated IoProcessor.
        This method is only called by the inherited class.
        Parameters:
        processor - The associated IoProcessor
        service - The associated IoService
        channel - The associated Channel
    • Method Detail

      • getChannel

        abstract java.nio.channels.ByteChannel getChannel()
        Returns:
        The ByteChannel associated with this IoSession
      • getFilterChain

        public IoFilterChain getFilterChain()
        Returns:
        the filter chain that only affects this session.
      • getSelectionKey

        java.nio.channels.SelectionKey getSelectionKey()
        Returns:
        The SelectionKey associated with this IoSession
      • setSelectionKey

        void setSelectionKey​(java.nio.channels.SelectionKey key)
        Sets the SelectionKey for this IoSession
        Parameters:
        key - The new SelectionKey