Package org.jboss.msc.service
Class BatchServiceTargetImpl
- java.lang.Object
-
- org.jboss.msc.service.ServiceTargetImpl
-
- org.jboss.msc.service.BatchServiceTargetImpl
-
- All Implemented Interfaces:
BatchServiceTarget
,ServiceTarget
class BatchServiceTargetImpl extends ServiceTargetImpl implements BatchServiceTarget
BatchServiceTarget
implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<ServiceController<?>>
addedServiceControllers
-
Constructor Summary
Constructors Constructor Description BatchServiceTargetImpl(ServiceTargetImpl parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchServiceTarget
addDependency(java.util.Collection<ServiceName> dependencies)
Add a collection of dependencies that will be added to the all ServiceBuilders installed in this targetBatchServiceTarget
addDependency(ServiceName dependency)
Add a dependency that will be added to the all ServiceBuilders installed in this target.BatchServiceTarget
addDependency(ServiceName... dependencies)
Add a list of dependencies that will be added to the all ServiceBuilders installed in this target.BatchServiceTarget
addListener(java.util.Collection<ServiceListener<java.lang.Object>> listeners)
Add a collection of service listener that will be added to all ServiceBuilders installed in this target.BatchServiceTarget
addListener(ServiceListener<java.lang.Object> listener)
Add a service listener that will be added to all the ServiceBuilders installed in this target.BatchServiceTarget
addListener(ServiceListener<java.lang.Object>... listeners)
Add a list of service listener that will be added to all ServiceBuilders installed in this target.BatchServiceTarget
addMonitor(StabilityMonitor monitor)
Add a stability monitor that will be added to all the ServiceBuilders installed in this target.BatchServiceTarget
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.(package private) <T> ServiceController<T>
install(ServiceBuilderImpl<T> serviceBuilder)
InstallserviceBuilder
in this target.BatchServiceTarget
removeDependency(ServiceName dependency)
Remove a dependency from this target.BatchServiceTarget
removeListener(ServiceListener<java.lang.Object> listener)
Remove a listener from this target, if it exists.BatchServiceTarget
removeMonitor(StabilityMonitor monitor)
Remove a monitor from this target, if it exists.void
removeServices()
Removes all services installed into this target so far.-
Methods inherited from class org.jboss.msc.service.ServiceTargetImpl
addServiceValue, apply, batchTarget, createServiceBuilder, getDependencies, getListeners, getMonitors, getServiceRegistry, subTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.msc.service.ServiceTarget
addServiceValue, batchTarget, getDependencies, getListeners, getMonitors, subTarget
-
-
-
-
Field Detail
-
addedServiceControllers
private final java.util.Collection<ServiceController<?>> addedServiceControllers
-
-
Constructor Detail
-
BatchServiceTargetImpl
BatchServiceTargetImpl(ServiceTargetImpl parent)
-
-
Method Detail
-
removeServices
public void removeServices()
Description copied from interface:BatchServiceTarget
Removes all services installed into this target so far.- Specified by:
removeServices
in interfaceBatchServiceTarget
-
install
<T> ServiceController<T> install(ServiceBuilderImpl<T> serviceBuilder) throws ServiceRegistryException
Description copied from class:ServiceTargetImpl
InstallserviceBuilder
in this target.- Overrides:
install
in classServiceTargetImpl
- Parameters:
serviceBuilder
- a serviceBuilder created by this ServiceTarget- Returns:
- the installed service controller
- Throws:
ServiceRegistryException
- if a service registry issue occurred during installation
-
addService
public <T> ServiceBuilder<T> addService(ServiceName name, Service<T> service)
Description copied from interface:ServiceTarget
Get a builder which can be used to add a service to this target.- Specified by:
addService
in interfaceServiceTarget
- Overrides:
addService
in classServiceTargetImpl
- Parameters:
name
- the service nameservice
- the service- Returns:
- the builder for the service
-
addMonitor
public BatchServiceTarget addMonitor(StabilityMonitor monitor)
Description copied from interface:ServiceTarget
Add a stability monitor that will be added to all the ServiceBuilders installed in this target.- Specified by:
addMonitor
in interfaceBatchServiceTarget
- Specified by:
addMonitor
in interfaceServiceTarget
- Overrides:
addMonitor
in classServiceTargetImpl
- Parameters:
monitor
- the monitor to add to the target- Returns:
- this target
-
addMonitors
public BatchServiceTarget addMonitors(StabilityMonitor... monitors)
Description copied from interface:ServiceTarget
Add a stability monitors that will be added to all the ServiceBuilders installed in this target.- Specified by:
addMonitors
in interfaceBatchServiceTarget
- Specified by:
addMonitors
in interfaceServiceTarget
- Overrides:
addMonitors
in classServiceTargetImpl
- Parameters:
monitors
- the monitors to add to the target- Returns:
- this target
-
removeMonitor
public BatchServiceTarget removeMonitor(StabilityMonitor monitor)
Description copied from interface:ServiceTarget
Remove a monitor from this target, if it exists.- Specified by:
removeMonitor
in interfaceBatchServiceTarget
- Specified by:
removeMonitor
in interfaceServiceTarget
- Overrides:
removeMonitor
in classServiceTargetImpl
- Parameters:
monitor
- the monitor to remove- Returns:
- this target
-
addListener
public BatchServiceTarget addListener(ServiceListener<java.lang.Object> listener)
Description copied from interface:ServiceTarget
Add a service listener that will be added to all the ServiceBuilders installed in this target.- Specified by:
addListener
in interfaceBatchServiceTarget
- Specified by:
addListener
in interfaceServiceTarget
- Overrides:
addListener
in classServiceTargetImpl
- Parameters:
listener
- the listener to add to the target- Returns:
- this target
-
addListener
public BatchServiceTarget addListener(ServiceListener<java.lang.Object>... listeners)
Description copied from interface:ServiceTarget
Add a list of service listener that will be added to all ServiceBuilders installed in this target.- Specified by:
addListener
in interfaceBatchServiceTarget
- Specified by:
addListener
in interfaceServiceTarget
- Overrides:
addListener
in classServiceTargetImpl
- Parameters:
listeners
- a list of listeners to add to the target- Returns:
- this target
-
addListener
public BatchServiceTarget addListener(java.util.Collection<ServiceListener<java.lang.Object>> listeners)
Description copied from interface:ServiceTarget
Add a collection of service listener that will be added to all ServiceBuilders installed in this target.- Specified by:
addListener
in interfaceBatchServiceTarget
- Specified by:
addListener
in interfaceServiceTarget
- Overrides:
addListener
in classServiceTargetImpl
- Parameters:
listeners
- a collection of listeners to add to the target- Returns:
- this target
-
removeListener
public BatchServiceTarget removeListener(ServiceListener<java.lang.Object> listener)
Description copied from interface:ServiceTarget
Remove a listener from this target, if it exists.- Specified by:
removeListener
in interfaceBatchServiceTarget
- Specified by:
removeListener
in interfaceServiceTarget
- Overrides:
removeListener
in classServiceTargetImpl
- Parameters:
listener
- the listener to remove- Returns:
- this target
-
addDependency
public BatchServiceTarget addDependency(ServiceName dependency)
Description copied from interface:ServiceTarget
Add a dependency that will be added to the all ServiceBuilders installed in this target.- Specified by:
addDependency
in interfaceBatchServiceTarget
- Specified by:
addDependency
in interfaceServiceTarget
- Overrides:
addDependency
in classServiceTargetImpl
- Parameters:
dependency
- the dependency to add to the target- Returns:
- this target
-
addDependency
public BatchServiceTarget addDependency(ServiceName... dependencies)
Description copied from interface:ServiceTarget
Add a list of dependencies that will be added to the all ServiceBuilders installed in this target.- Specified by:
addDependency
in interfaceBatchServiceTarget
- Specified by:
addDependency
in interfaceServiceTarget
- Overrides:
addDependency
in classServiceTargetImpl
- Parameters:
dependencies
- a list of dependencies to add to the target- Returns:
- this target
-
addDependency
public BatchServiceTarget addDependency(java.util.Collection<ServiceName> dependencies)
Description copied from interface:ServiceTarget
Add a collection of dependencies that will be added to the all ServiceBuilders installed in this target- Specified by:
addDependency
in interfaceBatchServiceTarget
- Specified by:
addDependency
in interfaceServiceTarget
- Overrides:
addDependency
in classServiceTargetImpl
- Parameters:
dependencies
- a collection of dependencies to add to this target- Returns:
- this target
-
removeDependency
public BatchServiceTarget removeDependency(ServiceName dependency)
Description copied from interface:ServiceTarget
Remove a dependency from this target. Subsequently defined services will not have this dependency.- Specified by:
removeDependency
in interfaceBatchServiceTarget
- Specified by:
removeDependency
in interfaceServiceTarget
- Overrides:
removeDependency
in classServiceTargetImpl
- Parameters:
dependency
- the dependency- Returns:
- this target
-
-