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.
  • 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 NettyIoService