Class ReservedSessionMessagesHandlerAdapter
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter
- All Implemented Interfaces:
EventListener
,ReservedSessionMessagesHandler
,SshdEventListener
public class ReservedSessionMessagesHandlerAdapter
extends AbstractLoggingBean
implements ReservedSessionMessagesHandler
Delegates the main interface methods to specific ones after having decoded each message buffer
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleDebugMessage
(Session session, boolean display, String msg, String lang, Buffer buffer) void
handleDebugMessage
(Session session, Buffer buffer) Invoked when anSSH_MSG_DEBUG
packet is receivedvoid
handleIgnoreMessage
(Session session, byte[] data, Buffer buffer) void
handleIgnoreMessage
(Session session, Buffer buffer) Invoked when anSSH_MSG_IGNORE
packet is receivedboolean
handleUnimplementedMessage
(Session session, int cmd, Buffer buffer) Invoked when a packet with an un-implemented message is received - includingSSH_MSG_UNIMPLEMENTED
itselfsendIdentification
(Session session, String version, List<String> extraLines) Send the initial version exchange identification in and independent mannerMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.session.ReservedSessionMessagesHandler
sendKexInitRequest, sendReservedHeartbeat
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
ReservedSessionMessagesHandlerAdapter
public ReservedSessionMessagesHandlerAdapter()
-
-
Method Details
-
sendIdentification
public IoWriteFuture sendIdentification(Session session, String version, List<String> extraLines) throws Exception Description copied from interface:ReservedSessionMessagesHandler
Send the initial version exchange identification in and independent manner- Specified by:
sendIdentification
in interfaceReservedSessionMessagesHandler
- Parameters:
session
- TheSession
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 returnnull
thus signaling the session to proceed with sending the identification- Returns:
- A
IoWriteFuture
that can be used to wait for the data to be sent successfully. Ifnull
then the session will send the identification, otherwise it is assumed that the handler has sent it. - Throws:
Exception
- if failed to handle the callback- See Also:
-
handleIgnoreMessage
Description copied from interface:ReservedSessionMessagesHandler
Invoked when anSSH_MSG_IGNORE
packet is received- Specified by:
handleIgnoreMessage
in interfaceReservedSessionMessagesHandler
- Parameters:
session
- TheSession
through which the message was receivedbuffer
- TheBuffer
containing the data- Throws:
Exception
- If failed to handle the message- See Also:
-
handleIgnoreMessage
- Throws:
Exception
-
handleDebugMessage
Description copied from interface:ReservedSessionMessagesHandler
Invoked when anSSH_MSG_DEBUG
packet is received- Specified by:
handleDebugMessage
in interfaceReservedSessionMessagesHandler
- Parameters:
session
- TheSession
through which the message was receivedbuffer
- TheBuffer
containing the data- Throws:
Exception
- If failed to handle the message- See Also:
-
handleDebugMessage
public void handleDebugMessage(Session session, boolean display, String msg, String lang, Buffer buffer) throws Exception - Throws:
Exception
-
handleUnimplementedMessage
Description copied from interface:ReservedSessionMessagesHandler
Invoked when a packet with an un-implemented message is received - includingSSH_MSG_UNIMPLEMENTED
itself- Specified by:
handleUnimplementedMessage
in interfaceReservedSessionMessagesHandler
- Parameters:
session
- TheSession
through which the message was receivedcmd
- The received (un-implemented) commandbuffer
- TheBuffer
containing the data - positioned just beyond the command- Returns:
true
if message handled internally,false
if should return aSSH_MSG_UNIMPLEMENTED
reply (default behavior)- Throws:
Exception
- If failed to handle the message- See Also:
-