Class NettyIoService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, org.apache.sshd.common.Closeable, org.apache.sshd.common.io.IoService, org.apache.sshd.common.io.IoServiceEventListenerManager
    Direct Known Subclasses:
    NettyIoAcceptor, NettyIoConnector

    public abstract class NettyIoService
    extends org.apache.sshd.common.util.closeable.AbstractCloseable
    implements org.apache.sshd.common.io.IoService
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

        org.apache.sshd.common.util.closeable.AbstractCloseable.State
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected io.netty.channel.group.ChannelGroup channelGroup  
      static io.netty.util.AttributeKey<org.apache.sshd.common.io.IoConnectFuture> CONNECT_FUTURE_KEY  
      private org.apache.sshd.common.io.IoServiceEventListener eventListener  
      protected NettyIoServiceFactory factory  
      protected org.apache.sshd.common.io.IoHandler handler  
      protected java.util.Map<java.lang.Long,​org.apache.sshd.common.io.IoSession> sessions  
      protected java.util.concurrent.atomic.AtomicLong sessionSeq  
      • Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

        closeFuture, futureLock, state
      • Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        log
      • Fields inherited from interface org.apache.sshd.common.io.IoService

        DEFAULT_REUSE_ADDRESS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.sshd.common.io.IoServiceEventListener getIoServiceEventListener()  
      java.util.Map<java.lang.Long,​org.apache.sshd.common.io.IoSession> getManagedSessions()  
      void setIoServiceEventListener​(org.apache.sshd.common.io.IoServiceEventListener listener)  
      • Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

        addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener
      • Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.sshd.common.Closeable

        addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
    • Field Detail

      • CONNECT_FUTURE_KEY

        public static final io.netty.util.AttributeKey<org.apache.sshd.common.io.IoConnectFuture> CONNECT_FUTURE_KEY
      • sessionSeq

        protected final java.util.concurrent.atomic.AtomicLong sessionSeq
      • sessions

        protected final java.util.Map<java.lang.Long,​org.apache.sshd.common.io.IoSession> sessions
      • channelGroup

        protected io.netty.channel.group.ChannelGroup channelGroup
      • handler

        protected final org.apache.sshd.common.io.IoHandler handler
      • eventListener

        private org.apache.sshd.common.io.IoServiceEventListener eventListener
    • Constructor Detail

      • NettyIoService

        protected NettyIoService​(NettyIoServiceFactory factory,
                                 org.apache.sshd.common.io.IoHandler handler)
    • Method Detail

      • getIoServiceEventListener

        public org.apache.sshd.common.io.IoServiceEventListener getIoServiceEventListener()
        Specified by:
        getIoServiceEventListener in interface org.apache.sshd.common.io.IoServiceEventListenerManager
      • setIoServiceEventListener

        public void setIoServiceEventListener​(org.apache.sshd.common.io.IoServiceEventListener listener)
        Specified by:
        setIoServiceEventListener in interface org.apache.sshd.common.io.IoServiceEventListenerManager
      • getManagedSessions

        public java.util.Map<java.lang.Long,​org.apache.sshd.common.io.IoSession> getManagedSessions()
        Specified by:
        getManagedSessions in interface org.apache.sshd.common.io.IoService