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
BatchServiceTargetimplementation.
-
-
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 BatchServiceTargetaddDependency(java.util.Collection<ServiceName> dependencies)Add a collection of dependencies that will be added to the all ServiceBuilders installed in this targetBatchServiceTargetaddDependency(ServiceName dependency)Add a dependency that will be added to the all ServiceBuilders installed in this target.BatchServiceTargetaddDependency(ServiceName... dependencies)Add a list of dependencies that will be added to the all ServiceBuilders installed in this target.BatchServiceTargetaddListener(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.BatchServiceTargetaddListener(ServiceListener<java.lang.Object> listener)Add a service listener that will be added to all the ServiceBuilders installed in this target.BatchServiceTargetaddListener(ServiceListener<java.lang.Object>... listeners)Add a list of service listener that will be added to all ServiceBuilders installed in this target.BatchServiceTargetaddMonitor(StabilityMonitor monitor)Add a stability monitor that will be added to all the ServiceBuilders installed in this target.BatchServiceTargetaddMonitors(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)InstallserviceBuilderin this target.BatchServiceTargetremoveDependency(ServiceName dependency)Remove a dependency from this target.BatchServiceTargetremoveListener(ServiceListener<java.lang.Object> listener)Remove a listener from this target, if it exists.BatchServiceTargetremoveMonitor(StabilityMonitor monitor)Remove a monitor from this target, if it exists.voidremoveServices()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:BatchServiceTargetRemoves all services installed into this target so far.- Specified by:
removeServicesin interfaceBatchServiceTarget
-
install
<T> ServiceController<T> install(ServiceBuilderImpl<T> serviceBuilder) throws ServiceRegistryException
Description copied from class:ServiceTargetImplInstallserviceBuilderin this target.- Overrides:
installin 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:ServiceTargetGet a builder which can be used to add a service to this target.- Specified by:
addServicein interfaceServiceTarget- Overrides:
addServicein classServiceTargetImpl- Parameters:
name- the service nameservice- the service- Returns:
- the builder for the service
-
addMonitor
public BatchServiceTarget addMonitor(StabilityMonitor monitor)
Description copied from interface:ServiceTargetAdd a stability monitor that will be added to all the ServiceBuilders installed in this target.- Specified by:
addMonitorin interfaceBatchServiceTarget- Specified by:
addMonitorin interfaceServiceTarget- Overrides:
addMonitorin classServiceTargetImpl- Parameters:
monitor- the monitor to add to the target- Returns:
- this target
-
addMonitors
public BatchServiceTarget addMonitors(StabilityMonitor... monitors)
Description copied from interface:ServiceTargetAdd a stability monitors that will be added to all the ServiceBuilders installed in this target.- Specified by:
addMonitorsin interfaceBatchServiceTarget- Specified by:
addMonitorsin interfaceServiceTarget- Overrides:
addMonitorsin classServiceTargetImpl- Parameters:
monitors- the monitors to add to the target- Returns:
- this target
-
removeMonitor
public BatchServiceTarget removeMonitor(StabilityMonitor monitor)
Description copied from interface:ServiceTargetRemove a monitor from this target, if it exists.- Specified by:
removeMonitorin interfaceBatchServiceTarget- Specified by:
removeMonitorin interfaceServiceTarget- Overrides:
removeMonitorin classServiceTargetImpl- Parameters:
monitor- the monitor to remove- Returns:
- this target
-
addListener
public BatchServiceTarget addListener(ServiceListener<java.lang.Object> listener)
Description copied from interface:ServiceTargetAdd a service listener that will be added to all the ServiceBuilders installed in this target.- Specified by:
addListenerin interfaceBatchServiceTarget- Specified by:
addListenerin interfaceServiceTarget- Overrides:
addListenerin 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:ServiceTargetAdd a list of service listener that will be added to all ServiceBuilders installed in this target.- Specified by:
addListenerin interfaceBatchServiceTarget- Specified by:
addListenerin interfaceServiceTarget- Overrides:
addListenerin 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:ServiceTargetAdd a collection of service listener that will be added to all ServiceBuilders installed in this target.- Specified by:
addListenerin interfaceBatchServiceTarget- Specified by:
addListenerin interfaceServiceTarget- Overrides:
addListenerin 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:ServiceTargetRemove a listener from this target, if it exists.- Specified by:
removeListenerin interfaceBatchServiceTarget- Specified by:
removeListenerin interfaceServiceTarget- Overrides:
removeListenerin classServiceTargetImpl- Parameters:
listener- the listener to remove- Returns:
- this target
-
addDependency
public BatchServiceTarget addDependency(ServiceName dependency)
Description copied from interface:ServiceTargetAdd a dependency that will be added to the all ServiceBuilders installed in this target.- Specified by:
addDependencyin interfaceBatchServiceTarget- Specified by:
addDependencyin interfaceServiceTarget- Overrides:
addDependencyin classServiceTargetImpl- Parameters:
dependency- the dependency to add to the target- Returns:
- this target
-
addDependency
public BatchServiceTarget addDependency(ServiceName... dependencies)
Description copied from interface:ServiceTargetAdd a list of dependencies that will be added to the all ServiceBuilders installed in this target.- Specified by:
addDependencyin interfaceBatchServiceTarget- Specified by:
addDependencyin interfaceServiceTarget- Overrides:
addDependencyin 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:ServiceTargetAdd a collection of dependencies that will be added to the all ServiceBuilders installed in this target- Specified by:
addDependencyin interfaceBatchServiceTarget- Specified by:
addDependencyin interfaceServiceTarget- Overrides:
addDependencyin 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:ServiceTargetRemove a dependency from this target. Subsequently defined services will not have this dependency.- Specified by:
removeDependencyin interfaceBatchServiceTarget- Specified by:
removeDependencyin interfaceServiceTarget- Overrides:
removeDependencyin classServiceTargetImpl- Parameters:
dependency- the dependency- Returns:
- this target
-
-