com.maverick.sshd
Class SshTransport

java.lang.Object
  extended by com.maverick.sshd.SshTransport
All Implemented Interfaces:
org.apache.mina.core.service.IoHandler

public class SshTransport
extends Object
implements org.apache.mina.core.service.IoHandler


Field Summary
static int AUTH_CANCELLED_BY_USER
          Disconnect reason: Authentication was cancelled
static int BY_APPLICATION
          Disconnect reason: The application disconnected
static String CHARSET_ENCODING
          Character set encoding.
static int COMPRESSION_ERROR
          Disconnect reason: A compression error occurred
static int CONNECTION_LOST
          Disconnect reason: The connection was lost
static int HOST_KEY_NOT_VERIFIABLE
          Disconnect reason: The host key supplied could not be verified
static int HOST_NOT_ALLOWED
          Disconnect reason: The host is not allowed
static int ILLEGAL_USER_NAME
          Disconnect reason: The user's name is illegal
static int KEY_EXCHANGE_FAILED
          Disconnect reason: Key exchange failed
static int MAC_ERROR
          Disconnect reason: An error occurred verifying the MAC
static int NO_MORE_AUTH_METHODS_AVAILABLE
          Disconnect reason: No more authentication methods are available
static int numberOfConnections
           
static int PROTOCOL_ERROR
          Disconnect reason: A protocol error occurred
static int PROTOCOL_VERSION_NOT_SUPPORTED
          Disconnect reason: The protocol version is not supported
static int RESERVED
          Disconnect reason: Reserved
static int SERVICE_NOT_AVAILABLE
          Disconnect reason: The requested service is not available
static int TOO_MANY_CONNECTIONS
          Disconnect reason: Too many connections, try later
 
Constructor Summary
SshTransport(SshContextFactory contextFactory, org.apache.mina.core.service.IoAcceptor socketAcceptor)
           
 
Method Summary
 boolean bindRemoteForwardingInterface(RemoteForwardingListeningInterface li)
           
 void disconnect(org.apache.mina.core.session.IoSession session, int reason, String description)
          Disconnect from the remote host.
 void exceptionCaught(org.apache.mina.core.session.IoSession session, Throwable cause)
           
 void messageReceived(org.apache.mina.core.session.IoSession session, Object message)
           
 void messageSent(org.apache.mina.core.session.IoSession session, Object message)
           
 boolean processSSHTransportMessage(org.apache.mina.core.session.IoSession session, Object message)
           
 void sendNewKeys(org.apache.mina.core.session.IoSession session)
           
 void sessionClosed(org.apache.mina.core.session.IoSession session)
           
 void sessionCreated(org.apache.mina.core.session.IoSession session)
           
 void sessionIdle(org.apache.mina.core.session.IoSession session, org.apache.mina.core.session.IdleStatus status)
           
 void sessionOpened(org.apache.mina.core.session.IoSession session)
           
 void startService(org.apache.mina.core.session.IoSession session, ConnectionProtocol connectionProtocol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHARSET_ENCODING

public static String CHARSET_ENCODING
Character set encoding. All input/output strings created by the API are created with this encoding. The default is "UTF-8" and it may be changed, the results however are unknown.


HOST_NOT_ALLOWED

public static final int HOST_NOT_ALLOWED
Disconnect reason: The host is not allowed

See Also:
Constant Field Values

PROTOCOL_ERROR

public static final int PROTOCOL_ERROR
Disconnect reason: A protocol error occurred

See Also:
Constant Field Values

KEY_EXCHANGE_FAILED

public static final int KEY_EXCHANGE_FAILED
Disconnect reason: Key exchange failed

See Also:
Constant Field Values

RESERVED

public static final int RESERVED
Disconnect reason: Reserved

See Also:
Constant Field Values

MAC_ERROR

public static final int MAC_ERROR
Disconnect reason: An error occurred verifying the MAC

See Also:
Constant Field Values

COMPRESSION_ERROR

public static final int COMPRESSION_ERROR
Disconnect reason: A compression error occurred

See Also:
Constant Field Values

SERVICE_NOT_AVAILABLE

public static final int SERVICE_NOT_AVAILABLE
Disconnect reason: The requested service is not available

See Also:
Constant Field Values

PROTOCOL_VERSION_NOT_SUPPORTED

public static final int PROTOCOL_VERSION_NOT_SUPPORTED
Disconnect reason: The protocol version is not supported

See Also:
Constant Field Values

HOST_KEY_NOT_VERIFIABLE

public static final int HOST_KEY_NOT_VERIFIABLE
Disconnect reason: The host key supplied could not be verified

See Also:
Constant Field Values

CONNECTION_LOST

public static final int CONNECTION_LOST
Disconnect reason: The connection was lost

See Also:
Constant Field Values

BY_APPLICATION

public static final int BY_APPLICATION
Disconnect reason: The application disconnected

See Also:
Constant Field Values

TOO_MANY_CONNECTIONS

public static final int TOO_MANY_CONNECTIONS
Disconnect reason: Too many connections, try later

See Also:
Constant Field Values

AUTH_CANCELLED_BY_USER

public static final int AUTH_CANCELLED_BY_USER
Disconnect reason: Authentication was cancelled

See Also:
Constant Field Values

NO_MORE_AUTH_METHODS_AVAILABLE

public static final int NO_MORE_AUTH_METHODS_AVAILABLE
Disconnect reason: No more authentication methods are available

See Also:
Constant Field Values

ILLEGAL_USER_NAME

public static final int ILLEGAL_USER_NAME
Disconnect reason: The user's name is illegal

See Also:
Constant Field Values

numberOfConnections

public static int numberOfConnections
Constructor Detail

SshTransport

public SshTransport(SshContextFactory contextFactory,
                    org.apache.mina.core.service.IoAcceptor socketAcceptor)
Method Detail

bindRemoteForwardingInterface

public boolean bindRemoteForwardingInterface(RemoteForwardingListeningInterface li)

exceptionCaught

public void exceptionCaught(org.apache.mina.core.session.IoSession session,
                            Throwable cause)
                     throws Exception
Specified by:
exceptionCaught in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

messageReceived

public void messageReceived(org.apache.mina.core.session.IoSession session,
                            Object message)
                     throws Exception
Specified by:
messageReceived in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

processSSHTransportMessage

public boolean processSSHTransportMessage(org.apache.mina.core.session.IoSession session,
                                          Object message)
                                   throws Exception
Throws:
Exception

messageSent

public void messageSent(org.apache.mina.core.session.IoSession session,
                        Object message)
                 throws Exception
Specified by:
messageSent in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

sessionClosed

public void sessionClosed(org.apache.mina.core.session.IoSession session)
                   throws Exception
Specified by:
sessionClosed in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

sessionCreated

public void sessionCreated(org.apache.mina.core.session.IoSession session)
                    throws Exception
Specified by:
sessionCreated in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

sessionIdle

public void sessionIdle(org.apache.mina.core.session.IoSession session,
                        org.apache.mina.core.session.IdleStatus status)
                 throws Exception
Specified by:
sessionIdle in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

sessionOpened

public void sessionOpened(org.apache.mina.core.session.IoSession session)
                   throws Exception
Specified by:
sessionOpened in interface org.apache.mina.core.service.IoHandler
Throws:
Exception

disconnect

public void disconnect(org.apache.mina.core.session.IoSession session,
                       int reason,
                       String description)
Disconnect from the remote host. No more messages can be sent after this method has been called.

Parameters:
reason -
description -
Throws:
IOException

sendNewKeys

public void sendNewKeys(org.apache.mina.core.session.IoSession session)

startService

public void startService(org.apache.mina.core.session.IoSession session,
                         ConnectionProtocol connectionProtocol)


Copyright © 2012. All Rights Reserved.