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 ServiceTarget
name
- the service namevalue
- the service valueIllegalArgumentException
public <T> ServiceBuilder<T> addService(ServiceName name, Service<T> service) throws IllegalArgumentException
addService
in interface ServiceTarget
name
- the service nameservice
- the serviceIllegalArgumentException
public ServiceTarget addListener(ServiceListener<Object> listener)
addListener
in interface ServiceTarget
listener
- the listener to add to the targetpublic ServiceTarget addListener(ServiceListener<Object>... listeners)
addListener
in interface ServiceTarget
listeners
- a list of listeners to add to the targetpublic ServiceTarget addListener(Collection<ServiceListener<Object>> listeners)
addListener
in interface ServiceTarget
listeners
- a collection of listeners to add to the targetpublic ServiceTarget removeListener(ServiceListener<Object> listener)
removeListener
in interface ServiceTarget
listener
- the listener to removepublic Set<ServiceListener<Object>> getListeners()
getListeners
in interface ServiceTarget
public ServiceTarget addDependency(ServiceName dependency)
addDependency
in interface ServiceTarget
dependency
- the dependency to add to the targetpublic ServiceTarget addDependency(ServiceName... dependencies)
addDependency
in interface ServiceTarget
dependencies
- a list of dependencies to add to the targetpublic ServiceTarget addDependency(Collection<ServiceName> dependencies)
addDependency
in interface ServiceTarget
dependencies
- a collection of dependencies to add to this targetpublic ServiceTarget removeDependency(ServiceName dependency)
removeDependency
in interface ServiceTarget
dependency
- the dependencypublic Set<ServiceName> getDependencies()
getDependencies
in interface ServiceTarget
public ServiceTarget subTarget()
subTarget
in interface ServiceTarget
public BatchServiceTarget batchTarget()
batchTarget
in interface ServiceTarget
public ServiceTarget addMonitor(StabilityMonitor monitor)
addMonitor
in interface ServiceTarget
monitor
- the monitor to add to the targetpublic ServiceTarget addMonitors(StabilityMonitor... monitors)
addMonitors
in interface ServiceTarget
monitors
- the monitors to add to the targetpublic ServiceTarget removeMonitor(StabilityMonitor monitor)
removeMonitor
in interface ServiceTarget
monitor
- the monitor to removepublic Set<StabilityMonitor> getMonitors()
getMonitors
in interface ServiceTarget
Copyright © 2017 JBoss by Red Hat. All rights reserved.