public final class DelegatingServiceTarget extends Object implements ServiceTarget
| Constructor and Description |
|---|
DelegatingServiceTarget(ServiceTarget delegate)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceTarget |
addDependency(Collection<ServiceName> dependencies)
Add a collection of dependencies that will be added to the all ServiceBuilders installed in this target
|
ServiceTarget |
addDependency(ServiceName... dependencies)
Add a list of dependencies that will be added to the all ServiceBuilders installed in this target.
|
ServiceTarget |
addDependency(ServiceName dependency)
Add a dependency that will be added to the all ServiceBuilders installed in this target.
|
ServiceTarget |
addListener(Collection<ServiceListener<Object>> listeners)
Add a collection of service listener that will be added to all ServiceBuilders installed in this target.
|
ServiceTarget |
addListener(ServiceListener<Object>... listeners)
Add a list of service listener that will be added to all ServiceBuilders installed in this target.
|
ServiceTarget |
addListener(ServiceListener<Object> listener)
Add a service listener that will be added to all the ServiceBuilders installed in this target.
|
ServiceTarget |
addMonitor(StabilityMonitor monitor)
Add a stability monitor that will be added to all the ServiceBuilders installed in this target.
|
ServiceTarget |
addMonitors(StabilityMonitor... monitors)
Add a stability monitors that will be added to all the ServiceBuilders installed in this target.
|
<T> ServiceBuilder<T> |
addService(ServiceName name,
Service<T> service)
Get a builder which can be used to add a service to this target.
|
<T> ServiceBuilder<T> |
addServiceValue(ServiceName name,
Value<? extends Service<T>> value)
Get a builder which can be used to add a service to this target.
|
BatchServiceTarget |
batchTarget()
Create a new batch service target, which is used to install described services in this target.
|
Set<ServiceName> |
getDependencies()
Returns a set of all dependencies added to this target.
|
Set<ServiceListener<Object>> |
getListeners()
Returns a set of the listeners added to this target.
|
Set<StabilityMonitor> |
getMonitors()
Returns a set of the monitors added to this target.
|
ServiceTarget |
removeDependency(ServiceName dependency)
Remove a dependency from this target.
|
ServiceTarget |
removeListener(ServiceListener<Object> listener)
Remove a listener from this target, if it exists.
|
ServiceTarget |
removeMonitor(StabilityMonitor monitor)
Remove a monitor from this target, if it exists.
|
ServiceTarget |
subTarget()
Create a sub-target using this as the parent target.
|
public DelegatingServiceTarget(ServiceTarget delegate)
delegate - the delegate service targetpublic <T> ServiceBuilder<T> addServiceValue(ServiceName name, Value<? extends Service<T>> value) throws IllegalArgumentException
addServiceValue in interface ServiceTargetname - the service namevalue - the service valueIllegalArgumentExceptionpublic <T> ServiceBuilder<T> addService(ServiceName name, Service<T> service) throws IllegalArgumentException
addService in interface ServiceTargetname - the service nameservice - the serviceIllegalArgumentExceptionpublic ServiceTarget addListener(ServiceListener<Object> listener)
addListener in interface ServiceTargetlistener - the listener to add to the targetpublic ServiceTarget addListener(ServiceListener<Object>... listeners)
addListener in interface ServiceTargetlisteners - a list of listeners to add to the targetpublic ServiceTarget addListener(Collection<ServiceListener<Object>> listeners)
addListener in interface ServiceTargetlisteners - a collection of listeners to add to the targetpublic ServiceTarget removeListener(ServiceListener<Object> listener)
removeListener in interface ServiceTargetlistener - the listener to removepublic Set<ServiceListener<Object>> getListeners()
getListeners in interface ServiceTargetpublic ServiceTarget addDependency(ServiceName dependency)
addDependency in interface ServiceTargetdependency - the dependency to add to the targetpublic ServiceTarget addDependency(ServiceName... dependencies)
addDependency in interface ServiceTargetdependencies - a list of dependencies to add to the targetpublic ServiceTarget addDependency(Collection<ServiceName> dependencies)
addDependency in interface ServiceTargetdependencies - a collection of dependencies to add to this targetpublic ServiceTarget removeDependency(ServiceName dependency)
removeDependency in interface ServiceTargetdependency - the dependencypublic Set<ServiceName> getDependencies()
getDependencies in interface ServiceTargetpublic ServiceTarget subTarget()
subTarget in interface ServiceTargetpublic BatchServiceTarget batchTarget()
batchTarget in interface ServiceTargetpublic ServiceTarget addMonitor(StabilityMonitor monitor)
addMonitor in interface ServiceTargetmonitor - the monitor to add to the targetpublic ServiceTarget addMonitors(StabilityMonitor... monitors)
addMonitors in interface ServiceTargetmonitors - the monitors to add to the targetpublic ServiceTarget removeMonitor(StabilityMonitor monitor)
removeMonitor in interface ServiceTargetmonitor - the monitor to removepublic Set<StabilityMonitor> getMonitors()
getMonitors in interface ServiceTargetCopyright © 2017 JBoss by Red Hat. All rights reserved.