Package org.apache.sshd.mina
Class MinaSession
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.common.util.closeable.AbstractInnerCloseable
org.apache.sshd.mina.MinaSession
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,Closeable,IoSession,org.apache.sshd.common.util.net.ConnectionEndpointsIndicator
public class MinaSession
extends org.apache.sshd.common.util.closeable.AbstractInnerCloseable
implements IoSession
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.State -
Field Summary
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsConstructorDescriptionMinaSession(MinaService service, org.apache.mina.core.session.IoSession session, SocketAddress acceptanceAddress) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(Object key) longgetId()protected Closeableorg.apache.mina.core.session.IoSessionremoveAttribute(Object key) voidsetAttribute(Object key, Object value) setAttributeIfAbsent(Object key, Object value) voidvoidsuspend()Intended for tests simulating a sudden connection drop only! Do not call otherwise.voidtoString()write(byte[] data) write(byte[] data, int offset, int len) write(org.apache.mina.core.buffer.IoBuffer buffer) writeBuffer(org.apache.sshd.common.util.buffer.Buffer buffer) Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediatelyMethods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Constructor Details
-
MinaSession
public MinaSession(MinaService service, org.apache.mina.core.session.IoSession session, SocketAddress acceptanceAddress)
-
-
Method Details
-
getSession
public org.apache.mina.core.session.IoSession getSession() -
suspendRead
public void suspendRead()- Specified by:
suspendReadin interfaceIoSession
-
resumeRead
public void resumeRead()- Specified by:
resumeReadin interfaceIoSession
-
suspend
public void suspend()Intended for tests simulating a sudden connection drop only! Do not call otherwise. -
getAttribute
- Specified by:
getAttributein interfaceIoSession
-
setAttribute
- Specified by:
setAttributein interfaceIoSession
-
setAttributeIfAbsent
- Specified by:
setAttributeIfAbsentin interfaceIoSession
-
removeAttribute
- Specified by:
removeAttributein interfaceIoSession
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.sshd.common.util.net.ConnectionEndpointsIndicator
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceorg.apache.sshd.common.util.net.ConnectionEndpointsIndicator
-
getAcceptanceAddress
- Specified by:
getAcceptanceAddressin interfaceIoSession
-
getId
public long getId() -
getInnerCloseable
- Specified by:
getInnerCloseablein classorg.apache.sshd.common.util.closeable.AbstractInnerCloseable
-
write
-
write
-
writeBuffer
- Specified by:
writeBufferin interfaceIoSession
-
write
-
getService
- Specified by:
getServicein interfaceIoSession
-
shutdownOutputStream
- Specified by:
shutdownOutputStreamin interfaceIoSession- Throws:
IOException
-
toString
-