com.sshtools.j2ssh.authentication
Class PublicKeyAuthenticationClient

java.lang.Object
  extended bycom.sshtools.j2ssh.authentication.SshAuthenticationClient
      extended bycom.sshtools.j2ssh.authentication.PublicKeyAuthenticationClient

public class PublicKeyAuthenticationClient
extends SshAuthenticationClient

DOCUMENT ME!


Field Summary
protected  SshPrivateKey key
          DOCUMENT ME!
 
Constructor Summary
PublicKeyAuthenticationClient()
          Creates a new PublicKeyAuthenticationClient object.
 
Method Summary
 boolean acceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key)
          DOCUMENT ME!
 void authenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart)
          DOCUMENT ME!
 boolean canAuthenticate()
          DOCUMENT ME!
 java.lang.String getMethodName()
          DOCUMENT ME!
 java.util.Properties getPersistableProperties()
          DOCUMENT ME!
 void setKey(SshPrivateKey key)
          DOCUMENT ME!
 void setPersistableProperties(java.util.Properties properties)
          DOCUMENT ME!
 
Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected SshPrivateKey key
DOCUMENT ME!

Constructor Detail

PublicKeyAuthenticationClient

public PublicKeyAuthenticationClient()
Creates a new PublicKeyAuthenticationClient object.

Method Detail

setKey

public void setKey(SshPrivateKey key)
DOCUMENT ME!

Parameters:
key - DOCUMENT ME!

getMethodName

public java.lang.String getMethodName()
DOCUMENT ME!

Specified by:
getMethodName in class SshAuthenticationClient
Returns:
DOCUMENT ME!

acceptsKey

public boolean acceptsKey(AuthenticationProtocolClient authentication,
                          java.lang.String username,
                          java.lang.String serviceToStart,
                          SshPublicKey key)
                   throws java.io.IOException
DOCUMENT ME!

Parameters:
authentication - DOCUMENT ME!
username - DOCUMENT ME!
serviceToStart - DOCUMENT ME!
key - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!

authenticate

public void authenticate(AuthenticationProtocolClient authentication,
                         java.lang.String serviceToStart)
                  throws java.io.IOException,
                         TerminatedStateException
DOCUMENT ME!

Specified by:
authenticate in class SshAuthenticationClient
Parameters:
authentication - DOCUMENT ME!
serviceToStart - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
TerminatedStateException - DOCUMENT ME!
AuthenticationProtocolException - DOCUMENT ME!

getPersistableProperties

public java.util.Properties getPersistableProperties()
Description copied from class: SshAuthenticationClient
DOCUMENT ME!

Specified by:
getPersistableProperties in class SshAuthenticationClient
Returns:
DOCUMENT ME!

setPersistableProperties

public void setPersistableProperties(java.util.Properties properties)
DOCUMENT ME!

Specified by:
setPersistableProperties in class SshAuthenticationClient
Parameters:
properties - DOCUMENT ME!

canAuthenticate

public boolean canAuthenticate()
DOCUMENT ME!

Specified by:
canAuthenticate in class SshAuthenticationClient
Returns:
DOCUMENT ME!