Package org.apache.sshd.common.forward
Class TcpipClientChannel
- java.lang.Object
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ClientChannel,ClientSessionHolder,AttributeRepository,AttributeStore,Channel,ChannelIdentifier,ChannelListenerManager,StreamingChannel,ChannelStreamWriterResolver,ChannelStreamWriterResolverManager,Closeable,ForwardingTunnelEndpointsProvider,PropertyResolver,SessionContextHolder,SessionHolder<Session>,ExecutorServiceCarrier
public class TcpipClientChannel extends AbstractClientChannel implements ForwardingTunnelEndpointsProvider
TODO Add javadoc- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTcpipClientChannel.TypeType of channel being created.-
Nested classes/interfaces inherited from class org.apache.sshd.common.channel.AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidator
-
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.State
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
AttributeRepository.AttributeKey<T extends Object>
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.channel.StreamingChannel
StreamingChannel.Streaming
-
-
Field Summary
Fields Modifier and Type Field Description protected SshdSocketAddresslocalEntryprotected ChannelToPortHandlerportprotected SshdSocketAddressremote-
Fields inherited from class org.apache.sshd.client.channel.AbstractClientChannel
asyncErr, asyncIn, asyncOut, err, exitSignalHolder, exitStatusHolder, in, invertedErr, invertedIn, invertedOut, opened, openFailureLang, openFailureMsg, openFailureReason, openFuture, out, redirectErrorStream, streaming
-
Fields 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, unregisterSignaled
-
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.channel.Channel
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
-
Fields inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
-
-
Constructor Summary
Constructors Constructor Description TcpipClientChannel(TcpipClientChannel.Type type, IoSession serverSession, SshdSocketAddress remote)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ChannelToPortHandlercreateChannelToPortHandler(IoSession session)protected voiddoOpen()protected voiddoWriteData(byte[] data, int off, long len)protected voiddoWriteExtendedData(byte[] data, int off, long len)protected CloseablegetInnerCloseable()TcpipClientChannel.TypegetTcpipChannelType()SshdSocketAddressgetTunnelEntrance()SshdSocketAddressgetTunnelExit()voidhandleEof()Invoked whenSSH_MSG_CHANNEL_EOFreceivedOpenFutureopen()voidupdateLocalForwardingEntry(LocalForwardingEntry entry)-
Methods inherited from class org.apache.sshd.client.channel.AbstractClientChannel
addChannelSignalRequestHandlers, getAsyncErr, getAsyncIn, getAsyncOut, getChannelState, getChannelType, getErr, getExitSignal, getExitStatus, getIn, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, isRedirectErrorStream, mayWrite, open, setErr, setIn, setOut, setRedirectErrorStream, setStreaming, updateCurrentChannelState, waitFor
-
Methods 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, writePacket
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListener
-
Methods 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, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.AttributeRepository
attributeKeys, getAttribute, getAttributesCount
-
Methods inherited from interface org.apache.sshd.common.AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
-
Methods 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, writePacket
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelIdentifier
getChannelId
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamWriterResolverManager
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
-
Methods inherited from interface org.apache.sshd.client.channel.ClientChannel
getClientSession, waitFor
-
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
-
-
-
Field Detail
-
remote
protected final SshdSocketAddress remote
-
port
protected final ChannelToPortHandler port
-
localEntry
protected SshdSocketAddress localEntry
-
-
Constructor Detail
-
TcpipClientChannel
public TcpipClientChannel(TcpipClientChannel.Type type, IoSession serverSession, SshdSocketAddress remote)
-
-
Method Detail
-
createChannelToPortHandler
protected ChannelToPortHandler createChannelToPortHandler(IoSession session)
-
getTcpipChannelType
public TcpipClientChannel.Type getTcpipChannelType()
-
updateLocalForwardingEntry
public void updateLocalForwardingEntry(LocalForwardingEntry entry)
-
open
public OpenFuture open() throws IOException
- Specified by:
openin interfaceClientChannel- Overrides:
openin classAbstractClientChannel- Throws:
IOException
-
doOpen
protected void doOpen() throws IOException- Specified by:
doOpenin classAbstractClientChannel- Throws:
IOException
-
getInnerCloseable
protected Closeable getInnerCloseable()
- Overrides:
getInnerCloseablein classAbstractClientChannel
-
doWriteData
protected void doWriteData(byte[] data, int off, long len) throws IOException- Overrides:
doWriteDatain classAbstractClientChannel- Throws:
IOException
-
doWriteExtendedData
protected void doWriteExtendedData(byte[] data, int off, long len) throws IOException- Overrides:
doWriteExtendedDatain classAbstractClientChannel- Throws:
IOException
-
handleEof
public void handleEof() throws IOExceptionDescription copied from interface:ChannelInvoked whenSSH_MSG_CHANNEL_EOFreceived- Specified by:
handleEofin interfaceChannel- Overrides:
handleEofin classAbstractChannel- Throws:
IOException- If failed to handle the message
-
getTunnelEntrance
public SshdSocketAddress getTunnelEntrance()
- Specified by:
getTunnelEntrancein interfaceForwardingTunnelEndpointsProvider
-
getTunnelExit
public SshdSocketAddress getTunnelExit()
- Specified by:
getTunnelExitin interfaceForwardingTunnelEndpointsProvider
-
-