Package org.apache.sshd.netty
Class NettyIoService
- 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
-
- 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
-
-
Field Summary
Fields Modifier and Type Field Description protected io.netty.channel.group.ChannelGroupchannelGroupstatic io.netty.util.AttributeKey<org.apache.sshd.common.io.IoConnectFuture>CONNECT_FUTURE_KEYprivate org.apache.sshd.common.io.IoServiceEventListenereventListenerprotected NettyIoServiceFactoryfactoryprotected org.apache.sshd.common.io.IoHandlerhandlerprivate booleannoMoreSessionsprotected java.util.Map<java.lang.Long,org.apache.sshd.common.io.IoSession>sessionsprotected java.util.concurrent.atomic.AtomicLongsessionSeq
-
Constructor Summary
Constructors Modifier Constructor Description protectedNettyIoService(NettyIoServiceFactory factory, org.apache.sshd.common.io.IoHandler handler, java.lang.String channelGroupName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoCloseImmediately()org.apache.sshd.common.io.IoServiceEventListenergetIoServiceEventListener()java.util.Map<java.lang.Long,org.apache.sshd.common.io.IoSession>getManagedSessions()protected voidmapSession(org.apache.sshd.common.io.IoSession session)protected voidregisterChannel(io.netty.channel.Channel channel)voidsetIoServiceEventListener(org.apache.sshd.common.io.IoServiceEventListener listener)-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, doCloseGracefully, 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
-
-
-
-
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 final io.netty.channel.group.ChannelGroup channelGroup
-
factory
protected final NettyIoServiceFactory factory
-
handler
protected final org.apache.sshd.common.io.IoHandler handler
-
noMoreSessions
private boolean noMoreSessions
-
eventListener
private org.apache.sshd.common.io.IoServiceEventListener eventListener
-
-
Constructor Detail
-
NettyIoService
protected NettyIoService(NettyIoServiceFactory factory, org.apache.sshd.common.io.IoHandler handler, java.lang.String channelGroupName)
-
-
Method Detail
-
doCloseImmediately
protected void doCloseImmediately()
- Overrides:
doCloseImmediatelyin classorg.apache.sshd.common.util.closeable.AbstractCloseable
-
registerChannel
protected void registerChannel(io.netty.channel.Channel channel) throws java.util.concurrent.CancellationException- Throws:
java.util.concurrent.CancellationException
-
mapSession
protected void mapSession(org.apache.sshd.common.io.IoSession session) throws java.util.concurrent.CancellationException- Throws:
java.util.concurrent.CancellationException
-
getIoServiceEventListener
public org.apache.sshd.common.io.IoServiceEventListener getIoServiceEventListener()
- Specified by:
getIoServiceEventListenerin interfaceorg.apache.sshd.common.io.IoServiceEventListenerManager
-
setIoServiceEventListener
public void setIoServiceEventListener(org.apache.sshd.common.io.IoServiceEventListener listener)
- Specified by:
setIoServiceEventListenerin interfaceorg.apache.sshd.common.io.IoServiceEventListenerManager
-
getManagedSessions
public java.util.Map<java.lang.Long,org.apache.sshd.common.io.IoSession> getManagedSessions()
- Specified by:
getManagedSessionsin interfaceorg.apache.sshd.common.io.IoService
-
-