Class NettyIoAcceptor

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.netty.NettyIoService
org.apache.sshd.netty.NettyIoAcceptor
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, org.apache.sshd.common.Closeable, org.apache.sshd.common.io.IoAcceptor, org.apache.sshd.common.io.IoService, org.apache.sshd.common.io.IoServiceEventListenerManager

public class NettyIoAcceptor extends NettyIoService implements org.apache.sshd.common.io.IoAcceptor
The Netty based IoAcceptor implementation.
  • 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 final io.netty.bootstrap.ServerBootstrap
     
    protected final Map<SocketAddress,io.netty.channel.Channel>
     
    private static final io.netty.handler.logging.LoggingHandler
     

    Fields inherited from class org.apache.sshd.netty.NettyIoService

    channelGroup, CONNECT_FUTURE_KEY, factory, handler, sessions, 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
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyIoAcceptor(NettyIoServiceFactory factory, org.apache.sshd.common.io.IoHandler handler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    bind(Collection<? extends SocketAddress> addresses)
     
    protected io.netty.channel.Channel
     
    protected void
    closeChannel(io.netty.channel.Channel channel)
     
    protected org.apache.sshd.common.future.CloseFuture
     
    protected void
     
     
    void
     
    void
     
    void
    unbind(Collection<? extends SocketAddress> addresses)
     

    Methods inherited from class org.apache.sshd.netty.NettyIoService

    getIoServiceEventListener, getManagedSessions, setIoServiceEventListener

    Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

    addCloseFutureListener, builder, close, 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

    Methods inherited from interface org.apache.sshd.common.io.IoService

    getManagedSessions

    Methods inherited from interface org.apache.sshd.common.io.IoServiceEventListenerManager

    getIoServiceEventListener, setIoServiceEventListener
  • Field Details

    • LOGGING_TRACE

      private static final io.netty.handler.logging.LoggingHandler LOGGING_TRACE
    • bootstrap

      protected final io.netty.bootstrap.ServerBootstrap bootstrap
    • boundAddresses

      protected final Map<SocketAddress,io.netty.channel.Channel> boundAddresses
  • Constructor Details

    • NettyIoAcceptor

      public NettyIoAcceptor(NettyIoServiceFactory factory, org.apache.sshd.common.io.IoHandler handler)
  • Method Details

    • bind

      public void bind(Collection<? extends SocketAddress> addresses) throws IOException
      Specified by:
      bind in interface org.apache.sshd.common.io.IoAcceptor
      Throws:
      IOException
    • bind

      public void bind(SocketAddress address) throws IOException
      Specified by:
      bind in interface org.apache.sshd.common.io.IoAcceptor
      Throws:
      IOException
    • bindInternal

      protected io.netty.channel.Channel bindInternal(SocketAddress address) throws IOException
      Throws:
      IOException
    • closeChannel

      protected void closeChannel(io.netty.channel.Channel channel)
    • unbind

      public void unbind(Collection<? extends SocketAddress> addresses)
      Specified by:
      unbind in interface org.apache.sshd.common.io.IoAcceptor
    • unbind

      public void unbind(SocketAddress address)
      Specified by:
      unbind in interface org.apache.sshd.common.io.IoAcceptor
    • unbind

      public void unbind()
      Specified by:
      unbind in interface org.apache.sshd.common.io.IoAcceptor
    • getBoundAddresses

      public Set<SocketAddress> getBoundAddresses()
      Specified by:
      getBoundAddresses in interface org.apache.sshd.common.io.IoAcceptor
    • doCloseGracefully

      protected org.apache.sshd.common.future.CloseFuture doCloseGracefully()
      Overrides:
      doCloseGracefully in class org.apache.sshd.common.util.closeable.AbstractCloseable
    • doCloseImmediately

      protected void doCloseImmediately()
      Overrides:
      doCloseImmediately in class org.apache.sshd.common.util.closeable.AbstractCloseable