Top Description Fields Constructors Methods
org.apache.sshd.common.session.helpers

public Class ReservedSessionMessagesHandlerAdapter

extends AbstractLoggingBean
implements ReservedSessionMessagesHandler
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.session.ReservedSessionMessagesHandler, org.apache.sshd.common.util.SshdEventListener, java.util.EventListener
Imports
java.util.List, org.apache.sshd.common.SshConstants, org.apache.sshd.common.io.IoWriteFuture, org.apache.sshd.common.session.ReservedSessionMessagesHandler, .Session, org.apache.sshd.common.util.GenericUtils, org.apache.sshd.common.util.buffer.Buffer, .BufferUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

Delegates the main interface methods to specific ones after having decoded each message buffer
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final ReservedSessionMessagesHandlerAdapter
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
handleDebugMessage(Session
The Session through which the message was received
session
,
Buffer
The Buffer containing the data
buffer
)

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleDebugMessage.

Invoked when an SSH_MSG_DEBUG packet is received

public void
handleDebugMessage(Session session, boolean display, String msg, String lang, Buffer buffer)

public void
handleIgnoreMessage(Session
The Session through which the message was received
session
,
Buffer
The Buffer containing the data
buffer
)

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleIgnoreMessage.

Invoked when an SSH_MSG_IGNORE packet is received

public void
handleIgnoreMessage(Session session, byte[] data, Buffer buffer)

public boolean
handleUnimplementedMessage(Session
The Session through which the message was received
session
,
int
The received (un-implemented) command
cmd
,
Buffer
The Buffer containing the data - positioned just beyond the command
buffer
)

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleUnimplementedMessage.

Invoked when a packet with an un-implemented message is received - including SSH_MSG_UNIMPLEMENTED itself

public IoWriteFuture
sendIdentification(Session
The Session through which the version is exchange is being managed
session
,
String
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.
version
,
List<String>
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 identification
extraLines
)

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.sendIdentification.

Send the initial version exchange identification in and independent manner

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

DEFAULTback to summary
public static final ReservedSessionMessagesHandlerAdapter DEFAULT

Constructor Detail

ReservedSessionMessagesHandlerAdapterback to summary
public ReservedSessionMessagesHandlerAdapter()

Method Detail

handleDebugMessageback to summary
public void handleDebugMessage(Session session, Buffer buffer) throws Exception

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleDebugMessage.

Doc from org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleDebugMessage.

Invoked when an SSH_MSG_DEBUG packet is received

Parameters
session:Session

The Session through which the message was received

buffer:Buffer

The Buffer containing the data

Annotations
@Override
Exceptions
Exception:
If failed to handle the message
handleDebugMessageback to summary
public void handleDebugMessage(Session session, boolean display, String msg, String lang, Buffer buffer) throws Exception
handleIgnoreMessageback to summary
public void handleIgnoreMessage(Session session, Buffer buffer) throws Exception

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleIgnoreMessage.

Doc from org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleIgnoreMessage.

Invoked when an SSH_MSG_IGNORE packet is received

Parameters
session:Session

The Session through which the message was received

buffer:Buffer

The Buffer containing the data

Annotations
@Override
Exceptions
Exception:
If failed to handle the message
handleIgnoreMessageback to summary
public void handleIgnoreMessage(Session session, byte[] data, Buffer buffer) throws Exception
handleUnimplementedMessageback to summary
public boolean handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleUnimplementedMessage.

Doc from org.apache.sshd.common.session.ReservedSessionMessagesHandler.handleUnimplementedMessage.

Invoked when a packet with an un-implemented message is received - including SSH_MSG_UNIMPLEMENTED itself

Parameters
session:Session

The Session through which the message was received

cmd:int

The received (un-implemented) command

buffer:Buffer

The Buffer containing the data - positioned just beyond the command

Returns:boolean

true if message handled internally, false if should return a SSH_MSG_UNIMPLEMENTED reply (default behavior)

Annotations
@Override
Exceptions
Exception:
If failed to handle the message
sendIdentificationback to summary
public IoWriteFuture sendIdentification(Session session, String version, List<String> extraLines) throws Exception

Overrides default org.apache.sshd.common.session.ReservedSessionMessagesHandler.sendIdentification.

Doc from org.apache.sshd.common.session.ReservedSessionMessagesHandler.sendIdentification.

Send the initial version exchange identification in and independent manner

Parameters
session:Session

The Session through which the version is exchange is being managed

version:String

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:List<String>

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 identification

Returns:IoWriteFuture

A IoWriteFuture 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.

Annotations
@Override
Exceptions
Exception:
if failed to handle the callback