Package com.sshtools.client
Class AbstractSessionChannel
- All Implemented Interfaces:
Channel
- Direct Known Subclasses:
SessionChannelNG
Implements the client side of the SSH Connection protocol session channel
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sshtools.synergy.ssh.ChannelNG
ChannelNG.ChannelInputStream -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class com.sshtools.synergy.ssh.ChannelNG
cache, con, connection, localWindow, paused, remoteWindow -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSessionChannel(int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, boolean autoConsume) AbstractSessionChannel(int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, ChannelRequestFuture closeFuture, boolean autoConsume) -
Method Summary
Modifier and TypeMethodDescriptionallocatePseudoTerminal(String type) allocatePseudoTerminal(String type, int cols, int rows) allocatePseudoTerminal(String type, int cols, int rows, int width, int height, PseudoTerminalModes modes) Deprecated, for removal: This API element is subject to removal in a future version.allocatePseudoTerminal(String type, int cols, int rows, int width, int height, TerminalModes modes) allocatePseudoTerminal(String type, int cols, int rows, PseudoTerminalModes modes) voidchangeTerminalDimensions(int cols, int rows, int width, int height) protected byte[]executeCommand(String cmd) executeCommand(String cmd, String charset) intintintbooleanbooleanprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidonChannelRequest(String requesttype, boolean wantreply, byte[] requestdata) protected voidprotected voidprotected byte[]openChannel(byte[] requestdata) setEnvironmentVariable(String key, String val) voidsetSingleSession(boolean singleSession) Send a signal to the remote process.startSubsystem(String subsystem) Methods inherited from class com.sshtools.synergy.ssh.ChannelNG
addEventListener, canClose, checkWindowSpace, clearIdleState, close, close, close, createCache, disposeCache, evaluateWindowSpace, getChannelType, getCloseFuture, getConnection, getConnectionProtocol, getContext, getInputStream, getLastActivity, getLocalId, getLocalPacket, getLocalWindow, getMaxiumRemotePacketSize, getMaxiumRemoteWindowSize, getOpenFuture, getOutputStream, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, getTimeout, haltIncomingData, isAutoConsume, isClosed, isClosing, isConnected, isIncomingDataHalted, isLocalEOF, isOpen, isRemoteEOF, log, log, log, log, logMessage, logMessage, onChannelData, onChannelOpenFailure, onExtendedData, onRemoteClose, onWindowAdjust, processChannelRequestResponse, registerExtendedDataType, removeEventListener, resetIdleState, resumeIncomingData, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelRequest, sendChannelRequest, sendData, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust, sendWindowAdjust, setAutoconsume, setTimeout
-
Field Details
-
EXITCODE_NOT_RECEIVED
public static final int EXITCODE_NOT_RECEIVED- See Also:
-
SSH_EXTENDED_DATA_STDERR
public static final int SSH_EXTENDED_DATA_STDERR- See Also:
-
-
Constructor Details
-
AbstractSessionChannel
public AbstractSessionChannel(int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, boolean autoConsume) -
AbstractSessionChannel
public AbstractSessionChannel(int maximumPacketSize, com.sshtools.common.util.UnsignedInteger32 initialWindowSize, com.sshtools.common.util.UnsignedInteger32 maximumWindowSpace, com.sshtools.common.util.UnsignedInteger32 minimumWindowSpace, ChannelRequestFuture closeFuture, boolean autoConsume)
-
-
Method Details
-
isSingleSession
public boolean isSingleSession() -
setSingleSession
public void setSingleSession(boolean singleSession) -
onChannelFree
protected void onChannelFree()- Specified by:
onChannelFreein classChannelNG<SshClientContext>
-
createChannel
- Specified by:
createChannelin classChannelNG<SshClientContext>- Throws:
IOException
-
openChannel
- Specified by:
openChannelin classChannelNG<SshClientContext>- Throws:
WriteOperationRequestChannelOpenException
-
onChannelOpenConfirmation
protected void onChannelOpenConfirmation()- Specified by:
onChannelOpenConfirmationin classChannelNG<SshClientContext>
-
onChannelError
- Overrides:
onChannelErrorin classChannelNG<SshClientContext>
-
onChannelClosed
protected void onChannelClosed()- Specified by:
onChannelClosedin classChannelNG<SshClientContext>
-
onChannelOpen
protected void onChannelOpen()- Specified by:
onChannelOpenin classChannelNG<SshClientContext>
-
allocatePseudoTerminal
-
allocatePseudoTerminal
-
allocatePseudoTerminal
public RequestFuture allocatePseudoTerminal(String type, int cols, int rows, PseudoTerminalModes modes) -
changeTerminalDimensions
public void changeTerminalDimensions(int cols, int rows, int width, int height) -
signal
Send a signal to the remote process. A signal can be delivered to the remote process using this method, some systems may not implement signals. The signal name should be one of the following values:ABRT ALRM FPE HUP ILL INT KILL PIPE QUIT SEGV TERM USR1 USR2
- Parameters:
signal-- Returns:
- future
- Throws:
IOException
-
allocatePseudoTerminal
@Deprecated(since="3.1.2", forRemoval=true) public RequestFuture allocatePseudoTerminal(String type, int cols, int rows, int width, int height, PseudoTerminalModes modes) Deprecated, for removal: This API element is subject to removal in a future version. -
allocatePseudoTerminal
public RequestFuture allocatePseudoTerminal(String type, int cols, int rows, int width, int height, TerminalModes modes) -
setEnvironmentVariable
-
startShell
-
executeCommand
-
executeCommand
-
startSubsystem
-
onChannelClosing
protected void onChannelClosing()- Specified by:
onChannelClosingin classChannelNG<SshClientContext>
-
onChannelRequest
- Specified by:
onChannelRequestin classChannelNG<SshClientContext>
-
getExitCode
public int getExitCode() -
isFlowControlEnabled
public boolean isFlowControlEnabled() -
getExitSignalInfo
-
onRemoteEOF
protected void onRemoteEOF()- Specified by:
onRemoteEOFin classChannelNG<SshClientContext>
-
onLocalEOF
protected void onLocalEOF()- Specified by:
onLocalEOFin classChannelNG<SshClientContext>
-
getMaximumRemotePacketLength
public int getMaximumRemotePacketLength() -
getMaximumLocalPacketLength
public int getMaximumLocalPacketLength()
-