Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sshtools.daemon.session
Class SessionChannelServer  view SessionChannelServer download SessionChannelServer.java

java.lang.Object
  extended bycom.sshtools.j2ssh.connection.Channel
      extended bycom.sshtools.j2ssh.connection.IOChannel
          extended bycom.sshtools.daemon.session.SessionChannelServer

public class SessionChannelServer
extends com.sshtools.j2ssh.connection.IOChannel

Version:
$Revision: 1.16 $

Nested Class Summary
(package private)  class SessionChannelServer.ProcessMonitorThread
           
 
Field Summary
private  com.sshtools.j2ssh.agent.SshAgentForwardingListener agent
           
private static java.util.Map allowedSubsystems
           
private  com.sshtools.daemon.configuration.ServerConfiguration config
           
private  java.util.Map environment
           
private  com.sshtools.j2ssh.io.IOStreamConnector ios
           
private static org.apache.commons.logging.Log log
           
private  com.sshtools.daemon.platform.NativeProcessProvider processInstance
           
private  SessionChannelServer.ProcessMonitorThread processMonitor
           
private  PseudoTerminalWrapper pty
           
static java.lang.String SESSION_CHANNEL_TYPE
           
private  java.io.InputStream stderrIn
           
private  com.sshtools.j2ssh.connection.ChannelOutputStream stderrOut
           
private  com.sshtools.daemon.subsystem.SubsystemServer subsystemInstance
           
private  java.lang.Thread thread
           
 
Fields inherited from class com.sshtools.j2ssh.connection.IOChannel
boundInputStream, boundOutputStream, in, out
 
Fields inherited from class com.sshtools.j2ssh.connection.Channel
connection, localChannelId, localPacketSize, localWindow, remoteChannelId, remotePacketSize, remoteWindow, state
 
Constructor Summary
SessionChannelServer()
          Creates a new SessionChannelServer object.
 
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.IOChannel
bindInputStream, bindOutputStream, getInputStream, getOutputStream, init, onChannelData, onChannelExtData, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 com.sshtools.daemon.platform.NativeProcessProvider processInstance

subsystemInstance

private com.sshtools.daemon.subsystem.SubsystemServer subsystemInstance

thread

private java.lang.Thread thread

ios

private com.sshtools.j2ssh.io.IOStreamConnector ios

stderrOut

private com.sshtools.j2ssh.connection.ChannelOutputStream stderrOut

stderrIn

private java.io.InputStream stderrIn

processMonitor

private SessionChannelServer.ProcessMonitorThread processMonitor

pty

private PseudoTerminalWrapper pty

agent

private com.sshtools.j2ssh.agent.SshAgentForwardingListener agent

config

private com.sshtools.daemon.configuration.ServerConfiguration config
Constructor Detail

SessionChannelServer

public SessionChannelServer()
                     throws com.sshtools.j2ssh.configuration.ConfigurationException
Creates a new SessionChannelServer object.

Method Detail

bindStderrInputStream

private void bindStderrInputStream(java.io.InputStream stderrIn)

onChangeTerminalDimensions

protected void onChangeTerminalDimensions(int cols,
                                          int rows,
                                          int width,
                                          int height)

onChannelClose

protected void onChannelClose()
                       throws java.io.IOException

onChannelEOF

protected void onChannelEOF()
                     throws java.io.IOException

onChannelExtData

protected void onChannelExtData(byte[] data)
                         throws java.io.IOException

onChannelOpen

protected void onChannelOpen()
                      throws com.sshtools.j2ssh.connection.InvalidChannelException

onExecuteCommand

protected boolean onExecuteCommand(java.lang.String command)
                            throws java.io.IOException

onRequestPseudoTerminal

protected boolean onRequestPseudoTerminal(java.lang.String term,
                                          int cols,
                                          int rows,
                                          int width,
                                          int height,
                                          java.lang.String modes)

onSetEnvironmentVariable

protected void onSetEnvironmentVariable(java.lang.String name,
                                        java.lang.String value)

onStartShell

protected boolean onStartShell()
                        throws java.io.IOException

onStartSubsystem

protected boolean onStartSubsystem(java.lang.String subsystem)

getChannelOpenData

public byte[] getChannelOpenData()

getChannelConfirmationData

public byte[] getChannelConfirmationData()

getMinimumWindowSpace

protected int getMinimumWindowSpace()

getMaximumWindowSpace

protected int getMaximumWindowSpace()

getMaximumPacketSize

protected int getMaximumPacketSize()

getChannelType

public java.lang.String getChannelType()

onChannelRequest

protected void onChannelRequest(java.lang.String requestType,
                                boolean wantReply,
                                byte[] requestData)
                         throws java.io.IOException