Package org.apache.sshd.client.channel
Class ChannelSubsystem
- 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.client.channel.AbstractClientChannel
-
- org.apache.sshd.client.channel.ChannelSession
-
- org.apache.sshd.client.channel.ChannelSubsystem
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.nio.channels.Channel
,ClientChannel
,ClientSessionHolder
,AttributeRepository
,AttributeStore
,Channel
,ChannelListenerManager
,ChannelStreamPacketWriterResolver
,ChannelStreamPacketWriterResolverManager
,Closeable
,PacketWriter
,PropertyResolver
,SessionContextHolder
,SessionHolder<Session>
,ExecutorServiceCarrier
public class ChannelSubsystem extends ChannelSession
Client channel to run a subsystem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sshd.common.channel.AbstractChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState
-
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>
-
Nested classes/interfaces inherited from interface org.apache.sshd.client.channel.ClientChannel
ClientChannel.Streaming
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_REQUEST_SUBSYSTEM_REPLY
Default value forREQUEST_SUBSYSTEM_REPLY
- according to RFC4254 section 6.5:static java.lang.String
REQUEST_SUBSYSTEM_REPLY
Configure whether reply for the "subsystem&quoot; request is requiredprivate java.lang.String
subsystem
-
Fields inherited from class org.apache.sshd.client.channel.ChannelSession
DEFAULT_INPUT_STREAM_PUMP_CHUNK_SIZE, INPUT_STREAM_PUMP_CHUNK_SIZE
-
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, streaming
-
Fields inherited from class org.apache.sshd.common.channel.AbstractChannel
channelListenerProxy, channelListeners, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service
-
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.ChannelStreamPacketWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.common.Closeable
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
-
Fields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ChannelSubsystem(java.lang.String subsystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doOpen()
java.lang.String
getSubsystem()
The subsystem namevoid
handleFailure()
Invoked whenSSH_MSG_CHANNEL_FAILURE
receivedvoid
handleSuccess()
Invoked whenSSH_MSG_CHANNEL_SUCCESS
receivedvoid
onClose(java.lang.Runnable run)
java.lang.String
toString()
-
Methods inherited from class org.apache.sshd.client.channel.ChannelSession
closeImmediately0, getInnerCloseable, handleInternalRequest, handleXonXoff, pumpInputStream, securedRead
-
Methods inherited from class org.apache.sshd.client.channel.AbstractClientChannel
addChannelSignalRequestHandlers, doWriteData, doWriteExtendedData, getAsyncErr, getAsyncIn, getAsyncOut, getChannelState, getChannelType, getErr, getExitSignal, getExitStatus, getIn, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, open, open, setErr, setIn, setOut, setStreaming, updateCurrentChannelState, waitFor
-
Methods inherited from class org.apache.sshd.common.channel.AbstractChannel
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelListenerProxy, getChannelStreamPacketWriterResolver, getExecutorService, getId, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleRequest, handleUnknownChannelRequest, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamPacketWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamPacketWriterResolver, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, 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
getSimplifiedLogger
-
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, getId, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleClose, handleData, handleEof, handleExtendedData, handleRequest, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolverManager
getChannelStreamPacketWriterResolver, resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver, setChannelStreamPacketWriterResolver
-
Methods inherited from interface org.apache.sshd.client.channel.ClientChannel
getClientSession
-
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Methods inherited from interface org.apache.sshd.common.io.PacketWriter
writePacket
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSession, getSessionContext
-
-
-
-
Field Detail
-
REQUEST_SUBSYSTEM_REPLY
public static final java.lang.String REQUEST_SUBSYSTEM_REPLY
Configure whether reply for the "subsystem&quoot; request is required
-
DEFAULT_REQUEST_SUBSYSTEM_REPLY
public static final boolean DEFAULT_REQUEST_SUBSYSTEM_REPLY
Default value for
REQUEST_SUBSYSTEM_REPLY
- according to RFC4254 section 6.5:It is RECOMMENDED that the reply to these messages be requested and checked.
- See Also:
- Constant Field Values
-
subsystem
private final java.lang.String subsystem
-
-
Method Detail
-
getSubsystem
public final java.lang.String getSubsystem()
The subsystem name- Returns:
- The subsystem name for the channel - never
null
or empty
-
doOpen
protected void doOpen() throws java.io.IOException
- Overrides:
doOpen
in classChannelSession
- Throws:
java.io.IOException
-
handleSuccess
public void handleSuccess() throws java.io.IOException
Description copied from interface:Channel
Invoked whenSSH_MSG_CHANNEL_SUCCESS
received- Specified by:
handleSuccess
in interfaceChannel
- Overrides:
handleSuccess
in classAbstractChannel
- Throws:
java.io.IOException
- If failed to handle the message
-
handleFailure
public void handleFailure() throws java.io.IOException
Description copied from interface:Channel
Invoked whenSSH_MSG_CHANNEL_FAILURE
received- Specified by:
handleFailure
in interfaceChannel
- Overrides:
handleFailure
in classAbstractChannel
- Throws:
java.io.IOException
- If failed to handle the message
-
onClose
public void onClose(java.lang.Runnable run)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractChannel
-
-