Package com.sshtools.common.shell
Interface ShellListener
public interface ShellListener
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallocatePseudoTerminal(String term, 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.voidchangeWindowDimensions(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.voidprocessSignal(String signal) A signal can be delivered to the process by the client.booleansetEnvironmentVariable(String name, String value) If the client requests that an environment variable be set this method will be invoked.
-
Method Details
-
allocatePseudoTerminal
boolean allocatePseudoTerminal(String term, 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.- Parameters:
term-cols-rows-width-height-modes-- Returns:
- boolean
-
changeWindowDimensions
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.- Parameters:
cols-rows-width-height-
-
processSignal
A signal can be delivered to the process by the client. If a signal is received this method will be invoked so that the session may evaluate and take the required action.- Parameters:
signal-
-
setEnvironmentVariable
If the client requests that an environment variable be set this method will be invoked.- Parameters:
name-value-- Returns:
- true if the variable has been set, otherwise false
-