com.vhosting.netconf.transport.ssh
Class SshAuthInfo

java.lang.Object
  extended by com.vhosting.netconf.transport.ssh.SshAuthInfo

public class SshAuthInfo
extends java.lang.Object

This class provides the information needed to make a connection Netconf over SSH-2 such as a remote host name, user name and password.

Version:
1.00, 02/11/2010
Author:
Giuseppe Palmeri

Constructor Summary
SshAuthInfo(java.net.InetSocketAddress host, java.lang.String uname, java.io.File pemFile, java.lang.String pemFilePass)
          Prepares a connection of type 'AuthType.PUBLICKEY_AUTH' on the specified host using a PEM file.
SshAuthInfo(java.net.InetSocketAddress host, java.lang.String uname, java.lang.String passwd)
          Prepares a connection of type 'AuthType.BASIC_AUTH' on the specified host.
SshAuthInfo(java.lang.String uname, java.lang.String passwd)
          Prepares a connection of type 'AuthType.BASIC_AUTH' on the host localhost at port 380 (default Netconf port)
SshAuthInfo(java.lang.String hostName, java.lang.String uname, java.io.File pemFile, java.lang.String pemFilePass)
          Prepares a connection of type 'AuthType.PUBLICKEY_AUTH' on the specified host name at the default port 380 using a PEM file.
SshAuthInfo(java.lang.String hostName, java.lang.String uname, java.lang.String passwd)
          Prepares a connection of type 'AuthType.BASIC_AUTH' on the specified host at port 380 (default Netconf port)
 
Method Summary
 java.net.InetSocketAddress getHost()
          Get the host.
 java.lang.String getPasswd()
          Get the password.
 java.io.File getPemFile()
          Get the PEM file.
 java.lang.String getPemFilePass()
          Get the PEM file password.
 java.net.InetSocketAddress getProxyHost()
          Retrieve the HTTP Proxy host.
 java.lang.String getUname()
          Get the User name.
 void removeProxyHost()
          Remove the HTTP Proxy when is set.
 void setProxyHost(java.net.InetSocketAddress proxyHost)
          This method permit to specific an HTTP Proxy when exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshAuthInfo

public SshAuthInfo(java.lang.String uname,
                   java.lang.String passwd)
Prepares a connection of type 'AuthType.BASIC_AUTH' on the host localhost at port 380 (default Netconf port)

Parameters:
uname - The User name.
passwd - The password.

SshAuthInfo

public SshAuthInfo(java.lang.String hostName,
                   java.lang.String uname,
                   java.lang.String passwd)
Prepares a connection of type 'AuthType.BASIC_AUTH' on the specified host at port 380 (default Netconf port)

Parameters:
hostName - The Host name.
uname - The User name.
passwd - The password.

SshAuthInfo

public SshAuthInfo(java.net.InetSocketAddress host,
                   java.lang.String uname,
                   java.lang.String passwd)
Prepares a connection of type 'AuthType.BASIC_AUTH' on the specified host.

Parameters:
host - The Host.
uname - The User name.
passwd - The password.

SshAuthInfo

public SshAuthInfo(java.net.InetSocketAddress host,
                   java.lang.String uname,
                   java.io.File pemFile,
                   java.lang.String pemFilePass)
Prepares a connection of type 'AuthType.PUBLICKEY_AUTH' on the specified host using a PEM file.

Parameters:
host - The Host.
uname - The User name.
pemFile - The PEM file.
pemFilePass - The PEM file password.

SshAuthInfo

public SshAuthInfo(java.lang.String hostName,
                   java.lang.String uname,
                   java.io.File pemFile,
                   java.lang.String pemFilePass)
Prepares a connection of type 'AuthType.PUBLICKEY_AUTH' on the specified host name at the default port 380 using a PEM file.

Parameters:
hostName - The Host name.
uname - The User name.
pemFile - The PEM file.
pemFilePass - The PEM file password.
Method Detail

setProxyHost

public final void setProxyHost(java.net.InetSocketAddress proxyHost)
This method permit to specific an HTTP Proxy when exist.

Parameters:
proxyHost - The HTTP Proxy host name.

getProxyHost

public java.net.InetSocketAddress getProxyHost()
Retrieve the HTTP Proxy host.

Returns:
The HTTP proxy if exists; null if the proxy is not set.

getUname

public java.lang.String getUname()
Get the User name.

Returns:
The User name.

getPemFile

public java.io.File getPemFile()
Get the PEM file.

Returns:
The User name.

getPemFilePass

public java.lang.String getPemFilePass()
Get the PEM file password.

Returns:
The PEM file pass.

getPasswd

public java.lang.String getPasswd()
Get the password.

Returns:
The password.

getHost

public java.net.InetSocketAddress getHost()
Get the host.

Returns:
The host.

removeProxyHost

public void removeProxyHost()
Remove the HTTP Proxy when is set.