public class PuttyRequestHandler extends AbstractChannelRequestHandler
RequestHandler.Result| Modifier and Type | Field and Description |
|---|---|
static PuttyRequestHandler |
INSTANCE |
static Set<PtyMode> |
PUTTY_OPTIONS |
static String |
REQUEST_SUFFIX
Suffix of all PUTTY related channel requests
|
logCHANN2HNDLR| Constructor and Description |
|---|
PuttyRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isPuttyClient(Session session) |
static boolean |
isPuttyClient(String clientVersion) |
static boolean |
isPuttyRequest(String request) |
RequestHandler.Result |
process(Channel channel,
String request,
boolean wantReply,
Buffer buffer)
Process an SSH request.
|
protected RequestHandler.Result |
processPuttyOpcode(Channel channel,
String request,
String opcode,
boolean wantReply,
Buffer buffer) |
static Map<PtyMode,Integer> |
resolveShellTtyOptions(Map<PtyMode,Integer> modes) |
public static final String REQUEST_SUFFIX
public static final PuttyRequestHandler INSTANCE
public RequestHandler.Result process(Channel channel, String request, boolean wantReply, Buffer buffer) throws Exception
RequestHandlerchannel - The input parameterrequest - The request stringwantReply - Whether a reply is requestedbuffer - The Buffer with request specific dataRequestHandler.ResultException - If failed to handle the request - Note: in order to signal an unsupported request the
RequestHandler.Result.Unsupported value should be returnedprotected RequestHandler.Result processPuttyOpcode(Channel channel, String request, String opcode, boolean wantReply, Buffer buffer) throws Exception
Exceptionpublic static boolean isPuttyRequest(String request)
request - The channel request value - ignored if null/emptytrue if the request ends in REQUEST_SUFFIXpublic static boolean isPuttyClient(Session session)
session - The current Session - ignored if nulltrue if it is a PUTTY sessionSessionContext.getClientVersion(),
isPuttyClient(String)public static boolean isPuttyClient(String clientVersion)
clientVersion - The client identification string - ignored if null/emptytrue if the identification starts with the
SessionContext.DEFAULT_SSH_VERSION_PREFIX and it contains the "putty"
string (case insensitive)Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.