public class NettyIoSession extends org.apache.sshd.common.util.closeable.AbstractCloseable implements IoSession
| Modifier and Type | Class and Description |
|---|---|
protected class |
NettyIoSession.Adapter
Simple netty adapter to use as a bridge.
|
protected static class |
NettyIoSession.DefaultIoWriteFuture |
org.apache.sshd.common.util.closeable.AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
protected io.netty.channel.ChannelInboundHandlerAdapter |
adapter |
protected Map<Object,Object> |
attributes |
protected DefaultCloseFuture |
closeFuture |
protected io.netty.channel.ChannelHandlerContext |
context |
protected IoHandler |
handler |
protected long |
id |
protected io.netty.channel.ChannelFuture |
prev |
protected SocketAddress |
remoteAddr |
protected NettyIoService |
service |
lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
NettyIoSession(NettyIoService service,
IoHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
protected CloseFuture |
doCloseGracefully() |
protected void |
doCloseImmediately() |
protected void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
Object |
getAttribute(Object key) |
long |
getId() |
SocketAddress |
getLocalAddress() |
SocketAddress |
getRemoteAddress() |
IoService |
getService() |
Object |
removeAttribute(Object key) |
Object |
setAttribute(Object key,
Object value) |
Object |
setAttributeIfAbsent(Object key,
Object value) |
IoWriteFuture |
writePacket(org.apache.sshd.common.util.buffer.Buffer buffer) |
addCloseFutureListener, builder, close, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprotected final NettyIoService service
protected final IoHandler handler
protected final DefaultCloseFuture closeFuture
protected final long id
protected io.netty.channel.ChannelHandlerContext context
protected SocketAddress remoteAddr
protected io.netty.channel.ChannelFuture prev
protected final io.netty.channel.ChannelInboundHandlerAdapter adapter
public NettyIoSession(NettyIoService service, IoHandler handler)
public Object getAttribute(Object key)
getAttribute in interface IoSessionpublic Object setAttribute(Object key, Object value)
setAttribute in interface IoSessionpublic Object setAttributeIfAbsent(Object key, Object value)
setAttributeIfAbsent in interface IoSessionpublic Object removeAttribute(Object key)
removeAttribute in interface IoSessionpublic SocketAddress getRemoteAddress()
getRemoteAddress in interface IoSessionpublic SocketAddress getLocalAddress()
getLocalAddress in interface IoSessionpublic IoWriteFuture writePacket(org.apache.sshd.common.util.buffer.Buffer buffer)
writePacket in interface PacketWriterpublic IoService getService()
getService in interface IoSessionprotected CloseFuture doCloseGracefully()
doCloseGracefully in class org.apache.sshd.common.util.closeable.AbstractCloseableprotected void doCloseImmediately()
doCloseImmediately in class org.apache.sshd.common.util.closeable.AbstractCloseableprotected void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionprotected void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionprotected void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
ExceptionCopyright © 2008–2018 The Apache Software Foundation. All rights reserved.