public class ProxySession extends SessionChannel
Channel.DataBlock, Channel.QueuedData
Modifier and Type | Field and Description |
---|---|
protected Connection |
con |
protected com.maverick.ssh.SshSession |
session |
protected com.maverick.ssh.SshClient |
ssh |
protected com.maverick.ssh2.Ssh2Session |
ssh2Session |
CHANNEL_TYPE, maximumWindowSpace, minimumWindowSpace, SSH_EXTENDED_DATA_STDERR
connection, localwindow, localWindowLock
Constructor and Description |
---|
ProxySession(Connection con) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allocatePseudoTerminal(String terms,
int cols,
int rows,
int width,
int height,
byte[] modes)
If the client requests a pseudo terminal for the session this method will
be invoked before the shell, exec or subsystem is started.
|
protected void |
beforeChannelOpen() |
protected void |
changeWindowDimensions(int cols,
int rows,
int width,
int height)
When the window (terminal) size changes on the client side, it MAY send
notification in which case this method will be invoked to notify the
session that a change has occurred.
|
protected void |
ensureChannelOpen() |
protected boolean |
executeCommand(String command)
Invoked when the user wants to execute a command
|
protected void |
onChannelClosed()
Called when the channel has been closed to enable resources to be freed.
|
protected void |
onLocalEOF()
Called when the local side is EOF.
|
protected void |
onRemoteEOF()
The remote side has reported EOF so no more data will be received.
|
protected void |
onSessionOpen()
Called once the session is open and data can be sent/received.
|
protected void |
processSignal(String signal)
A signal can be delivered to the process by the client.
|
protected void |
processStdinData(byte[] data)
Data has arrived on the session's stdin stream.
|
protected boolean |
setEnvironmentVariable(String name,
String value)
If the client requests that an environment variable be set this method
will be invoked.
|
protected boolean |
startShell()
Invoked when the user wants to start a shell.
|
protected boolean |
startSubsystem(String name) |
close, createChannel, evaluateWindowSpace, executeTask, getMaximumWindowSpace, getMinimumWindowSpace, getSubsystem, haltIncomingData, idle, isAgentForwardingRequested, isIncomingDataHalted, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelRequest, onExtendedData, openChannel, requestAgentForwarding, resumeIncomingData, sendExitStatus, sendStderrData, sendStderrData, sendStdoutData, sendStdoutData, setMaximumWindowSpace, setMinimumWindowSpace
addEventListener, addInputListener, addOutputListener, canClose, clearIdleState, close, consumeWindowSpace, createCloseTask, getChannelType, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, isClosed, isClosing, isEOF, isOpen, isSelfManagedWindowSpace, markEOF, onChannelOpenFailure, onRemoteClose, onWindowAdjust, queueSize, registerExtendedData, resetIdleState, sendChannelData, sendChannelData, sendChannelData, sendChannelData, sendChannelDataAndBlock, sendChannelRequest, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust
protected com.maverick.ssh.SshSession session
protected com.maverick.ssh2.Ssh2Session ssh2Session
protected com.maverick.ssh.SshClient ssh
protected Connection con
public ProxySession(Connection con) throws SshException
SshException
protected void ensureChannelOpen()
protected void beforeChannelOpen()
protected boolean allocatePseudoTerminal(String terms, int cols, int rows, int width, int height, byte[] modes)
SessionChannel
allocatePseudoTerminal
in class SessionChannel
protected void changeWindowDimensions(int cols, int rows, int width, int height)
SessionChannel
changeWindowDimensions
in class SessionChannel
protected boolean executeCommand(String command)
SessionChannel
executeCommand
in class SessionChannel
protected boolean startSubsystem(String name)
startSubsystem
in class SessionChannel
protected void onSessionOpen()
SessionChannel
onSessionOpen
in class SessionChannel
protected void processSignal(String signal)
SessionChannel
processSignal
in class SessionChannel
protected void processStdinData(byte[] data)
SessionChannel
processStdinData
in class SessionChannel
protected boolean setEnvironmentVariable(String name, String value)
SessionChannel
setEnvironmentVariable
in class SessionChannel
protected boolean startShell()
SessionChannel
startShell
in class SessionChannel
protected void onChannelClosed()
Channel
onChannelClosed
in class Channel
protected void onRemoteEOF()
SessionChannel
onRemoteEOF
in class SessionChannel
protected void onLocalEOF()
Channel
onLocalEOF
in class Channel
Copyright © 2024. All rights reserved.