public class ReservedSessionMessagesHandlerAdapter extends AbstractLoggingBean implements ReservedSessionMessagesHandler
Modifier and Type | Field and Description |
---|---|
static ReservedSessionMessagesHandlerAdapter |
DEFAULT |
log
Constructor and Description |
---|
ReservedSessionMessagesHandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
handleDebugMessage(Session session,
boolean display,
String msg,
String lang,
Buffer buffer) |
void |
handleDebugMessage(Session session,
Buffer buffer)
Invoked when an
SSH_MSG_DEBUG packet is received |
void |
handleIgnoreMessage(Session session,
Buffer buffer)
Invoked when an
SSH_MSG_IGNORE packet is received |
void |
handleIgnoreMessage(Session session,
byte[] data,
Buffer buffer) |
boolean |
handleUnimplementedMessage(Session session,
int cmd,
Buffer buffer)
Invoked when a packet with an un-implemented message is received - including
SSH_MSG_UNIMPLEMENTED itself |
IoWriteFuture |
sendIdentification(Session session,
String version,
List<String> extraLines)
Send the initial version exchange identification in and independent manner
|
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sendKexInitRequest, sendReservedHeartbeat
validateListener
public static final ReservedSessionMessagesHandlerAdapter DEFAULT
public ReservedSessionMessagesHandlerAdapter()
public IoWriteFuture sendIdentification(Session session, String version, List<String> extraLines) throws Exception
ReservedSessionMessagesHandler
sendIdentification
in interface ReservedSessionMessagesHandler
session
- The Session
through which the version is exchange is being managedversion
- The version line that was resolved - Note: since this string is part of the KEX and is
cached in the calling session, any changes to it require updating the session's cached
value.extraLines
- Extra lines to be sent - valid only for server sessions. Note:/B> the handler may modify
these lines and return null
thus signaling the session to proceed with sending the
identificationIoWriteFuture
that can be used to wait for the data to be sent successfully. If
null
then the session will send the identification, otherwise it is assumed that the
handler has sent it.Exception
- if failed to handle the callbackpublic void handleIgnoreMessage(Session session, Buffer buffer) throws Exception
ReservedSessionMessagesHandler
SSH_MSG_IGNORE
packet is receivedhandleIgnoreMessage
in interface ReservedSessionMessagesHandler
session
- The Session
through which the message was receivedbuffer
- The Buffer
containing the dataException
- If failed to handle the messagepublic void handleIgnoreMessage(Session session, byte[] data, Buffer buffer) throws Exception
Exception
public void handleDebugMessage(Session session, Buffer buffer) throws Exception
ReservedSessionMessagesHandler
SSH_MSG_DEBUG
packet is receivedhandleDebugMessage
in interface ReservedSessionMessagesHandler
session
- The Session
through which the message was receivedbuffer
- The Buffer
containing the dataException
- If failed to handle the messagepublic void handleDebugMessage(Session session, boolean display, String msg, String lang, Buffer buffer) throws Exception
Exception
public boolean handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception
ReservedSessionMessagesHandler
SSH_MSG_UNIMPLEMENTED
itselfhandleUnimplementedMessage
in interface ReservedSessionMessagesHandler
session
- The Session
through which the message was receivedcmd
- The received (un-implemented) commandbuffer
- The Buffer
containing the data - positioned just beyond the commandtrue
if message handled internally, false
if should return a
SSH_MSG_UNIMPLEMENTED
reply (default behavior)Exception
- If failed to handle the messageCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.