com.sshtools.j2ssh.authentication
Class AuthenticationProtocolClient
java.lang.Object
com.sshtools.j2ssh.transport.Service
com.sshtools.j2ssh.authentication.AuthenticationProtocolClient
public class AuthenticationProtocolClient
- extends Service
- Version:
- $Revision: 1.1 $
- Author:
- $author$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
resultFilter
private int[] resultFilter
singleIdFilter
private int[] singleIdFilter
listeners
private java.util.Vector listeners
AuthenticationProtocolClient
public AuthenticationProtocolClient()
- Creates a new AuthenticationProtocolClient object.
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
internalReadMessage
private SshMessage internalReadMessage(int[] messageIdFilter)
throws TerminatedStateException,
java.io.IOException
- 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
parseMessage
private SshMessage parseMessage(SshMessage msg)
throws TerminatedStateException
- Throws:
TerminatedStateException
getBannerMessage
public java.lang.String getBannerMessage(int timeout)
throws java.io.IOException
- Parameters:
timeout
-
- Returns:
-
- Throws:
java.io.IOException
SshException