Package org.jboss.msc.service
Class DelegatingServiceTarget
java.lang.Object
org.jboss.msc.service.DelegatingServiceTarget
- All Implemented Interfaces:
ServiceTarget
A service target which delegates to another service target.
- Author:
- David M. Lloyd, Richard Opalka
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDependency(ServiceName dependency) Deprecated.addListener(LifecycleListener listener) Add a service lifecycle listener that will be added to this service.addMonitor(StabilityMonitor monitor) Deprecated.Get a builder which can be used to add a service to this target.addService(ServiceName name) Deprecated.<T> ServiceBuilder<T>addService(ServiceName name, Service<T> service) Deprecated.protected ServiceTargetGet the ServiceTarget delegate.removeListener(LifecycleListener listener) Remove a lifecycle listener from this target, if it exists.removeMonitor(StabilityMonitor monitor) Deprecated.Create a sub-target using this as the parent target.
-
Constructor Details
-
DelegatingServiceTarget
Construct a new instance.- Parameters:
delegate- the delegate service target
-
-
Method Details
-
getDelegate
Get the ServiceTarget delegate.- Returns:
- ServiceTarget delegate
-
addListener
Add a service lifecycle listener that will be added to this service.- Specified by:
addListenerin interfaceServiceTarget- Parameters:
listener- the lifecycle listener to add to the service- Returns:
- this target
-
removeListener
Remove a lifecycle listener from this target, if it exists.- Specified by:
removeListenerin interfaceServiceTarget- Parameters:
listener- the lifecycle listener to remove- Returns:
- this target
-
addService
Get a builder which can be used to add a service to this target.- Specified by:
addServicein interfaceServiceTarget- Returns:
- new service configurator
-
subTarget
Create a sub-target using this as the parent target.- Specified by:
subTargetin interfaceServiceTarget- Returns:
- the new service target
-
addService
Deprecated.Get a builder which can be used to add a service to this target.- Specified by:
addServicein interfaceServiceTarget- Parameters:
name- the service name- Returns:
- new service configurator
-
addService
Deprecated.Get a builder which can be used to add a service to this target.- Specified by:
addServicein interfaceServiceTarget- Parameters:
name- the service nameservice- the service- Returns:
- the builder for the service
-
addDependency
Deprecated.Add a dependency that will be added to the all ServiceBuilders installed in this target.- Specified by:
addDependencyin interfaceServiceTarget- Parameters:
dependency- the dependency to add to the target- Returns:
- this target
-
addMonitor
Deprecated.Add a stability monitor that will be added to all the ServiceBuilders installed in this target.- Specified by:
addMonitorin interfaceServiceTarget- Parameters:
monitor- the monitor to add to the target- Returns:
- this target
-
removeMonitor
Deprecated.Remove a monitor from this target, if it exists.- Specified by:
removeMonitorin interfaceServiceTarget- Parameters:
monitor- the monitor to remove- Returns:
- this target
-