Package com.sshtools.j2ssh.session
Class SessionChannelClient
java.lang.Object
com.sshtools.j2ssh.connection.Channel
com.sshtools.j2ssh.connection.IOChannel
com.sshtools.j2ssh.session.SessionChannelClient
- Version:
- $Revision: 1.52 $
- Author:
- $author$
-
Field Summary
Fields inherited from class com.sshtools.j2ssh.connection.IOChannel
boundInputStream, boundOutputStream, in, ios, out
Fields inherited from class com.sshtools.j2ssh.connection.Channel
connection, localChannelId, localPacketSize, localWindow, remoteChannelId, remotePacketSize, remoteWindow, state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
executeCommand
(String command) byte[]
byte[]
protected int
protected int
protected int
boolean
protected void
protected void
protected void
protected void
onChannelRequest
(String requestType, boolean wantReply, byte[] requestData) boolean
boolean
boolean
requestPseudoTerminal
(String term, int cols, int rows, int width, int height, String terminalModes) boolean
requestX11Forwarding
(int display, String cookie) boolean
setEnvironmentVariable
(String name, String value) void
setSessionType
(String sessionType) void
setSignalListener
(SignalListener signalListener) boolean
boolean
startSubsystem
(SubsystemClient subsystem) boolean
startSubsystem
(String subsystem) Methods inherited from class com.sshtools.j2ssh.connection.IOChannel
bindInputStream, bindOutputStream, getInputStream, getOutputStream, init, onChannelData, onChannelEOF, open, setLocalEOF
Methods inherited from class com.sshtools.j2ssh.connection.Channel
addEventListener, close, finalizeClose, getLocalChannelId, getLocalPacketSize, getLocalWindow, getName, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setName, setRemoteEOF
-
Constructor Details
-
SessionChannelClient
public SessionChannelClient()Creates a new SessionChannelClient object.
-
-
Method Details
-
getChannelOpenData
public byte[] getChannelOpenData()- Specified by:
getChannelOpenData
in classChannel
- Returns:
-
getChannelConfirmationData
public byte[] getChannelConfirmationData()- Specified by:
getChannelConfirmationData
in classChannel
- Returns:
-
getChannelType
- Specified by:
getChannelType
in classChannel
- Returns:
-
getMinimumWindowSpace
protected int getMinimumWindowSpace()- Specified by:
getMinimumWindowSpace
in classChannel
- Returns:
-
getMaximumWindowSpace
protected int getMaximumWindowSpace()- Specified by:
getMaximumWindowSpace
in classChannel
- Returns:
-
getMaximumPacketSize
protected int getMaximumPacketSize()- Specified by:
getMaximumPacketSize
in classChannel
- Returns:
-
setSignalListener
- Parameters:
signalListener
-
-
setEnvironmentVariable
- Parameters:
name
-value
-- Returns:
- Throws:
IOException
-
requestAgentForwarding
- Returns:
- Throws:
IOException
SshException
InvalidChannelException
-
requestX11Forwarding
- Parameters:
display
-cookie
-- Returns:
- Throws:
IOException
-
getExitCode
- Returns:
-
changeTerminalDimensions
- Parameters:
term
-- Throws:
IOException
-
executeCommand
- Parameters:
command
-- Returns:
- Throws:
IOException
-
requestPseudoTerminal
public boolean requestPseudoTerminal(String term, int cols, int rows, int width, int height, String terminalModes) throws IOException - Parameters:
term
-cols
-rows
-width
-height
-terminalModes
-- Returns:
- Throws:
IOException
-
requestPseudoTerminal
- Parameters:
term
-- Returns:
- Throws:
IOException
-
startShell
- Returns:
- Throws:
IOException
-
startSubsystem
- Parameters:
subsystem
-- Returns:
- Throws:
IOException
-
startSubsystem
- Parameters:
subsystem
-- Returns:
- Throws:
IOException
-
isLocalFlowControlEnabled
public boolean isLocalFlowControlEnabled()- Returns:
-
getSessionType
- Returns:
-
setSessionType
- Parameters:
sessionType
-
-
getSubsystem
- Returns:
-
onChannelClose
- Overrides:
onChannelClose
in classIOChannel
- Throws:
IOException
-
onChannelOpen
- Specified by:
onChannelOpen
in classChannel
- Throws:
IOException
-
getStderrInputStream
- Returns:
- Throws:
IOException
-
onChannelExtData
- Overrides:
onChannelExtData
in classIOChannel
- Parameters:
msg
-- Throws:
IOException
-
onChannelRequest
protected void onChannelRequest(String requestType, boolean wantReply, byte[] requestData) throws IOException - Specified by:
onChannelRequest
in classChannel
- Parameters:
requestType
-wantReply
-requestData
-- Throws:
IOException
-