com.sshtools.daemon.session
Class SessionChannelServer
java.lang.Object
com.sshtools.j2ssh.connection.Channel
com.sshtools.j2ssh.connection.IOChannel
com.sshtools.daemon.session.SessionChannelServer
public class SessionChannelServer
- extends IOChannel
- Version:
- $Revision: 1.1 $
- Author:
- $author$
Method Summary |
private void |
bindStderrInputStream(java.io.InputStream stderrIn)
|
byte[] |
getChannelConfirmationData()
|
byte[] |
getChannelOpenData()
|
java.lang.String |
getChannelType()
|
protected int |
getMaximumPacketSize()
|
protected int |
getMaximumWindowSpace()
|
protected int |
getMinimumWindowSpace()
|
protected void |
onChangeTerminalDimensions(int cols,
int rows,
int width,
int height)
|
protected void |
onChannelClose()
|
protected void |
onChannelEOF()
|
protected void |
onChannelExtData(byte[] data)
|
protected void |
onChannelOpen()
|
protected void |
onChannelRequest(java.lang.String requestType,
boolean wantReply,
byte[] requestData)
|
protected boolean |
onExecuteCommand(java.lang.String command)
|
protected boolean |
onRequestPseudoTerminal(java.lang.String term,
int cols,
int rows,
int width,
int height,
java.lang.String modes)
|
protected void |
onSetEnvironmentVariable(java.lang.String name,
java.lang.String value)
|
protected boolean |
onStartShell()
|
protected boolean |
onStartSubsystem(java.lang.String subsystem)
|
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
SESSION_CHANNEL_TYPE
public static final java.lang.String SESSION_CHANNEL_TYPE
- See Also:
- Constant Field Values
allowedSubsystems
private static java.util.Map allowedSubsystems
environment
private java.util.Map environment
processInstance
private NativeProcessProvider processInstance
subsystemInstance
private SubsystemServer subsystemInstance
thread
private java.lang.Thread thread
ios
private IOStreamConnector ios
stderrOut
private ChannelOutputStream stderrOut
stderrIn
private java.io.InputStream stderrIn
processMonitor
private SessionChannelServer.ProcessMonitorThread processMonitor
pty
private PseudoTerminalWrapper pty
agent
private SshAgentForwardingListener agent
config
private ServerConfiguration config
SessionChannelServer
public SessionChannelServer()
throws ConfigurationException
- Creates a new SessionChannelServer object.
- Throws:
ConfigurationException
bindStderrInputStream
private void bindStderrInputStream(java.io.InputStream stderrIn)
onChangeTerminalDimensions
protected void onChangeTerminalDimensions(int cols,
int rows,
int width,
int height)
- Parameters:
cols
- rows
- width
- height
-
onChannelClose
protected void onChannelClose()
throws java.io.IOException
- Overrides:
onChannelClose
in class IOChannel
- Throws:
java.io.IOException
onChannelEOF
protected void onChannelEOF()
throws java.io.IOException
- Overrides:
onChannelEOF
in class IOChannel
- Throws:
java.io.IOException
onChannelExtData
protected void onChannelExtData(byte[] data)
throws java.io.IOException
- Parameters:
data
-
- Throws:
java.io.IOException
onChannelOpen
protected void onChannelOpen()
throws InvalidChannelException
- Specified by:
onChannelOpen
in class Channel
- Throws:
InvalidChannelException
onExecuteCommand
protected boolean onExecuteCommand(java.lang.String command)
throws java.io.IOException
- Parameters:
command
-
- Returns:
-
- Throws:
java.io.IOException
onRequestPseudoTerminal
protected boolean onRequestPseudoTerminal(java.lang.String term,
int cols,
int rows,
int width,
int height,
java.lang.String modes)
- Parameters:
term
- cols
- rows
- width
- height
- modes
-
- Returns:
onSetEnvironmentVariable
protected void onSetEnvironmentVariable(java.lang.String name,
java.lang.String value)
- Parameters:
name
- value
-
onStartShell
protected boolean onStartShell()
throws java.io.IOException
- Returns:
-
- Throws:
java.io.IOException
onStartSubsystem
protected boolean onStartSubsystem(java.lang.String subsystem)
- Parameters:
subsystem
-
- Returns:
getChannelOpenData
public byte[] getChannelOpenData()
- Specified by:
getChannelOpenData
in class Channel
- Returns:
getChannelConfirmationData
public byte[] getChannelConfirmationData()
- Specified by:
getChannelConfirmationData
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:
getChannelType
public java.lang.String getChannelType()
- Specified by:
getChannelType
in class Channel
- Returns:
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