org.jboss.dependency.plugins
Class AbstractDependencyItem

java.lang.Object
  extended byorg.jboss.util.JBossObject
      extended byorg.jboss.dependency.plugins.AbstractDependencyItem
All Implemented Interfaces:
Cloneable, DependencyItem, org.jboss.util.JBossInterface

public class AbstractDependencyItem
extends org.jboss.util.JBossObject
implements DependencyItem

A DependencyItem.

Version:
$Revision: 1.5 $
Author:
Adrian Brock

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, toString
 
Constructor Summary
AbstractDependencyItem()
          Create a new dependency item
AbstractDependencyItem(Object name, Object iDependOn, ControllerState whenRequired, ControllerState dependentState)
          Create a new dependency item
 
Method Summary
protected  void addDependsOnMe(Controller controller, ControllerContext context)
          Register a dependency with another context
 ControllerState getDependentState()
          Get the dependent's state
 Object getIDependOn()
          Get the object name i depend on
 Object getName()
          Get my object name
 ControllerState getWhenRequired()
          Get when the dependency is required
 boolean isResolved()
          Whether we are resolved
 boolean resolve(Controller controller)
          Try to resolve
protected  void setIDependOn(Object iDependOn)
          Set what I depend upon
protected  void setResolved(boolean resolved)
          Set the resolved state
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 void unresolved(Controller controller)
          Mark the dependency as unresolved
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDependencyItem

public AbstractDependencyItem()
Create a new dependency item


AbstractDependencyItem

public AbstractDependencyItem(Object name,
                              Object iDependOn,
                              ControllerState whenRequired,
                              ControllerState dependentState)
Create a new dependency item

Parameters:
name - my name
iDependOn - what I depend on
whenRequired - when the dependency is required
dependentState - the required state of the dependent
Method Detail

getName

public Object getName()
Description copied from interface: DependencyItem
Get my object name

Specified by:
getName in interface DependencyItem
Returns:
the name

getIDependOn

public Object getIDependOn()
Description copied from interface: DependencyItem
Get the object name i depend on

Specified by:
getIDependOn in interface DependencyItem
Returns:
the name

getWhenRequired

public ControllerState getWhenRequired()
Description copied from interface: DependencyItem
Get when the dependency is required

Specified by:
getWhenRequired in interface DependencyItem
Returns:
the state when required

getDependentState

public ControllerState getDependentState()
Description copied from interface: DependencyItem
Get the dependent's state

Specified by:
getDependentState in interface DependencyItem
Returns:
the state of the required of the dependent

isResolved

public boolean isResolved()
Description copied from interface: DependencyItem
Whether we are resolved

Specified by:
isResolved in interface DependencyItem
Returns:
true for resolved, false otherwise

resolve

public boolean resolve(Controller controller)
Description copied from interface: DependencyItem
Try to resolve

Specified by:
resolve in interface DependencyItem
Parameters:
controller - the controller
Returns:
true for resolved, false otherwise

unresolved

public void unresolved(Controller controller)
Description copied from interface: DependencyItem
Mark the dependency as unresolved

Specified by:
unresolved in interface DependencyItem
Parameters:
controller - the controller

toString

public void toString(org.jboss.util.JBossStringBuilder buffer)

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface

addDependsOnMe

protected void addDependsOnMe(Controller controller,
                              ControllerContext context)
Register a dependency with another context

Parameters:
context - the other context

setIDependOn

protected void setIDependOn(Object iDependOn)
Set what I depend upon

Parameters:
iDependOn - what I depend upon

setResolved

protected void setResolved(boolean resolved)
Set the resolved state

Parameters:
resolved - the new resolved state


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.