Package org.jboss.msc.service
Interface Dependency
-
- All Superinterfaces:
Value<java.lang.Object>
- All Known Implementing Classes:
OptionalDependency,ServiceRegistrationImpl
interface Dependency extends Value<java.lang.Object>
AbstractDependency represents the dependencies of a service. The counterpart of this dependency relation isAbstractDependent.- See Also:
Dependent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDemand()Notify that adependententeredactive mode.voidaddDependent(Dependent dependent)Add a dependent to this dependency, establishing the dependency relation between this dependency and its dependent.voiddependentStarted()Notify that adependentis starting.voiddependentStopped()Notify that adependentis stopping.ServiceControllerImpl<?>getDependencyController()Get the controller for this dependency, ornullif there is none currently.ServiceNamegetName()Get the name of this dependency.java.lang.ObjectgetValue()Get the installed instance value, if any exists.voidremoveDemand()Notify that adependentleftactive mode.voidremoveDependent(Dependent dependent)Remove a dependent from this dependency, breaking the dependency relation between this dependency and its dependent.
-
-
-
Method Detail
-
addDependent
void addDependent(Dependent dependent)
Add a dependent to this dependency, establishing the dependency relation between this dependency and its dependent. This method must not be called under a lock.- Parameters:
dependent- the dependent to add
-
removeDependent
void removeDependent(Dependent dependent)
Remove a dependent from this dependency, breaking the dependency relation between this dependency and its dependent. This method must not be called under a lock.- Parameters:
dependent- the dependent to remove
-
addDemand
void addDemand()
Notify that adependententeredactive mode. This method must not be called under a lock.
-
removeDemand
void removeDemand()
Notify that adependentleftactive mode. This method must not be called under a lock.
-
dependentStarted
void dependentStarted()
Notify that adependentis starting. This method must not be called under a lock.
-
dependentStopped
void dependentStopped()
Notify that adependentis stopping. This method must not be called under a lock.
-
getValue
java.lang.Object getValue() throws java.lang.IllegalStateExceptionGet the installed instance value, if any exists.
-
getName
ServiceName getName()
Get the name of this dependency.- Returns:
- the name
-
getDependencyController
ServiceControllerImpl<?> getDependencyController()
Get the controller for this dependency, ornullif there is none currently.- Returns:
- the controller, or
nullfor none
-
-