Package 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.16 $
- Author:
- $author$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSESSION_CHANNEL_TYPE-
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
Constructors Constructor Description SessionChannelServer()Creates a new SessionChannelServer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getChannelConfirmationData()byte[]getChannelOpenData()java.lang.StringgetChannelType()protected intgetMaximumPacketSize()protected intgetMaximumWindowSpace()protected intgetMinimumWindowSpace()protected voidonChangeTerminalDimensions(int cols, int rows, int width, int height)protected voidonChannelClose()protected voidonChannelEOF()protected voidonChannelExtData(byte[] data)protected voidonChannelOpen()protected voidonChannelRequest(java.lang.String requestType, boolean wantReply, byte[] requestData)protected booleanonExecuteCommand(java.lang.String command)protected booleanonRequestPseudoTerminal(java.lang.String term, int cols, int rows, int width, int height, java.lang.String modes)protected voidonSetEnvironmentVariable(java.lang.String name, java.lang.String value)protected booleanonStartShell()protected booleanonStartSubsystem(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
-
-
-
-
Field Detail
-
SESSION_CHANNEL_TYPE
public static final java.lang.String SESSION_CHANNEL_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionChannelServer
public SessionChannelServer() throws ConfigurationExceptionCreates a new SessionChannelServer object.- Throws:
ConfigurationException
-
-
Method Detail
-
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:
onChannelClosein classIOChannel- Throws:
java.io.IOException
-
onChannelEOF
protected void onChannelEOF() throws java.io.IOException- Overrides:
onChannelEOFin classIOChannel- 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:
onChannelOpenin classChannel- 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:
getChannelOpenDatain classChannel- Returns:
-
getChannelConfirmationData
public byte[] getChannelConfirmationData()
- Specified by:
getChannelConfirmationDatain classChannel- Returns:
-
getMinimumWindowSpace
protected int getMinimumWindowSpace()
- Specified by:
getMinimumWindowSpacein classChannel- Returns:
-
getMaximumWindowSpace
protected int getMaximumWindowSpace()
- Specified by:
getMaximumWindowSpacein classChannel- Returns:
-
getMaximumPacketSize
protected int getMaximumPacketSize()
- Specified by:
getMaximumPacketSizein classChannel- Returns:
-
getChannelType
public java.lang.String getChannelType()
- Specified by:
getChannelTypein classChannel- Returns:
-
onChannelRequest
protected void onChannelRequest(java.lang.String requestType, boolean wantReply, byte[] requestData) throws java.io.IOException- Specified by:
onChannelRequestin classChannel- Parameters:
requestType-wantReply-requestData-- Throws:
java.io.IOException
-
-