Top Description Fields Constructors Methods
javax.enterprise.deploy.shared.factories

public final Class DeploymentFactoryManager

extends Object
Class Inheritance
Imports
java.util.Vector, .Iterator, javax.enterprise.deploy.spi.DeploymentManager, javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException, javax.enterprise.deploy.spi.factories.DeploymentFactory

The DeploymentFactoryManager class is a central registry for Java EE DeploymentFactory objects. The DeploymentFactoryManager retains references to DeploymentFactory objects loaded by a tool. A DeploymentFactory object provides a reference to a DeploymentManager. The DeploymentFactoryManager has been implemented as a singleton. A tool gets a reference to the DeploymentFactoryManager via the getInstance method. The DeploymentFactoryManager can return two types of DeploymentManagers, a connected DeploymentManager and a disconnected DeploymentManager. The connected DeploymentManager provides access to any product resources that may be required for configurations and deployment. The method to retrieve a connected DeploymentManager is getDeploymentManager. This method provides parameters for user name and password that the product may require for user authentication. A disconnected DeploymentManager does not provide access to a running Java EE product. The method to retrieve a disconnected DeploymentManager is getDisconnectedDeploymentManager. A disconnected DeploymentManager does not need user authentication information.

Field Summary

Modifier and TypeField and Description
private Vector<E>
private static DeploymentFactoryManager

Constructor Summary

AccessConstructor and Description
private
DeploymentFactoryManager()

Creates new RIDeploymentFactoryManager

Method Summary

Modifier and TypeMethod and Description
public DeploymentFactory[]

Returns:

the list of DeploymentFactory objects or an empty array if there are none.
getDeploymentFactories
()

Retrieve the lists of currently registered DeploymentFactories.

public DeploymentManager

Returns:

A ready DeploymentManager instance.
getDeploymentManager
(String
The uri to check
uri
,
String
An optional username (may be null if no authentication is required for this platform).
username
,
String
An optional password (may be null if no authentication is required for this platform).
password
)

Retrieves a DeploymentManager instance to use for deployment.

public DeploymentManager

Returns:

A DeploymentManager instance.
getDisconnectedDeploymentManager
(String
identifier of the disconnected DeploymentManager to return.
uri
)

Return a disconnected DeploymentManager instance.

public static DeploymentFactoryManager

Returns:

DeploymentFactoryManager instance
getInstance
()

Retrieve the Singleton DeploymentFactoryManager

public void
registerDeploymentFactory(DeploymentFactory factory)

Registers a DeploymentFactory so it will be able to handle requests.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

deploymentFactoriesback to summary
private Vector<E> deploymentFactories
deploymentFactoryManagerback to summary
private static DeploymentFactoryManager deploymentFactoryManager

Constructor Detail

DeploymentFactoryManagerback to summary
private DeploymentFactoryManager()

Creates new RIDeploymentFactoryManager

Method Detail

getDeploymentFactoriesback to summary
public DeploymentFactory[] getDeploymentFactories()

Retrieve the lists of currently registered DeploymentFactories.

Returns:DeploymentFactory[]

the list of DeploymentFactory objects or an empty array if there are none.

getDeploymentManagerback to summary
public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException

Retrieves a DeploymentManager instance to use for deployment. The caller provides a URI and optional username and password, and all registered DeploymentFactories will be checked. The first one to understand the URI provided will attempt to initiate a server connection and return a ready DeploymentManager instance.

Parameters
uri:String

The uri to check

username:String

An optional username (may be null if no authentication is required for this platform).

password:String

An optional password (may be null if no authentication is required for this platform).

Returns:DeploymentManager

A ready DeploymentManager instance.

Exceptions
DeploymentManagerCreationException:
Occurs when the factory appropriate to the specified URI was unable to initialize a DeploymentManager instance (server down, unable to authenticate, etc.).
getDisconnectedDeploymentManagerback to summary
public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException

Return a disconnected DeploymentManager instance.

Parameters
uri:String

identifier of the disconnected DeploymentManager to return.

Returns:DeploymentManager

A DeploymentManager instance.

Exceptions
DeploymentManagerCreationException:
occurs if the DeploymentManager could not be created.
getInstanceback to summary
public static DeploymentFactoryManager getInstance()

Retrieve the Singleton DeploymentFactoryManager

Returns:DeploymentFactoryManager

DeploymentFactoryManager instance

registerDeploymentFactoryback to summary
public void registerDeploymentFactory(DeploymentFactory factory)

Registers a DeploymentFactory so it will be able to handle requests.