T
- the service typepublic final class DelegatingServiceBuilder<T> extends Object implements ServiceBuilder<T>
ServiceBuilder.DependencyType
Constructor and Description |
---|
DelegatingServiceBuilder(ServiceBuilder<T> delegate)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
ServiceBuilder<T> |
addAliases(ServiceName... aliases)
Add aliases for this service.
|
ServiceBuilder<T> |
addDependencies(Iterable<ServiceName> dependencies)
Add multiple, non-injected dependencies.
|
ServiceBuilder<T> |
addDependencies(ServiceBuilder.DependencyType dependencyType,
Iterable<ServiceName> dependencies)
Add multiple, non-injected dependencies.
|
ServiceBuilder<T> |
addDependencies(ServiceBuilder.DependencyType dependencyType,
ServiceName... dependencies)
Add multiple, non-injected dependencies.
|
ServiceBuilder<T> |
addDependencies(ServiceName... dependencies)
Add multiple, non-injected dependencies.
|
ServiceBuilder<T> |
addDependency(ServiceBuilder.DependencyType dependencyType,
ServiceName dependency)
Add a dependency.
|
<I> ServiceBuilder<T> |
addDependency(ServiceBuilder.DependencyType dependencyType,
ServiceName dependency,
Class<I> type,
Injector<I> target)
Add a service dependency.
|
ServiceBuilder<T> |
addDependency(ServiceBuilder.DependencyType dependencyType,
ServiceName dependency,
Injector<Object> target)
Add a service dependency.
|
ServiceBuilder<T> |
addDependency(ServiceName dependency)
Add a dependency.
|
<I> ServiceBuilder<T> |
addDependency(ServiceName dependency,
Class<I> type,
Injector<I> target)
Add a service dependency.
|
ServiceBuilder<T> |
addDependency(ServiceName dependency,
Injector<Object> target)
Add a service dependency.
|
<I> ServiceBuilder<T> |
addInjection(Injector<? super I> target,
I value)
Add an injection.
|
ServiceBuilder<T> |
addInjection(Injector<? super T> target)
Add an injection of this service into another target.
|
<I> ServiceBuilder<T> |
addInjectionValue(Injector<? super I> target,
Value<I> value)
Add an injection value.
|
ServiceBuilder<T> |
addListener(Collection<? extends ServiceListener<? super T>> listeners)
Add service listeners that will be added to this service.
|
ServiceBuilder<T> |
addListener(ServiceListener.Inheritance inheritance,
Collection<? extends ServiceListener<? super T>> listeners)
Add service listeners that will be added to this service.
|
ServiceBuilder<T> |
addListener(ServiceListener.Inheritance inheritance,
ServiceListener<? super T>... listeners)
Add service listeners that will be added to this service.
|
ServiceBuilder<T> |
addListener(ServiceListener.Inheritance inheritance,
ServiceListener<? super T> listener)
Add a service listener that will be added to this service.
|
ServiceBuilder<T> |
addListener(ServiceListener<? super T>... listeners)
Add service listeners that will be added to this service.
|
ServiceBuilder<T> |
addListener(ServiceListener<? super T> listener)
Add a service listener that will be added to this service.
|
ServiceBuilder<T> |
addMonitor(StabilityMonitor monitor)
Add a service stability monitor that will be added to this service.
|
ServiceBuilder<T> |
addMonitors(StabilityMonitor... monitors)
Add service stability monitors that will be added to this service.
|
ServiceController<T> |
install()
Install the defined service into the container.
|
ServiceBuilder<T> |
setInitialMode(ServiceController.Mode mode)
Set the initial mode.
|
public DelegatingServiceBuilder(ServiceBuilder<T> delegate)
delegate
- the builder to delegate topublic ServiceBuilder<T> addAliases(ServiceName... aliases)
addAliases
in interface ServiceBuilder<T>
aliases
- the service names to use as aliasespublic ServiceBuilder<T> setInitialMode(ServiceController.Mode mode)
setInitialMode
in interface ServiceBuilder<T>
mode
- the initial modepublic ServiceBuilder<T> addDependencies(ServiceName... dependencies)
addDependencies
in interface ServiceBuilder<T>
dependencies
- the service names to depend onpublic ServiceBuilder<T> addDependencies(ServiceBuilder.DependencyType dependencyType, ServiceName... dependencies)
addDependencies
in interface ServiceBuilder<T>
dependencyType
- the dependency type; must not be null
dependencies
- the service names to depend onpublic ServiceBuilder<T> addDependencies(Iterable<ServiceName> dependencies)
addDependencies
in interface ServiceBuilder<T>
dependencies
- the service names to depend onpublic ServiceBuilder<T> addDependencies(ServiceBuilder.DependencyType dependencyType, Iterable<ServiceName> dependencies)
addDependencies
in interface ServiceBuilder<T>
dependencyType
- the dependency type; must not be null
dependencies
- the service names to depend onpublic ServiceBuilder<T> addDependency(ServiceName dependency)
addDependency
in interface ServiceBuilder<T>
dependency
- the name of the dependencypublic ServiceBuilder<T> addDependency(ServiceBuilder.DependencyType dependencyType, ServiceName dependency)
addDependency
in interface ServiceBuilder<T>
dependencyType
- the dependency type; must not be null
dependency
- the name of the dependencypublic ServiceBuilder<T> addDependency(ServiceName dependency, Injector<Object> target)
addDependency
in interface ServiceBuilder<T>
dependency
- the name of the dependencytarget
- the injector into which the dependency should be storedpublic ServiceBuilder<T> addDependency(ServiceBuilder.DependencyType dependencyType, ServiceName dependency, Injector<Object> target)
addDependency
in interface ServiceBuilder<T>
dependencyType
- the dependency type; must not be null
dependency
- the name of the dependencytarget
- the injector into which the dependency should be storedpublic <I> ServiceBuilder<T> addDependency(ServiceName dependency, Class<I> type, Injector<I> target)
addDependency
in interface ServiceBuilder<T>
I
- the type of the value of the dependencydependency
- the name of the dependencytype
- the class of the value of the dependencytarget
- the injector into which the dependency should be storedpublic <I> ServiceBuilder<T> addDependency(ServiceBuilder.DependencyType dependencyType, ServiceName dependency, Class<I> type, Injector<I> target)
addDependency
in interface ServiceBuilder<T>
I
- the type of the value of the dependencydependencyType
- the dependency type; must not be null
dependency
- the name of the dependencytype
- the class of the value of the dependencytarget
- the injector into which the dependency should be storedpublic <I> ServiceBuilder<T> addInjection(Injector<? super I> target, I value)
addInjection
in interface ServiceBuilder<T>
I
- the injection typetarget
- the injection targetvalue
- the injection valuepublic <I> ServiceBuilder<T> addInjectionValue(Injector<? super I> target, Value<I> value)
addInjectionValue
in interface ServiceBuilder<T>
I
- the injection typetarget
- the injection targetvalue
- the injection valuepublic ServiceBuilder<T> addInjection(Injector<? super T> target)
Differently from other injection types, failures to perform an outward injection will not result in a failure to start the service.
addInjection
in interface ServiceBuilder<T>
target
- the injector targetpublic ServiceBuilder<T> addMonitor(StabilityMonitor monitor)
ServiceBuilder
addMonitor
in interface ServiceBuilder<T>
monitor
- the stability monitor to add to the servicepublic ServiceBuilder<T> addMonitors(StabilityMonitor... monitors)
ServiceBuilder
addMonitors
in interface ServiceBuilder<T>
monitors
- a list of stability monitors to add to the servicepublic ServiceBuilder<T> addListener(ServiceListener<? super T> listener)
addListener
in interface ServiceBuilder<T>
listener
- the listener to add to the servicepublic ServiceBuilder<T> addListener(ServiceListener<? super T>... listeners)
addListener
in interface ServiceBuilder<T>
listeners
- a list of listeners to add to the servicepublic ServiceBuilder<T> addListener(Collection<? extends ServiceListener<? super T>> listeners)
addListener
in interface ServiceBuilder<T>
listeners
- a collection of listeners to add to the servicepublic ServiceBuilder<T> addListener(ServiceListener.Inheritance inheritance, ServiceListener<? super T> listener)
addListener
in interface ServiceBuilder<T>
inheritance
- the inheritance type for this listenerlistener
- the listener to add to the servicepublic ServiceBuilder<T> addListener(ServiceListener.Inheritance inheritance, ServiceListener<? super T>... listeners)
addListener
in interface ServiceBuilder<T>
inheritance
- the inheritance type for this listenerlisteners
- a list of listeners to add to the servicepublic ServiceBuilder<T> addListener(ServiceListener.Inheritance inheritance, Collection<? extends ServiceListener<? super T>> listeners)
addListener
in interface ServiceBuilder<T>
inheritance
- the inheritance type for this listenerlisteners
- a collection of listeners to add to the servicepublic ServiceController<T> install() throws ServiceRegistryException
install
in interface ServiceBuilder<T>
ServiceRegistryException
- if installation failsCopyright © 2018 JBoss by Red Hat. All rights reserved.