com.sshtools.j2ssh.session
Class SessionChannelClient
java.lang.Object
com.sshtools.j2ssh.connection.Channel
com.sshtools.j2ssh.connection.IOChannel
com.sshtools.j2ssh.session.SessionChannelClient
- Direct Known Subclasses:
- ScpClient.ScpChannel
public class SessionChannelClient
- extends IOChannel
- Version:
- $Revision: 1.1 $
- Author:
- $author$
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
exitCode
private java.lang.Integer exitCode
sessionType
private java.lang.String sessionType
subsystem
private SubsystemClient subsystem
localFlowControl
private boolean localFlowControl
signalListener
private SignalListener signalListener
errorMessages
private SshMessageStore errorMessages
stderr
private ChannelInputStream stderr
SessionChannelClient
public SessionChannelClient()
- Creates a new SessionChannelClient object.
getChannelOpenData
public byte[] getChannelOpenData()
- Specified by:
getChannelOpenData
in class Channel
- Returns:
getChannelConfirmationData
public byte[] getChannelConfirmationData()
- Specified by:
getChannelConfirmationData
in class Channel
- Returns:
getChannelType
public java.lang.String getChannelType()
- Specified by:
getChannelType
in class Channel
- Returns:
getMinimumWindowSpace
protected int getMinimumWindowSpace()
- Specified by:
getMinimumWindowSpace
in class Channel
- Returns:
getMaximumWindowSpace
protected int getMaximumWindowSpace()
- Specified by:
getMaximumWindowSpace
in class Channel
- Returns:
getMaximumPacketSize
protected int getMaximumPacketSize()
- Specified by:
getMaximumPacketSize
in class Channel
- Returns:
setSignalListener
public void setSignalListener(SignalListener signalListener)
- Parameters:
signalListener
-
setEnvironmentVariable
public boolean setEnvironmentVariable(java.lang.String name,
java.lang.String value)
throws java.io.IOException
- Parameters:
name
- value
-
- Returns:
-
- Throws:
java.io.IOException
requestAgentForwarding
public boolean requestAgentForwarding()
throws java.io.IOException
- Returns:
-
- Throws:
java.io.IOException
SshException
InvalidChannelException
requestX11Forwarding
public boolean requestX11Forwarding(int display,
java.lang.String cookie)
throws java.io.IOException
- Parameters:
display
- cookie
-
- Returns:
-
- Throws:
java.io.IOException
getExitCode
public java.lang.Integer getExitCode()
- Returns:
changeTerminalDimensions
public void changeTerminalDimensions(PseudoTerminal term)
throws java.io.IOException
- Parameters:
term
-
- Throws:
java.io.IOException
executeCommand
public boolean executeCommand(java.lang.String command)
throws java.io.IOException
- Parameters:
command
-
- Returns:
-
- Throws:
java.io.IOException
requestPseudoTerminal
public boolean requestPseudoTerminal(java.lang.String term,
int cols,
int rows,
int width,
int height,
java.lang.String terminalModes)
throws java.io.IOException
- Parameters:
term
- cols
- rows
- width
- height
- terminalModes
-
- Returns:
-
- Throws:
java.io.IOException
requestPseudoTerminal
public boolean requestPseudoTerminal(PseudoTerminal term)
throws java.io.IOException
- Parameters:
term
-
- Returns:
-
- Throws:
java.io.IOException
startShell
public boolean startShell()
throws java.io.IOException
- Returns:
-
- Throws:
java.io.IOException
startSubsystem
public boolean startSubsystem(java.lang.String subsystem)
throws java.io.IOException
- Parameters:
subsystem
-
- Returns:
-
- Throws:
java.io.IOException
startSubsystem
public boolean startSubsystem(SubsystemClient subsystem)
throws java.io.IOException
- Parameters:
subsystem
-
- Returns:
-
- Throws:
java.io.IOException
isLocalFlowControlEnabled
public boolean isLocalFlowControlEnabled()
- Returns:
getSessionType
public java.lang.String getSessionType()
- Returns:
setSessionType
public void setSessionType(java.lang.String sessionType)
- Parameters:
sessionType
-
getSubsystem
public SubsystemClient getSubsystem()
- Returns:
onChannelClose
protected void onChannelClose()
throws java.io.IOException
- Overrides:
onChannelClose
in class IOChannel
- Throws:
java.io.IOException
onChannelOpen
protected void onChannelOpen()
throws java.io.IOException
- Specified by:
onChannelOpen
in class Channel
- Throws:
java.io.IOException
getStderrInputStream
public java.io.InputStream getStderrInputStream()
throws java.io.IOException
- Returns:
-
- Throws:
java.io.IOException
onChannelExtData
protected void onChannelExtData(SshMsgChannelExtendedData msg)
throws java.io.IOException
- Overrides:
onChannelExtData
in class IOChannel
- Parameters:
msg
-
- Throws:
java.io.IOException
onChannelRequest
protected void onChannelRequest(java.lang.String requestType,
boolean wantReply,
byte[] requestData)
throws java.io.IOException
- Specified by:
onChannelRequest
in class Channel
- Parameters:
requestType
- wantReply
- requestData
-
- Throws:
java.io.IOException