Package org.apache.axis2.engine
Class DeployableChain<T>
java.lang.Object
org.apache.axis2.engine.DeployableChain<T>
A DeployableChain is a container which manages dependencies between Deployables. You
deploy() them in, then call rebuild() which will set up a chain, correctly ordered according
to the constraints in the Deployables.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelationship(String before, String after) Adds a before/after relationship to the active constraints.voiddeploy(Deployable deployable) Deploy a Deployable into this chain.getChain()Get the chain - once rebuild() has been called this will be the chain of target objects.voidrebuild()Taking into account all the active constraints, order the list.
-
Constructor Details
-
DeployableChain
public DeployableChain()
-
-
Method Details
-
deploy
Deploy a Deployable into this chain. Note that this does NOT order yet. The idea is to deploy everything first, then call rebuild() to generate the fully ordered chain. This method will validate the Deployable, including confirming that it's compatible with any previously deployed item of the same name.- Parameters:
deployable- Deployable to deploy.- Throws:
Exception- if there is a deployment error.
-
rebuild
Taking into account all the active constraints, order the list. This blows away the old order. Could improve this slightly with a "dirty" flag.- Throws:
Exception- if there's an ordering conflict
-
addRelationship
Adds a before/after relationship to the active constraints.- Parameters:
before- name of the Deployable that must come firstafter- name of the Deployable that must come later
-
getChain
Get the chain - once rebuild() has been called this will be the chain of target objects.- Returns:
- a List of target objects in the correct order
-