Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.engine
Class DeployableChain<T>

    java.lang.Object
      org.apache.axis2.engine.DeployableChain<T>

    public class DeployableChain<T>

extends java.lang.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
`DeployableChain()`

Method Summary
`void` | `addRelationship(java.lang.String before, java.lang.String after)` Adds a before/after relationship to the active constraints.
`void` | `deploy(Deployable deployable)` Deploy a Deployable into this chain.
`java.util.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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DeployableChain

    public DeployableChain()

Method Detail

### deploy

    public void deploy(Deployable deployable)
                throws java.lang.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:
    `java.lang.Exception` - if there is a deployment error.

### rebuild

    public void rebuild()
                 throws java.lang.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:
    `java.lang.Exception` - if there's an ordering conflict

### addRelationship

    public void addRelationship(java.lang.String before,
                                java.lang.String after)

  Adds a before/after relationship to the active constraints.

  Parameters:
    `before` - name of the Deployable that must come first
    `after` - name of the Deployable that must come later

### getChain

    public java.util.List<T> 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.