|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.util.ee.deploy.impl.deployer.DeployerManager
public final class DeployerManager
This manager is managing different deployers. The deployer that will be used is a deployer that is supporting a given IDeployable object. If there are many deployers for the same type of Deployable, the first deployer that is supporting the given deployable will be used. At each deployment/undeployment phase, invoke registered callbacks.
| Field Summary | |
|---|---|
static String |
DEPLOYER_FACTORY_CLASS_NAME
Name of the property thats defines the deployer's class. |
| Constructor Summary | |
|---|---|
DeployerManager()
Create a new Manager of deployer. |
|
| Method Summary | |
|---|---|
void |
addCallback(IDeployerManagerCallback callback)
Add a new callback instance that will be invoked at each deployment/undeployment phase. |
void |
addCallback(IDeployerManagerReportCallback callback)
|
void |
deploy(IDeployable<?> deployable)
Deploy a given deployable by finding the first deployer that accept this type of deployable. |
List<IDeploymentReport> |
deploy(List<IDeployable<?>> deployables)
|
protected List<IDeploymentReport> |
deployOneTypeList(List<IDeployable<?>> deployables)
Deploy a one type list of deployable by finding the first deployer that accept this type of deployable. |
protected List<IDeploymentReport> |
doDeploymentOperation(List<IDeployable<?>> deployables,
boolean isDeployOperation)
Do a deployment operation with a multi type list of deployable by finding the first deployer that accept each type of deployable. |
protected IDeployer |
findDeployerForDeployable(IDeployable<?> deployable)
Find the first available deployer that is supporting the given deployable. |
protected IDeployer |
findDeployerForDeployables(List<IDeployable<?>> deployables)
Find the first available deployer that is supporting the given deployable. |
List<String> |
getDeployerClasses()
|
boolean |
isDeployed(IDeployable<?> deployable)
Deploy a given deployable by finding the first deployer that accept this type of deployable. |
void |
register(IDeployer deployer)
Register a new Deployer on this manager instance. |
void |
removeCallback(IDeployerManagerCallback callback)
Remove a callback instance. |
void |
removeCallback(IDeployerManagerReportCallback callback)
|
void |
undeploy(IDeployable<?> deployable)
Undeploy a given deployable by finding the first deployer that accept this type of deployable. |
List<IDeploymentReport> |
undeploy(List<IDeployable<?>> deployables)
|
protected List<IDeploymentReport> |
undeployOneTypeList(List<IDeployable<?>> deployables)
Undeploy a one type list of deployable by finding the first deployer that accept this type of deployable. |
void |
unregister(IDeployer deployer)
Unregister a Deployer from this manager instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEPLOYER_FACTORY_CLASS_NAME
| Constructor Detail |
|---|
public DeployerManager()
| Method Detail |
|---|
public void register(IDeployer deployer)
register in interface IDeployerManagerdeployer - the deployer to registerpublic void unregister(IDeployer deployer)
unregister in interface IDeployerManagerdeployer - the given deployer to unregister.
protected IDeployer findDeployerForDeployable(IDeployable<?> deployable)
throws UnsupportedDeployerException
deployable - the given deployable to test.
UnsupportedDeployerException - if no deployer is found for the given deployable.
protected IDeployer findDeployerForDeployables(List<IDeployable<?>> deployables)
throws UnsupportedDeployerException
deployables - the list of deployable to test.
UnsupportedDeployerException - if no deployer is found for these deployables.
public void deploy(IDeployable<?> deployable)
throws DeployerException,
UnsupportedDeployerException
deploy in interface IDeployerManagerdeployable - the given deployable to deploy.
DeployerException - if it cannot be undeployed.
UnsupportedDeployerException - if no deployer is found for the given deployable.
protected List<IDeploymentReport> doDeploymentOperation(List<IDeployable<?>> deployables,
boolean isDeployOperation)
deployables - the list of deployable to deploy.isDeployOperation - True if it's a deploy operation. Otherwise it's an undeploy operation
IDeploymentReportpublic List<IDeploymentReport> deploy(List<IDeployable<?>> deployables)
deploy in interface IDeployerManagerprotected List<IDeploymentReport> deployOneTypeList(List<IDeployable<?>> deployables)
deployables - the list of deployable to deploy.
IDeploymentReportprotected List<IDeploymentReport> undeployOneTypeList(List<IDeployable<?>> deployables)
deployables - the list of deployable to undeploy.
IDeploymentReport
public void undeploy(IDeployable<?> deployable)
throws DeployerException,
UnsupportedDeployerException
undeploy in interface IDeployerManagerdeployable - the given deployable to undeploy.
DeployerException - if it cannot be undeployed.
UnsupportedDeployerException - if no deployer is found for the given deployable.public List<IDeploymentReport> undeploy(List<IDeployable<?>> deployables)
undeploy in interface IDeployerManagerpublic List<String> getDeployerClasses()
getDeployerClasses in interface IDeployerManager
public boolean isDeployed(IDeployable<?> deployable)
throws DeployerException,
UnsupportedDeployerException
isDeployed in interface IDeployerManagerdeployable - the given deployable to deploy.
DeployerException - if it cannot be undeployed.
UnsupportedDeployerException - if no deployer is found for the given deployable.public void addCallback(IDeployerManagerCallback callback)
addCallback in interface IDeployerManagercallback - The given callbackpublic void removeCallback(IDeployerManagerCallback callback)
removeCallback in interface IDeployerManagercallback - The given callbackpublic void addCallback(IDeployerManagerReportCallback callback)
addCallback in interface IDeployerManagerpublic void removeCallback(IDeployerManagerReportCallback callback)
removeCallback in interface IDeployerManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||