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 void
addDemand()
Notify that adependent
enteredactive mode
.void
addDependent(Dependent dependent)
Add a dependent to this dependency, establishing the dependency relation between this dependency and its dependent.void
dependentStarted()
Notify that adependent
is starting.void
dependentStopped()
Notify that adependent
is stopping.ServiceControllerImpl<?>
getDependencyController()
Get the controller for this dependency, ornull
if there is none currently.ServiceName
getName()
Get the name of this dependency.java.lang.Object
getValue()
Get the installed instance value, if any exists.void
removeDemand()
Notify that adependent
leftactive mode
.void
removeDependent(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 adependent
enteredactive mode
. This method must not be called under a lock.
-
removeDemand
void removeDemand()
Notify that adependent
leftactive mode
. This method must not be called under a lock.
-
dependentStarted
void dependentStarted()
Notify that adependent
is starting. This method must not be called under a lock.
-
dependentStopped
void dependentStopped()
Notify that adependent
is stopping. This method must not be called under a lock.
-
getValue
java.lang.Object getValue() throws java.lang.IllegalStateException
Get 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, ornull
if there is none currently.- Returns:
- the controller, or
null
for none
-
-