Class PuttyRequestHandler
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.channel.AbstractRequestHandler<Channel>
org.apache.sshd.common.channel.AbstractChannelRequestHandler
org.apache.sshd.server.channel.PuttyRequestHandler
- All Implemented Interfaces:
ChannelRequestHandler, RequestHandler<Channel>
Handles Putty specific channel requests as indicated by
Appendix F: SSH-2 names specified for
PuTTY
-
Nested Class Summary
Nested classes/interfaces inherited from interface RequestHandler
RequestHandler.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PuttyRequestHandlerstatic final StringSuffix of all PUTTY related channel requestsFields inherited from class AbstractLoggingBean
logFields inherited from interface ChannelRequestHandler
CHANN2HNDLR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPuttyClient(String clientVersion) static booleanisPuttyClient(Session session) static booleanisPuttyRequest(String request) Process an SSH request.protected RequestHandler.ResultprocessPuttyOpcode(Channel channel, String request, String opcode, boolean wantReply, Buffer buffer) resolveShellTtyOptions(Map<PtyMode, Integer> modes)
-
Field Details
-
REQUEST_SUFFIX
-
PUTTY_OPTIONS
-
INSTANCE
-
-
Constructor Details
-
PuttyRequestHandler
public PuttyRequestHandler()
-
-
Method Details
-
process
public RequestHandler.Result process(Channel channel, String request, boolean wantReply, Buffer buffer) throws Exception Description copied from interface:RequestHandlerProcess an SSH request. If an exception is thrown, the ConnectionService will send a failure message if needed and the request will be considered handled.- Parameters:
channel- The input parameterrequest- The request stringwantReply- Whether a reply is requestedbuffer- TheBufferwith request specific data- Returns:
- The
RequestHandler.Result - Throws:
Exception- If failed to handle the request - Note: in order to signal an unsupported request theRequestHandler.Result.Unsupportedvalue should be returned
-
processPuttyOpcode
-
isPuttyRequest
- Parameters:
request- The channel request value - ignored ifnull/empty- Returns:
trueif the request ends inREQUEST_SUFFIX
-
isPuttyClient
-
isPuttyClient
- Parameters:
clientVersion- The client identification string - ignored ifnull/empty- Returns:
trueif the identification starts with theSessionContext.DEFAULT_SSH_VERSION_PREFIXand it contains the "putty" string (case insensitive)
-
resolveShellTtyOptions
-