com.sshtools.j2ssh.authentication
Class AuthenticationProtocolClient

java.lang.Object
  extended by com.sshtools.j2ssh.transport.Service
      extended by com.sshtools.j2ssh.authentication.AuthenticationProtocolClient

public class AuthenticationProtocolClient
extends Service

Version:
$Revision: 1.27 $
Author:
$author$

Field Summary
 
Fields inherited from class com.sshtools.j2ssh.transport.Service
ACCEPTING_SERVICE, messageStore, REQUESTING_SERVICE, startMode, state, transport
 
Constructor Summary
AuthenticationProtocolClient()
          Creates a new AuthenticationProtocolClient object.
 
Method Summary
 void addEventListener(AuthenticationProtocolListener listener)
           
 int authenticate(SshAuthenticationClient auth, Service serviceToStart)
           
 java.util.List getAvailableAuths(java.lang.String username, java.lang.String serviceName)
           
 java.lang.String getBannerMessage(int timeout)
           
 byte[] getSessionIdentifier()
           
protected  void onServiceAccept()
           Called when the service is accepted by the remote server.
protected  void onServiceInit(int startMode)
           Called when the service is intialized.
protected  void onServiceRequest()
           
protected  void onStart()
           Called when the service is started.
 void readAuthenticationState()
           
 SshMessage readMessage(int messageId)
           
 SshMessage readMessage(int[] messageId)
           
 void registerMessage(java.lang.Class cls, int messageId)
           
 void sendMessage(SshMessage msg)
           
 
Methods inherited from class com.sshtools.j2ssh.transport.Service
getServiceName, getState, init, sendServiceAccept, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationProtocolClient

public AuthenticationProtocolClient()
Creates a new AuthenticationProtocolClient object.

Method Detail

onServiceAccept

protected void onServiceAccept()
                        throws java.io.IOException
Description copied from class: Service

Called when the service is accepted by the remote server.

Specified by:
onServiceAccept in class Service
Throws:
java.io.IOException

onStart

protected void onStart()
Description copied from class: Service

Called when the service is started.

Specified by:
onStart in class Service

onServiceInit

protected void onServiceInit(int startMode)
                      throws java.io.IOException
Description copied from class: Service

Called when the service is intialized.

Specified by:
onServiceInit in class Service
Parameters:
startMode -
Throws:
java.io.IOException
java.io.IOException

onServiceRequest

protected void onServiceRequest()
                         throws java.io.IOException
Specified by:
onServiceRequest in class Service
Throws:
java.io.IOException
java.io.IOException

addEventListener

public void addEventListener(AuthenticationProtocolListener listener)
Parameters:
listener -

getAvailableAuths

public java.util.List getAvailableAuths(java.lang.String username,
                                        java.lang.String serviceName)
                                 throws java.io.IOException
Parameters:
username -
serviceName -
Returns:
Throws:
java.io.IOException
SshException

authenticate

public int authenticate(SshAuthenticationClient auth,
                        Service serviceToStart)
                 throws java.io.IOException
Parameters:
auth -
serviceToStart -
Returns:
Throws:
java.io.IOException
SshException

sendMessage

public void sendMessage(SshMessage msg)
                 throws java.io.IOException
Parameters:
msg -
Throws:
java.io.IOException

getSessionIdentifier

public byte[] getSessionIdentifier()
Returns:

registerMessage

public void registerMessage(java.lang.Class cls,
                            int messageId)
Parameters:
cls -
messageId -

readMessage

public SshMessage readMessage(int messageId)
                       throws TerminatedStateException,
                              java.io.IOException
Parameters:
messageId -
Returns:
Throws:
TerminatedStateException
java.io.IOException

readMessage

public SshMessage readMessage(int[] messageId)
                       throws TerminatedStateException,
                              java.io.IOException
Parameters:
messageId -
Returns:
Throws:
TerminatedStateException
java.io.IOException

readAuthenticationState

public void readAuthenticationState()
                             throws java.io.IOException,
                                    TerminatedStateException
Throws:
java.io.IOException
TerminatedStateException

getBannerMessage

public java.lang.String getBannerMessage(int timeout)
                                  throws java.io.IOException
Parameters:
timeout -
Returns:
Throws:
java.io.IOException
SshException


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.