org.jboss.dependency.spi
Interface DependencyInfo

All Superinterfaces:
Cloneable, org.jboss.util.JBossInterface
All Known Implementing Classes:
AbstractDependencyInfo, UnmodifiableDependencyInfo

public interface DependencyInfo
extends org.jboss.util.JBossInterface

Information about dependencies.

Version:
$Revision: 71794 $
Author:
Adrian Brock

Method Summary
 void addDependsOnMe(DependencyItem dependency)
          Add a dependency reference
 void addIDependOn(DependencyItem dependency)
          Add a dependency
<T> void
addInstallItem(CallbackItem<T> callbackItem)
          Add a callback reference
 void addLifecycleCallback(LifecycleCallbackItem lifecycleCallbackItem)
          Add a lifecycle callback
<T> void
addUninstallItem(CallbackItem<T> callbackItem)
          Add a callback reference
 Set<DependencyItem> getDependsOnMe(Class<?> type)
          Return what depends upon me
 Set<DependencyItem> getIDependOn(Class<?> type)
          Return what we depend upon
 Set<CallbackItem<?>> getInstallItems()
          Return install callbacks.
 List<LifecycleCallbackItem> getLifecycleCallbacks()
          Get the lifecycle callbacks
 Set<CallbackItem<?>> getUninstallItems()
          Return uninstall callbacks.
 Set<DependencyItem> getUnresolvedDependencies(ControllerState state)
          Return the unresolved dependencies
 boolean isAutowireCandidate()
          Can we use this context for autowiring.
 void removeDependsOnMe(DependencyItem dependency)
          Remove a dependency reference
 void removeIDependOn(DependencyItem dependency)
          Remove a dependency
<T> void
removeInstallItem(CallbackItem<T> callbackItem)
          Remove a callback reference
<T> void
removeUninstallItem(CallbackItem<T> callbackItem)
          Remove a callback reference
 boolean resolveDependencies(Controller controller, ControllerState state)
          Try to resolve dependencies
 void setAutowireCandidate(boolean candidate)
          Set whether this is an autowire candidate
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Method Detail

getIDependOn

Set<DependencyItem> getIDependOn(Class<?> type)
Return what we depend upon

Parameters:
type - the class of the dependency or null for all types
Returns:
our dependencies

getDependsOnMe

Set<DependencyItem> getDependsOnMe(Class<?> type)
Return what depends upon me

Parameters:
type - the class of the dependency or null for all types
Returns:
what depends upon this

addIDependOn

void addIDependOn(DependencyItem dependency)
Add a dependency

Parameters:
dependency - the dependency to add

removeIDependOn

void removeIDependOn(DependencyItem dependency)
Remove a dependency

Parameters:
dependency - the dependency to remove

addDependsOnMe

void addDependsOnMe(DependencyItem dependency)
Add a dependency reference

Parameters:
dependency - the dependency to add

removeDependsOnMe

void removeDependsOnMe(DependencyItem dependency)
Remove a dependency reference

Parameters:
dependency - the dependency to remove

resolveDependencies

boolean resolveDependencies(Controller controller,
                            ControllerState state)
Try to resolve dependencies

Parameters:
controller - the controller
state - the state of dependency to resolve
Returns:
true when all dependencies are resolved

getUnresolvedDependencies

Set<DependencyItem> getUnresolvedDependencies(ControllerState state)
Return the unresolved dependencies

Parameters:
state - the controller state
Returns:
our unresolved dependencies

addInstallItem

<T> void addInstallItem(CallbackItem<T> callbackItem)
Add a callback reference

Type Parameters:
T - the callback item type
Parameters:
callbackItem - the callback to add

removeInstallItem

<T> void removeInstallItem(CallbackItem<T> callbackItem)
Remove a callback reference

Type Parameters:
T - the callback item type
Parameters:
callbackItem - the callback to remove

getInstallItems

Set<CallbackItem<?>> getInstallItems()
Return install callbacks.

Returns:
our install callbacks

addUninstallItem

<T> void addUninstallItem(CallbackItem<T> callbackItem)
Add a callback reference

Type Parameters:
T - the callback item type
Parameters:
callbackItem - the callback to add

removeUninstallItem

<T> void removeUninstallItem(CallbackItem<T> callbackItem)
Remove a callback reference

Type Parameters:
T - the callback item type
Parameters:
callbackItem - the callback to remove

getUninstallItems

Set<CallbackItem<?>> getUninstallItems()
Return uninstall callbacks.

Returns:
our uninstall callbacks

addLifecycleCallback

void addLifecycleCallback(LifecycleCallbackItem lifecycleCallbackItem)
Add a lifecycle callback

Parameters:
lifecycleCallbackItem - The lifecycle callback to add

getLifecycleCallbacks

List<LifecycleCallbackItem> getLifecycleCallbacks()
Get the lifecycle callbacks

Returns:
our lifecycle callbacks

isAutowireCandidate

boolean isAutowireCandidate()
Can we use this context for autowiring.

Returns:
true if context can be used for autowiring

setAutowireCandidate

void setAutowireCandidate(boolean candidate)
Set whether this is an autowire candidate

Parameters:
candidate - true if it is a candidate for autowiring


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.