net.sf.csutils.core.registry
Class DefaultConnectionProvider

java.lang.Object
  extended by net.sf.csutils.core.registry.DefaultConnectionProvider
All Implemented Interfaces:
java.io.Serializable, ConnectionProvider

public class DefaultConnectionProvider
extends java.lang.Object
implements ConnectionProvider, java.io.Serializable

Default implementation of ConnectionProvider, suitable for standalone programs, which is configured with a registry URL, a user name, and a password.

See Also:
Serialized Form

Constructor Summary
DefaultConnectionProvider(java.net.URL pURL, java.lang.String pUser, java.lang.String pPassword)
          Creates a new instance with the given registry URL, user name, and password.
DefaultConnectionProvider(java.net.URL pURL, java.lang.String pUser, java.lang.String pPassword, boolean pManagingTypes)
          Creates a new instance with the given registry URL, user name, and password.
 
Method Summary
 javax.xml.registry.Connection getConnection()
          Returns a registry connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConnectionProvider

public DefaultConnectionProvider(java.net.URL pURL,
                                 java.lang.String pUser,
                                 java.lang.String pPassword)
Creates a new instance with the given registry URL, user name, and password. The returned connection is not suitable for using the CentraSite type management API.

Parameters:
pURL - The URL of the CentraSite database
pUser - The user name to use for logging in to the CentraSite database.
pPassword - The password to use for logging in to the CentraSite database.

DefaultConnectionProvider

public DefaultConnectionProvider(java.net.URL pURL,
                                 java.lang.String pUser,
                                 java.lang.String pPassword,
                                 boolean pManagingTypes)
Creates a new instance with the given registry URL, user name, and password.

Parameters:
pURL - The URL of the CentraSite database
pUser - The user name to use for logging in to the CentraSite database.
pPassword - The password to use for logging in to the CentraSite database.
pManagingTypes - Whether the returned connection must be suitable for using the CentraSite type management API.
Method Detail

getConnection

public javax.xml.registry.Connection getConnection()
                                            throws javax.xml.registry.JAXRException
Description copied from interface: ConnectionProvider
Returns a registry connection. A new connection is created, if required.

Specified by:
getConnection in interface ConnectionProvider
Returns:
The registry connection.
Throws:
javax.xml.registry.JAXRException - The operation failed.


Copyright © 2009-2010. All Rights Reserved.