com.sshtools.daemon.authentication
Class AuthenticationProtocolServer

java.lang.Object
  extended by com.sshtools.j2ssh.transport.Service
      extended by com.sshtools.j2ssh.transport.AsyncService
          extended by com.sshtools.daemon.authentication.AuthenticationProtocolServer
All Implemented Interfaces:
java.lang.Runnable

public class AuthenticationProtocolServer
extends AsyncService

Version:
$Revision: 1.11 $
Author:
$author$

Field Summary
 
Fields inherited from class com.sshtools.j2ssh.transport.AsyncService
thread
 
Fields inherited from class com.sshtools.j2ssh.transport.Service
ACCEPTING_SERVICE, messageStore, REQUESTING_SERVICE, startMode, state, transport
 
Constructor Summary
AuthenticationProtocolServer()
          Creates a new AuthenticationProtocolServer object.
 
Method Summary
 void acceptService(Service service)
           
protected  int[] getAsyncMessageFilter()
           Implement this method by returning the message ids of the asyncrounous messages your implementation wants to receive.
 TransportProtocolState getConnectionState()
           
 byte[] getSessionIdentifier()
           
protected  void onMessageReceived(SshMessage msg)
           Called by the service thread when an asyncronous message is received.
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 onStop()
           The service thread calls this method when the thread is exiting.
 SshMessage readMessage()
           
 void registerMessage(int messageId, java.lang.Class cls)
           
 void sendMessage(SshMessage msg)
           
 
Methods inherited from class com.sshtools.j2ssh.transport.AsyncService
onStart, run
 
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

AuthenticationProtocolServer

public AuthenticationProtocolServer()
Creates a new AuthenticationProtocolServer 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

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

getSessionIdentifier

public byte[] getSessionIdentifier()
Returns:

getConnectionState

public TransportProtocolState getConnectionState()
Returns:

sendMessage

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

readMessage

public SshMessage readMessage()
                       throws java.io.IOException
Returns:
Throws:
java.io.IOException
SshException

registerMessage

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

onServiceRequest

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

onMessageReceived

protected void onMessageReceived(SshMessage msg)
                          throws java.io.IOException
Description copied from class: AsyncService

Called by the service thread when an asyncronous message is received.

Specified by:
onMessageReceived in class AsyncService
Parameters:
msg -
Throws:
java.io.IOException
AuthenticationProtocolException

getAsyncMessageFilter

protected int[] getAsyncMessageFilter()
Description copied from class: AsyncService

Implement this method by returning the message ids of the asyncrounous messages your implementation wants to receive.

Specified by:
getAsyncMessageFilter in class AsyncService
Returns:

acceptService

public void acceptService(Service service)
Parameters:
service -

onStop

protected void onStop()
Description copied from class: AsyncService

The service thread calls this method when the thread is exiting.

Specified by:
onStop in class AsyncService


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