Package org.apache.sshd.server.channel
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 org.apache.sshd.common.channel.RequestHandler
RequestHandler.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PuttyRequestHandlerstatic final StringSuffix of all PUTTY related channel requestsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.channel.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
Suffix of all PUTTY related channel requests- See Also:
-
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
protected RequestHandler.Result processPuttyOpcode(Channel channel, String request, String opcode, boolean wantReply, Buffer buffer) throws Exception - Throws:
Exception
-
isPuttyRequest
- Parameters:
request- The channel request value - ignored ifnull/empty- Returns:
trueif the request ends inREQUEST_SUFFIX
-
isPuttyClient
- Parameters:
session- The currentSession- ignored ifnull- Returns:
trueif it is a PUTTY session- See Also:
-
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
-