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 ServiceTarget
addDependency(ServiceName dependency)
Deprecated.ServiceTarget
addListener(LifecycleListener listener)
Add a service lifecycle listener that will be added to this service.ServiceTarget
addMonitor(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 ServiceTarget
getDelegate()
Get the ServiceTarget delegate.ServiceTarget
removeListener(LifecycleListener listener)
Remove a lifecycle listener from this target, if it exists.ServiceTarget
removeMonitor(StabilityMonitor monitor)
Deprecated.ServiceTarget
subTarget()
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:
addListener
in 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:
removeListener
in 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:
addService
in interfaceServiceTarget
- Returns:
- new service configurator
-
subTarget
public ServiceTarget subTarget()
Create a sub-target using this as the parent target.- Specified by:
subTarget
in 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:
addService
in 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:
addService
in 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:
addDependency
in 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:
addMonitor
in 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:
removeMonitor
in interfaceServiceTarget
- Parameters:
monitor
- the monitor to remove- Returns:
- this target
-
-