Methods Summary |
---|
public javax.enterprise.deploy.spi.factories.DeploymentFactory[] | getDeploymentFactories()Retrieve the lists of currently registered DeploymentFactories.
Vector deploymentFactoriesSnapShot = null;
synchronized(this){
deploymentFactoriesSnapShot =
(Vector)this.deploymentFactories.clone();
}
DeploymentFactory[] factoriesArray =
new DeploymentFactory[deploymentFactoriesSnapShot.size()];
deploymentFactoriesSnapShot.copyInto(factoriesArray);
return factoriesArray;
|
public javax.enterprise.deploy.spi.DeploymentManager | getDeploymentManager(java.lang.String uri, java.lang.String username, java.lang.String password)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.
try{
DeploymentFactory[] factories = this.getDeploymentFactories();
for(int factoryIndex=0; factoryIndex < factories.length;
factoryIndex++){
if(factories[factoryIndex].handlesURI(uri)){
return factories[factoryIndex].getDeploymentManager(uri,
username,password);
}
}
// No available factory supports the provided url.
throw new DeploymentManagerCreationException("URL ["+uri+
"] not supported by any available factories");
}catch(Throwable t){
throw new DeploymentManagerCreationException(
"Could not get DeploymentManager");
}
|
public javax.enterprise.deploy.spi.DeploymentManager | getDisconnectedDeploymentManager(java.lang.String uri)Return a disconnected DeploymentManager instance.
try{
DeploymentFactory[] factories = this.getDeploymentFactories();
for(int factoryIndex=0; factoryIndex < factories.length;
factoryIndex++){
if(factories[factoryIndex].handlesURI(uri)){
return factories[factoryIndex].getDisconnectedDeploymentManager(uri);
}
}
// No available factory supports the provided url.
throw new DeploymentManagerCreationException("URL ["+uri+
"] not supported by any available factories");
}catch(Throwable t){
throw new DeploymentManagerCreationException(
"Could not get DeploymentManager");
}
|
public static javax.enterprise.deploy.shared.factories.DeploymentFactoryManager | getInstance()Retrieve the Singleton DeploymentFactoryManager
if(deploymentFactoryManager == null){
deploymentFactoryManager = new DeploymentFactoryManager();
}
return deploymentFactoryManager;
|
public void | registerDeploymentFactory(javax.enterprise.deploy.spi.factories.DeploymentFactory factory)Registers a DeploymentFactory so it will be able to handle
requests.
this.deploymentFactories.add(factory);
|