|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sshtools.j2ssh.transport.Service
com.sshtools.j2ssh.transport.AsyncService
com.sshtools.daemon.authentication.AuthenticationProtocolServer
public class AuthenticationProtocolServer
Field Summary | |
---|---|
private java.util.Map |
acceptServices
|
private int |
attempts
|
private java.util.List |
availableAuths
|
private boolean |
completed
|
private java.util.List |
completedAuthentications
|
private static org.apache.commons.logging.Log |
log
|
private int[] |
messageFilter
|
private SshMessageStore |
methodMessages
|
private java.lang.String |
serviceToStart
|
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. |
private void |
onMsgUserAuthRequest(SshMsgUserAuthRequest msg)
|
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)
|
private void |
sendUserAuthFailure(boolean success)
|
private void |
sendUserAuthSuccess()
|
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 |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private java.util.List completedAuthentications
private java.util.Map acceptServices
private java.util.List availableAuths
private java.lang.String serviceToStart
private int[] messageFilter
private SshMessageStore methodMessages
private int attempts
private boolean completed
Constructor Detail |
---|
public AuthenticationProtocolServer()
Method Detail |
---|
protected void onServiceAccept() throws java.io.IOException
Service
Called when the service is accepted by the remote server.
onServiceAccept
in class Service
java.io.IOException
protected void onServiceInit(int startMode) throws java.io.IOException
Service
Called when the service is intialized.
onServiceInit
in class Service
startMode
-
java.io.IOException
public byte[] getSessionIdentifier()
public TransportProtocolState getConnectionState()
public void sendMessage(SshMessage msg) throws java.io.IOException
msg
-
java.io.IOException
public SshMessage readMessage() throws java.io.IOException
java.io.IOException
SshException
public void registerMessage(int messageId, java.lang.Class cls)
messageId
- cls
- protected void onServiceRequest() throws java.io.IOException
onServiceRequest
in class Service
java.io.IOException
AuthenticationProtocolException
protected void onMessageReceived(SshMessage msg) throws java.io.IOException
AsyncService
Called by the service thread when an asyncronous message is received.
onMessageReceived
in class AsyncService
msg
-
java.io.IOException
AuthenticationProtocolException
protected int[] getAsyncMessageFilter()
AsyncService
Implement this method by returning the message ids of the asyncrounous messages your implementation wants to receive.
getAsyncMessageFilter
in class AsyncService
public void acceptService(Service service)
service
- private void sendUserAuthFailure(boolean success) throws java.io.IOException
java.io.IOException
protected void onStop()
AsyncService
The service thread calls this method when the thread is exiting.
onStop
in class AsyncService
private void sendUserAuthSuccess() throws java.io.IOException
java.io.IOException
private void onMsgUserAuthRequest(SshMsgUserAuthRequest msg) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |