Class AuthenticationProtocolServer
- java.lang.Object
-
- com.sshtools.j2ssh.transport.Service
-
- com.sshtools.j2ssh.transport.AsyncService
-
- 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
Constructors Constructor Description AuthenticationProtocolServer()
Creates a new AuthenticationProtocolServer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 classService
- 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 classService
- 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 classService
- 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 classAsyncService
- 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 classAsyncService
- 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 classAsyncService
-
-