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.String
SESSION_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.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
-
-
-
-
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 ConfigurationException
Creates 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:
onChannelClose
in classIOChannel
- Throws:
java.io.IOException
-
onChannelEOF
protected void onChannelEOF() throws java.io.IOException
- Overrides:
onChannelEOF
in 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:
onChannelOpen
in 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:
getChannelOpenData
in classChannel
- Returns:
-
getChannelConfirmationData
public byte[] getChannelConfirmationData()
- Specified by:
getChannelConfirmationData
in classChannel
- Returns:
-
getMinimumWindowSpace
protected int getMinimumWindowSpace()
- Specified by:
getMinimumWindowSpace
in classChannel
- Returns:
-
getMaximumWindowSpace
protected int getMaximumWindowSpace()
- Specified by:
getMaximumWindowSpace
in classChannel
- Returns:
-
getMaximumPacketSize
protected int getMaximumPacketSize()
- Specified by:
getMaximumPacketSize
in classChannel
- Returns:
-
getChannelType
public java.lang.String getChannelType()
- Specified by:
getChannelType
in classChannel
- Returns:
-
onChannelRequest
protected void onChannelRequest(java.lang.String requestType, boolean wantReply, byte[] requestData) throws java.io.IOException
- Specified by:
onChannelRequest
in classChannel
- Parameters:
requestType
-wantReply
-requestData
-- Throws:
java.io.IOException
-
-