Package org.apache.sshd.server.forward
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 org.apache.sshd.common.channel.AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidatorNested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.StateNested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
AttributeRepository.AttributeKey<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IoConnectorprivate SocketAddressprivate SshdSocketAddressprivate ChannelAsyncOutputStreamprivate ChannelToPortHandlerprivate SshdSocketAddressprivate SshdSocketAddressprivate final TcpForwardingFilter.TypeFields inherited from class org.apache.sshd.server.channel.AbstractServerChannel
exitStatusSentFields inherited from class org.apache.sshd.common.channel.AbstractChannel
channelListenerProxy, channelListeners, closeSignaled, DEFAULT_PACKET_VALIDATOR, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service, unregisterSignaledFields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.channel.Channel
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMFields inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver
NONEFields inherited from interface org.apache.sshd.common.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 Closeableprotected 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 org.apache.sshd.server.channel.AbstractServerChannel
handleOpenFailure, handleOpenSuccess, open, sendExitStatusMethods inherited from class org.apache.sshd.common.channel.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 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, 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.AttributeRepository
attributeKeys, getAttribute, getAttributesCountMethods inherited from interface org.apache.sshd.common.AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeMethods inherited from interface org.apache.sshd.common.channel.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 org.apache.sshd.common.channel.ChannelIdentifier
getChannelIdMethods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListenerMethods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolverMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListenerMethods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmptyMethods inherited from interface org.apache.sshd.server.channel.ServerChannel
getServerSessionMethods inherited from interface org.apache.sshd.common.session.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
-
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
-