Class TcpipServerChannel
java.lang.Object
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, AttributeRepository, AttributeStore, Channel, ChannelIdentifier, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, Closeable, ForwardingTunnelEndpointsProvider, PropertyResolver, SessionContextHolder, SessionHolder<Session>, ExecutorServiceCarrier, ServerChannel, ServerSessionHolder
public class TcpipServerChannel
extends AbstractServerChannel
implements ForwardingTunnelEndpointsProvider
TODO Add javadoc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classstatic classNested 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
FieldsModifier and TypeFieldDescriptionprivate IoConnectorprivate SocketAddressprivate SshdSocketAddressprivate ChannelAsyncOutputStreamprivate ChannelToPortHandlerprivate SshdSocketAddressprivate SshdSocketAddressprivate final TcpForwardingFilter.TypeFields inherited from class AbstractServerChannel
exitStatusSentFields 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
ConstructorsConstructorDescriptionTcpipServerChannel(TcpForwardingFilter.Type type, CloseableExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionprotected ChannelToPortHandlercreateChannelToPortHandler(IoSession session) protected OpenFutureprotected voiddoWriteData(byte[] data, int off, long len) protected voiddoWriteExtendedData(byte[] data, int off, long len) protected CloseablegetPort()Retrieves theChannelToPortHandler.protected voidhandleChannelConnectResult(OpenFuture f, IoConnectFuture future) protected voidhandleChannelOpenFailure(OpenFuture f, Throwable problem) protected voidhandleChannelOpenSuccess(OpenFuture f, IoSession session) voidInvoked whenSSH_MSG_CHANNEL_EOFreceivedvoidhandleWindowAdjust(Buffer buffer) Invoked whenSSH_MSG_CHANNEL_WINDOW_ADJUSTreceivedprotected booleanmayWrite()voidsetLocalAddress(SocketAddress localAddress) Methods inherited from class AbstractServerChannel
handleOpenFailure, handleOpenSuccess, open, sendExitStatusMethods inherited from class AbstractChannel
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelId, getChannelListenerProxy, getChannelStreamWriterResolver, getExecutorService, getLocalWindow, getPacketValidator, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRegistrationResult, handleChannelRequest, handleChannelUnregistration, handleClose, handleData, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, 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, handleExtendedData, handleFailure, handleRequest, handleSuccess, 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
-
type
-
connector
-
port
-
out
-
tunnelEntrance
-
tunnelExit
-
originatorAddress
-
localAddress
-
-
Constructor Details
-
TcpipServerChannel
-
-
Method Details
-
getTcpipChannelType
-
getLocalAddress
-
setLocalAddress
-
getTunnelEntrance
- Specified by:
getTunnelEntrancein interfaceForwardingTunnelEndpointsProvider
-
getTunnelExit
- Specified by:
getTunnelExitin interfaceForwardingTunnelEndpointsProvider
-
getOriginatorAddress
-
handleWindowAdjust
Description copied from interface:ChannelInvoked whenSSH_MSG_CHANNEL_WINDOW_ADJUSTreceived- Specified by:
handleWindowAdjustin interfaceChannel- Overrides:
handleWindowAdjustin classAbstractChannel- Parameters:
buffer- The rest of the message dataBufferafter decoding the channel identifiers- Throws:
IOException- If failed to handle the message
-
doInit
- Overrides:
doInitin classAbstractServerChannel
-
getPort
Retrieves theChannelToPortHandler. This isnullwhen the forwarding connection is not open.- Returns:
- the port handler, if set, or
nullotherwise
-
mayWrite
protected boolean mayWrite()- Overrides:
mayWritein classAbstractChannel
-
handleChannelConnectResult
-
handleChannelOpenSuccess
-
handleChannelOpenFailure
-
handleEof
Description copied from interface:ChannelInvoked whenSSH_MSG_CHANNEL_EOFreceived- Specified by:
handleEofin interfaceChannel- Overrides:
handleEofin classAbstractChannel- Throws:
IOException- If failed to handle the message
-
getInnerCloseable
- Overrides:
getInnerCloseablein classAbstractChannel
-
doWriteData
- Specified by:
doWriteDatain classAbstractChannel- Throws:
IOException
-
doWriteExtendedData
- Specified by:
doWriteExtendedDatain classAbstractChannel- Throws:
IOException
-
createChannelToPortHandler
-