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 io.netty.channel.ChannelHandlerContext |
context |
protected IoHandler |
handler |
protected long |
id |
static Method |
NIO_JAVA_CHANNEL_METHOD |
protected io.netty.channel.ChannelFuture |
prev |
protected SocketAddress |
remoteAddr |
protected NettyIoService |
service |
closeFuture, futureLock, statelog| Constructor and Description |
|---|
NettyIoSession(NettyIoService service,
IoHandler handler,
SocketAddress acceptanceAddress) |
| 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) |
SocketAddress |
getAcceptanceAddress() |
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) |
void |
shutdownOutputStream() |
String |
toString() |
IoWriteFuture |
writeBuffer(org.apache.sshd.common.util.buffer.Buffer buffer) |
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, resumeRead, suspendReadaddCloseFutureListener, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic static final Method NIO_JAVA_CHANNEL_METHOD
protected final NettyIoService service
protected final IoHandler handler
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, SocketAddress acceptanceAddress)
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 org.apache.sshd.common.util.net.ConnectionEndpointsIndicatorpublic SocketAddress getLocalAddress()
getLocalAddress in interface org.apache.sshd.common.util.net.ConnectionEndpointsIndicatorpublic SocketAddress getAcceptanceAddress()
getAcceptanceAddress in interface IoSessionpublic IoWriteFuture writeBuffer(org.apache.sshd.common.util.buffer.Buffer buffer)
writeBuffer in interface IoSessionpublic IoService getService()
getService in interface IoSessionpublic void shutdownOutputStream()
throws IOException
shutdownOutputStream in interface IoSessionIOExceptionprotected 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
Exceptionprotected void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
ExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.