org.ow2.petals.bc.sftp.authentication
Class SshAuthentication

java.lang.Object
  extended by org.ow2.petals.bc.sftp.authentication.SshAuthentication
Direct Known Subclasses:
SshPasswordAuthentication, SshPublicKeyAuthentication

public abstract class SshAuthentication
extends java.lang.Object

Root of a collection of utility class used to hold the informations used by J2SSH to perform an authentication onto the SSH server.

Author:
Charles Casadei - eBM WebSourcing

Constructor Summary
protected SshAuthentication(java.lang.String user)
          Default constructor.
 
Method Summary
abstract  com.sshtools.j2ssh.authentication.SshAuthenticationClient getAuthenticationClient()
          Builds the object used by the SFTPClientPool to perform the authentication on the SSH server.
abstract  java.lang.String getKey()
          Returns the key used to store an instance of this class (or any of its subclass) into the SftpClientPool.
 java.lang.String getUser()
          Accessor the the username used for SSH authentication.
 java.lang.String toString()
          Return the object content as String (Overrides the toString method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SshAuthentication

protected SshAuthentication(java.lang.String user)
                     throws ConfigurationException
Default constructor. Initialize an instance of SshAuthentication with the username used for authenticate the component onto the SSH server.

Parameters:
user - the username used for SSH authentication
Throws:
ConfigurationException
Method Detail

getUser

public final java.lang.String getUser()
Accessor the the username used for SSH authentication.

Returns:
the username used for SSH authentication

getAuthenticationClient

public abstract com.sshtools.j2ssh.authentication.SshAuthenticationClient getAuthenticationClient()
                                                                                           throws java.io.IOException
Builds the object used by the SFTPClientPool to perform the authentication on the SSH server.

Returns:
an object used by the SFTPClientPool to perform the authentication
Throws:
SshAuthenticationException
java.io.IOException

getKey

public abstract java.lang.String getKey()
Returns the key used to store an instance of this class (or any of its subclass) into the SftpClientPool.

Returns:
the key used to retrieve the ssh client in the SftpClientPool

toString

public java.lang.String toString()
Return the object content as String (Overrides the toString method).

Overrides:
toString in class java.lang.Object
Returns:
the object content as String


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.