Class TcpipServerChannel
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
org.apache.sshd.server.forward.TcpipServerChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.AttributeStore, Channel, ChannelIdentifier, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, org.apache.sshd.common.Closeable, ForwardingTunnelEndpointsProvider, org.apache.sshd.common.PropertyResolver, org.apache.sshd.common.session.SessionContextHolder, SessionHolder<Session>, org.apache.sshd.common.util.threads.ExecutorServiceCarrier, ServerChannel, ServerSessionHolder
public class TcpipServerChannel
extends AbstractServerChannel
implements ForwardingTunnelEndpointsProvider
TODO Add javadoc
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidatorNested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.StateNested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
org.apache.sshd.common.AttributeRepository.AttributeKey<T> -
Field Summary
Fields inherited from class AbstractServerChannel
exitStatusSentFields inherited from class AbstractChannel
channelListenerProxy, channelListeners, closeSignaled, DEFAULT_PACKET_VALIDATOR, eofReceived, 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 Channel
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMFields inherited from interface ChannelStreamWriterResolver
NONEFields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionTcpipServerChannel(TcpForwardingFilter.Type type, org.apache.sshd.common.util.threads.CloseableExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionprotected ChannelToPortHandlercreateChannelToPortHandler(org.apache.sshd.common.io.IoSession session) protected OpenFuturedoInit(org.apache.sshd.common.util.buffer.Buffer buffer) protected voiddoWriteData(byte[] data, int off, long len) protected voiddoWriteExtendedData(byte[] data, int off, long len) protected org.apache.sshd.common.Closeableorg.apache.sshd.common.util.net.SshdSocketAddressgetPort()Retrieves theChannelToPortHandler.org.apache.sshd.common.util.net.SshdSocketAddressorg.apache.sshd.common.util.net.SshdSocketAddressprotected voidhandleChannelConnectResult(OpenFuture f, org.apache.sshd.common.io.IoConnectFuture future) protected voidhandleChannelOpenFailure(OpenFuture f, Throwable problem) protected voidhandleChannelOpenSuccess(OpenFuture f, org.apache.sshd.common.io.IoSession session) voidInvoked whenSSH_MSG_CHANNEL_EOFreceivedvoidhandleWindowAdjust(org.apache.sshd.common.util.buffer.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, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamWriterResolver, setPacketValidator, setRecipient, signalChannelClosed, signalChannelInitialized, signalChannelOpenFailure, 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 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 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 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 ServerChannel
getServerSessionMethods inherited from interface SessionHolder
getSession, getSessionContext
-
Constructor Details
-
TcpipServerChannel
public TcpipServerChannel(TcpForwardingFilter.Type type, org.apache.sshd.common.util.threads.CloseableExecutorService executor)
-
-
Method Details
-
getTcpipChannelType
-
getLocalAddress
-
setLocalAddress
-
getTunnelEntrance
public org.apache.sshd.common.util.net.SshdSocketAddress getTunnelEntrance()- Specified by:
getTunnelEntrancein interfaceForwardingTunnelEndpointsProvider
-
getTunnelExit
public org.apache.sshd.common.util.net.SshdSocketAddress getTunnelExit()- Specified by:
getTunnelExitin interfaceForwardingTunnelEndpointsProvider
-
getOriginatorAddress
public org.apache.sshd.common.util.net.SshdSocketAddress 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
protected void handleChannelConnectResult(OpenFuture f, org.apache.sshd.common.io.IoConnectFuture future) -
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
protected org.apache.sshd.common.Closeable getInnerCloseable()- Overrides:
getInnerCloseablein classAbstractChannel
-
doWriteData
- Specified by:
doWriteDatain classAbstractChannel- Throws:
IOException
-
doWriteExtendedData
- Specified by:
doWriteExtendedDatain classAbstractChannel- Throws:
IOException
-
createChannelToPortHandler
protected ChannelToPortHandler createChannelToPortHandler(org.apache.sshd.common.io.IoSession session)
-