Package com.sshtools.server
Class UnsupportedSession
java.lang.Object
com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
com.sshtools.server.SessionChannelNG
com.sshtools.server.UnsupportedSession
- All Implemented Interfaces:
com.sshtools.common.nio.IdleStateListener
,com.sshtools.common.ssh.Channel
,com.sshtools.common.ssh.SessionChannel
,com.sshtools.common.ssh.SessionChannelServer
This is a basic session that provides a message to the user to inform them
that a shell or command cannot be executed because the server does not
support an interactive session.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sshtools.synergy.ssh.ChannelNG
com.sshtools.synergy.ssh.ChannelNG.ChannelInputStream
-
Field Summary
Fields inherited from class com.sshtools.server.SessionChannelNG
command, environment, SSH_EXTENDED_DATA_STDERR, subsystem
Fields inherited from class com.sshtools.synergy.ssh.ChannelNG
cache, con, connection, localWindow, remoteWindow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
allocatePseudoTerminal
(String parm1, int parm2, int parm3, int parm4, int parm5, byte[] parm6) 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
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 boolean
executeCommand
(String cmd) protected void
protected void
processSignal
(String signal) A signal can be delivered to the process by the client.boolean
setEnvironmentVariable
(String name, String value) If the client requests that an environment variable be set this method will be invoked.protected boolean
Invoked when the user wants to start a shell.Methods inherited from class com.sshtools.server.SessionChannelNG
createChannel, disableRawMode, enableRawMode, executeCommand, getErrorStream, getMaximumWindowSpace, getMinimumWindowSpace, getSubsystem, idle, isAgentForwardingRequested, isIncomingDataHalted, isSingleSession, onChannelClosed, onChannelClosing, onChannelData, onChannelFree, onChannelOpen, onChannelOpenConfirmation, onChannelRequest, onExtendedData, onRemoteEOF, onSessionOpen, openChannel, requestAgentForwarding, sendStderrData, sendStderrData, sendStdoutData, sendStdoutData, setSingleSession, startSubsystem
Methods inherited from class com.sshtools.synergy.ssh.ChannelNG
addEventListener, canClose, checkWindowSpace, clearIdleState, close, close, close, createCache, disposeCache, evaluateWindowSpace, getChannelType, getCloseFuture, getConnection, getConnectionProtocol, getContext, getInputStream, getLastActivity, getLocalId, getLocalPacket, getLocalWindow, getMaxiumRemotePacketSize, getMaxiumRemoteWindowSize, getOpenFuture, getOutputStream, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, getTimeout, haltIncomingData, isAutoConsume, isClosed, isClosing, isConnected, isLocalEOF, isOpen, isRemoteEOF, log, log, log, log, logMessage, logMessage, onChannelError, onChannelOpenFailure, onRemoteClose, onWindowAdjust, processChannelRequestResponse, registerExtendedDataType, resetIdleState, resumeIncomingData, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelRequest, sendChannelRequest, sendData, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust, sendWindowAdjust, setTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sshtools.common.ssh.Channel
addEventListener, close, getChannelType, getContext, getLocalPacket, getLocalWindow, getRemoteWindow, isClosed, isLocalEOF, isRemoteEOF, sendChannelRequest, sendChannelRequest, sendData, sendWindowAdjust
Methods inherited from interface com.sshtools.common.ssh.SessionChannel
getConnection, getInputStream, getOutputStream, haltIncomingData, resumeIncomingData
-
Constructor Details
-
UnsupportedSession
public UnsupportedSession(com.sshtools.common.ssh.SshConnection con)
-
-
Method Details
-
executeCommand
-
startShell
protected boolean startShell()Description copied from class:SessionChannelNG
Invoked when the user wants to start a shell.- Specified by:
startShell
in classSessionChannelNG
- Returns:
- true if the shell has been started, otherwise false
-
allocatePseudoTerminal
protected boolean allocatePseudoTerminal(String parm1, int parm2, int parm3, int parm4, int parm5, byte[] parm6) Description copied from class:SessionChannelNG
If the client requests a pseudo terminal for the session this method will be invoked before the shell, exec or subsystem is started.- Specified by:
allocatePseudoTerminal
in classSessionChannelNG
- Returns:
- boolean
-
setEnvironmentVariable
Description copied from class:SessionChannelNG
If the client requests that an environment variable be set this method will be invoked.- Specified by:
setEnvironmentVariable
in interfacecom.sshtools.common.ssh.SessionChannelServer
- Specified by:
setEnvironmentVariable
in classSessionChannelNG
- Returns:
- true if the variable has been set, otherwise false
-
changeWindowDimensions
protected void changeWindowDimensions(int cols, int rows, int width, int height) Description copied from class:SessionChannelNG
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.- Specified by:
changeWindowDimensions
in classSessionChannelNG
-
onLocalEOF
protected void onLocalEOF()- Specified by:
onLocalEOF
in classcom.sshtools.synergy.ssh.ChannelNG<SshServerContext>
-
processSignal
Description copied from class:SessionChannelNG
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.- Specified by:
processSignal
in classSessionChannelNG
-