Package org.apache.axis2.engine
Class DeployableChain<T>
- java.lang.Object
-
- org.apache.axis2.engine.DeployableChain<T>
-
public class DeployableChain<T> extends Object
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 Constructor Description DeployableChain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRelationship(String before, String after)
Adds a before/after relationship to the active constraints.void
deploy(Deployable deployable)
Deploy a Deployable into this chain.List<T>
getChain()
Get the chain - once rebuild() has been called this will be the chain of target objects.void
rebuild()
Taking into account all the active constraints, order the list.
-
-
-
Method Detail
-
deploy
public void deploy(Deployable deployable) throws Exception
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
public void rebuild() throws Exception
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
public void addRelationship(String before, String after)
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
-
-