com.sshtools.j2ssh.session

Class SessionChannelClient


public class SessionChannelClient
extends IOChannel

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

SessionChannelClient()
Creates a new SessionChannelClient object.

Method Summary

void
changeTerminalDimensions(PseudoTerminal term)
boolean
executeCommand(String command)
byte[]
getChannelConfirmationData()
byte[]
getChannelOpenData()
String
getChannelType()
Integer
getExitCode()
protected int
getMaximumPacketSize()
protected int
getMaximumWindowSpace()
protected int
getMinimumWindowSpace()
String
getSessionType()
InputStream
getStderrInputStream()
SubsystemClient
getSubsystem()
boolean
isLocalFlowControlEnabled()
protected void
onChannelClose()
protected void
onChannelExtData(SshMsgChannelExtendedData msg)
protected void
onChannelOpen()
protected void
onChannelRequest(String requestType, boolean wantReply, byte[] requestData)
boolean
requestAgentForwarding()
boolean
requestPseudoTerminal(String term, int cols, int rows, int width, int height, String terminalModes)
boolean
requestPseudoTerminal(PseudoTerminal term)
boolean
requestX11Forwarding(int display, String cookie)
boolean
setEnvironmentVariable(String name, String value)
void
setSessionType(String sessionType)
void
setSignalListener(SignalListener signalListener)
boolean
startShell()
boolean
startSubsystem(String subsystem)
boolean
startSubsystem(SubsystemClient subsystem)

Methods inherited from class com.sshtools.j2ssh.connection.IOChannel

bindInputStream, bindOutputStream, getInputStream, getOutputStream, init, onChannelClose, onChannelData, onChannelEOF, onChannelExtData, open, setLocalEOF

Methods inherited from class com.sshtools.j2ssh.connection.Channel

addEventListener, close, finalizeClose, getChannelConfirmationData, getChannelOpenData, getChannelType, getLocalChannelId, getLocalPacketSize, getLocalWindow, getMaximumPacketSize, getMaximumWindowSpace, getMinimumWindowSpace, getName, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, onChannelClose, onChannelData, onChannelEOF, onChannelExtData, onChannelOpen, onChannelRequest, open, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setLocalEOF, setName, setRemoteEOF

Constructor Details

SessionChannelClient

public SessionChannelClient()
Creates a new SessionChannelClient object.

Method Details

changeTerminalDimensions

public void changeTerminalDimensions(PseudoTerminal term)
            throws IOException
Parameters:
term -

executeCommand

public boolean executeCommand(String command)
            throws IOException
Parameters:
command -
Returns:

getChannelConfirmationData

public byte[] getChannelConfirmationData()
Overrides:
getChannelConfirmationData in interface Channel
Returns:

getChannelOpenData

public byte[] getChannelOpenData()
Overrides:
getChannelOpenData in interface Channel
Returns:

getChannelType

public String getChannelType()
Overrides:
getChannelType in interface Channel
Returns:

getExitCode

public Integer getExitCode()
Returns:

getMaximumPacketSize

protected int getMaximumPacketSize()
Overrides:
getMaximumPacketSize in interface Channel
Returns:

getMaximumWindowSpace

protected int getMaximumWindowSpace()
Overrides:
getMaximumWindowSpace in interface Channel
Returns:

getMinimumWindowSpace

protected int getMinimumWindowSpace()
Overrides:
getMinimumWindowSpace in interface Channel
Returns:

getSessionType

public String getSessionType()
Returns:

getStderrInputStream

public InputStream getStderrInputStream()
            throws IOException
Returns:

getSubsystem

public SubsystemClient getSubsystem()
Returns:

isLocalFlowControlEnabled

public boolean isLocalFlowControlEnabled()
Returns:

onChannelClose

protected void onChannelClose()
            throws IOException
Overrides:
onChannelClose in interface IOChannel

onChannelExtData

protected void onChannelExtData(SshMsgChannelExtendedData msg)
            throws IOException
Overrides:
onChannelExtData in interface IOChannel
Parameters:
msg -

onChannelOpen

protected void onChannelOpen()
            throws IOException
Overrides:
onChannelOpen in interface Channel

onChannelRequest

protected void onChannelRequest(String requestType,
                                boolean wantReply,
                                byte[] requestData)
            throws IOException
Overrides:
onChannelRequest in interface Channel
Parameters:
requestType -
wantReply -
requestData -

requestAgentForwarding

public boolean requestAgentForwarding()
            throws IOException
Returns:

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:

requestPseudoTerminal

public boolean requestPseudoTerminal(PseudoTerminal term)
            throws IOException
Parameters:
term -
Returns:

requestX11Forwarding

public boolean requestX11Forwarding(int display,
                                    String cookie)
            throws IOException
Parameters:
display -
cookie -
Returns:

setEnvironmentVariable

public boolean setEnvironmentVariable(String name,
                                      String value)
            throws IOException
Parameters:
name -
value -
Returns:

setSessionType

public void setSessionType(String sessionType)
Parameters:
sessionType -

setSignalListener

public void setSignalListener(SignalListener signalListener)
Parameters:
signalListener -

startShell

public boolean startShell()
            throws IOException
Returns:

startSubsystem

public boolean startSubsystem(String subsystem)
            throws IOException
Parameters:
subsystem -
Returns:

startSubsystem

public boolean startSubsystem(SubsystemClient subsystem)
            throws IOException
Parameters:
subsystem -
Returns:

Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.