Class AbstractServerChannel
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.common.channel.AbstractChannel
org.apache.sshd.server.channel.AbstractServerChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, AttributeRepository, AttributeStore, Channel, ChannelIdentifier, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, Closeable, PropertyResolver, SessionContextHolder, SessionHolder<Session>, ExecutorServiceCarrier, ServerChannel, ServerSessionHolder
- Direct Known Subclasses:
ChannelAgentForwarding, ChannelSession, TcpipServerChannel
TODO Add javadoc
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidatorNested classes/interfaces inherited from class AbstractCloseable
AbstractCloseable.StateNested classes/interfaces inherited from interface AttributeRepository
AttributeRepository.AttributeKey<T> -
Field Summary
FieldsFields inherited from class AbstractChannel
channelListenerProxy, channelListeners, closeSignaled, DEFAULT_PACKET_VALIDATOR, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service, unregisterSignaledFields inherited from class AbstractCloseable
closeFuture, futureLock, stateFields inherited from class AbstractLoggingBean
logFields inherited from interface Channel
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMFields inherited from interface ChannelStreamWriterResolver
NONEFields inherited from interface PropertyResolver
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractServerChannel(String discriminator, Collection<? extends RequestHandler<Channel>> handlers, CloseableExecutorService executor) protected -
Method Summary
Modifier and TypeMethodDescriptionprotected OpenFuturevoidhandleOpenFailure(Buffer buffer) For a client channel, this method will be called internally by the session when the server has rejected this channel opening.voidhandleOpenSuccess(long recipient, long rwSize, long packetSize, Buffer buffer) For a client channel, this method will be called internally by the session when the confirmation has been received.For a server channel, this method will actually open the channelprotected voidsendExitStatus(int v) Methods inherited from class AbstractChannel
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, doWriteData, doWriteExtendedData, getAttribute, getAttributesCount, getChannelId, getChannelListenerProxy, getChannelStreamWriterResolver, getExecutorService, getInnerCloseable, getLocalWindow, getPacketValidator, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRegistrationResult, handleChannelRequest, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, handleWindowAdjust, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, mayWrite, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamWriterResolver, setPacketValidator, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacketMethods inherited from class AbstractInnerCloseable
doCloseGracefully, doCloseImmediatelyMethods inherited from class AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListenerMethods inherited from class 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AttributeRepository
attributeKeys, getAttribute, getAttributesCountMethods inherited from interface AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeMethods inherited from interface Channel
addRequestHandler, addRequestHandlers, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleChannelRegistrationResult, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute, writePacketMethods inherited from interface ChannelIdentifier
getChannelIdMethods inherited from interface ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListenerMethods inherited from interface ChannelStreamWriterResolverManager
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolverMethods inherited from interface Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListenerMethods inherited from interface PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmptyMethods inherited from interface ServerChannel
getServerSessionMethods inherited from interface SessionHolder
getSession, getSessionContext
-
Field Details
-
exitStatusSent
-
-
Constructor Details
-
AbstractServerChannel
-
AbstractServerChannel
protected AbstractServerChannel(String discriminator, Collection<? extends RequestHandler<Channel>> handlers, CloseableExecutorService executor)
-
-
Method Details
-
open
Description copied from interface:ChannelFor a server channel, this method will actually open the channel- Specified by:
openin interfaceChannel- Parameters:
recipient- Recipient identifier (UINT32 represented as along)rwSize- Read/Write window size (uint32)packetSize- Preferred maximum packet size (uint32)buffer- IncomingBufferthat triggered the call. Note: the buffer's read position is exactly after the information that read to this call was decoded- Returns:
- An
OpenFuturefor the channel open request
-
handleOpenSuccess
public void handleOpenSuccess(long recipient, long rwSize, long packetSize, Buffer buffer) throws IOException Description copied from interface:ChannelFor a client channel, this method will be called internally by the session when the confirmation has been received.- Specified by:
handleOpenSuccessin interfaceChannel- Parameters:
recipient- Recipient identifier (UINT32 represented as along)rwSize- Read/Write window size (uint32)packetSize- Preferred maximum packet size (uint32)buffer- IncomingBufferthat triggered the call. Note: the buffer's read position is exactly after the information that read to this call was decoded- Throws:
IOException- If failed to handle the success
-
handleOpenFailure
Description copied from interface:ChannelFor a client channel, this method will be called internally by the session when the server has rejected this channel opening.- Specified by:
handleOpenFailurein interfaceChannel- Parameters:
buffer- IncomingBufferthat triggered the call. Note: the buffer's read position is exactly after the information that read to this call was decoded
-
doInit
-
sendExitStatus
- Throws:
IOException
-