Package org.jboss.msc.service
Class DelegatingServiceTarget
- java.lang.Object
-
- org.jboss.msc.service.DelegatingServiceTarget
-
- All Implemented Interfaces:
ServiceTarget
public class DelegatingServiceTarget extends Object implements ServiceTarget
A service target which delegates to another service target.- Author:
- David M. Lloyd, Richard Opalka
-
-
Constructor Summary
Constructors Constructor Description DelegatingServiceTarget(ServiceTarget delegate)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ServiceTargetaddDependency(ServiceName dependency)Deprecated.ServiceTargetaddListener(LifecycleListener listener)Add a service lifecycle listener that will be added to this service.ServiceTargetaddMonitor(StabilityMonitor monitor)Deprecated.ServiceBuilder<?>addService()Get a builder which can be used to add a service to this target.ServiceBuilder<?>addService(ServiceName name)Deprecated.<T> ServiceBuilder<T>addService(ServiceName name, Service<T> service)Deprecated.protected ServiceTargetgetDelegate()Get the ServiceTarget delegate.ServiceTargetremoveListener(LifecycleListener listener)Remove a lifecycle listener from this target, if it exists.ServiceTargetremoveMonitor(StabilityMonitor monitor)Deprecated.ServiceTargetsubTarget()Create a sub-target using this as the parent target.
-
-
-
Constructor Detail
-
DelegatingServiceTarget
public DelegatingServiceTarget(ServiceTarget delegate)
Construct a new instance.- Parameters:
delegate- the delegate service target
-
-
Method Detail
-
getDelegate
protected ServiceTarget getDelegate()
Get the ServiceTarget delegate.- Returns:
- ServiceTarget delegate
-
addListener
public ServiceTarget addListener(LifecycleListener listener)
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
public ServiceTarget removeListener(LifecycleListener listener)
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
public ServiceBuilder<?> addService()
Get a builder which can be used to add a service to this target.- Specified by:
addServicein interfaceServiceTarget- Returns:
- new service configurator
-
subTarget
public ServiceTarget subTarget()
Create a sub-target using this as the parent target.- Specified by:
subTargetin interfaceServiceTarget- Returns:
- the new service target
-
addService
@Deprecated public ServiceBuilder<?> addService(ServiceName name)
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 public <T> ServiceBuilder<T> addService(ServiceName name, Service<T> service)
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 public ServiceTarget addDependency(ServiceName dependency)
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 public ServiceTarget addMonitor(StabilityMonitor monitor)
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 public ServiceTarget removeMonitor(StabilityMonitor monitor)
Deprecated.Remove a monitor from this target, if it exists.- Specified by:
removeMonitorin interfaceServiceTarget- Parameters:
monitor- the monitor to remove- Returns:
- this target
-
-