com.cisco.provisioning.cpe
Class PACEConnectionFactory

java.lang.Object
  extended by com.cisco.provisioning.cpe.PACEConnectionFactory

public class PACEConnectionFactory
extends Object

This factory will return PACEConnection instances. Multiple connection to the same host (IP address) and port will share the same underlying messaging connection (TCP).

See Also:
PACEConnection

Constructor Summary
PACEConnectionFactory()
           
 
Method Summary
static PACEConnection getInstance(InetAddress address, int port, String username, String password)
          Returns an authenticated instance of the PACEConnection on the given port and host.
static PACEConnection getInstance(InetAddress address, int port, String username, String password, boolean authenticateImmediately)
          Returns an authenticated instance of the PACEConnection on the given port and host.
static PACEConnection getInstance(com.cisco.csrc.messages.Peer peer, String username, String password)
          Returns an authenticated instance of the PACEConnection on the given Peer.
static PACEConnection getInstance(com.cisco.csrc.messages.Peer peer, String username, String password, boolean authenticateImmediately)
          Returns an authenticated instance of the PACEConnection on the given Peer.
static PACEConnection getInstance(String host, int port, String username, String password)
          Returns the authenticated instance of the PACEConnection on the given port and host.
static PACEConnection getInstance(String host, int port, String username, String password, boolean authenticateImmediately)
          Returns an authenticated instance of the PACEConnection on the given port and host.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PACEConnectionFactory

public PACEConnectionFactory()
Method Detail

getInstance

public static PACEConnection getInstance(String host,
                                         int port,
                                         String username,
                                         String password)
Returns the authenticated instance of the PACEConnection on the given port and host.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
host - The FQDN or IP Address of the host that the RDU is located.
port - The port associated with the hostName on which the RDU is listening.
username - The username to authenticate with.
password - The password to authenticate with.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.

getInstance

public static PACEConnection getInstance(InetAddress address,
                                         int port,
                                         String username,
                                         String password)
Returns an authenticated instance of the PACEConnection on the given port and host.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
address - The InetAddress representing the host that the RDU is located.
port - The port associated with the hostName on which the RDU is listening.
username - The username to authenticate with.
password - The password to authenticate with.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.

getInstance

public static PACEConnection getInstance(com.cisco.csrc.messages.Peer peer,
                                         String username,
                                         String password)
Returns an authenticated instance of the PACEConnection on the given Peer.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
peer - The peer object representing the RDU
username - The username to authenticate with.
password - The password to authenticate with.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.

getInstance

public static PACEConnection getInstance(String host,
                                         int port,
                                         String username,
                                         String password,
                                         boolean authenticateImmediately)
Returns an authenticated instance of the PACEConnection on the given port and host.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
host - The FQDN or IP Address of the host that the RDU is located.
port - The port associated with the hostName on which the RDU is listening.
username - The username to authenticate with.
password - The password to authenticate with.
authenticateImmediately - Determines whether the PACEConnection authenticates (connects to the RDU) immediately or when the first batch is posted.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.

getInstance

public static PACEConnection getInstance(InetAddress address,
                                         int port,
                                         String username,
                                         String password,
                                         boolean authenticateImmediately)
Returns an authenticated instance of the PACEConnection on the given port and host.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
address - The InetAddress representing the host that the RDU is located.
port - The port associated with the hostName on which the RDU is listening.
username - The username to authenticate with.
password - The password to authenticate with.
authenticateImmediately - Determines whether the PACEConnection authenticates (connects to the RDU) immediately or when the first batch is posted.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.

getInstance

public static PACEConnection getInstance(com.cisco.csrc.messages.Peer peer,
                                         String username,
                                         String password,
                                         boolean authenticateImmediately)
Returns an authenticated instance of the PACEConnection on the given Peer.

Note: When a non-routable rdu host or IP address is specified, this method could take several minutes for this method to timeout and throw an exception.

Parameters:
peer - The peer object representing the RDU
username - The username to authenticate with.
password - The password to authenticate with.
authenticateImmediately - Determines whether the PACEConnection authenticates (connects to the RDU) immediately or when the first batch is posted.

Returns:
An authenticated PACEConnection object.

Throws:
PACEConnectionException - if an Exception occurs.