Package org.wildfly.service
Interface Installer.UnaryBuilder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends ServiceBuilder<?>,T,V>
- Type Parameters:
B- the builder typeI- the installer typeST- the service target typeSB- the service builder typeT- the source value typeV- the service value type
- All Superinterfaces:
Installer.Builder<B,I, ST, SB>
- All Known Subinterfaces:
CapabilityServiceInstaller.Builder<T,,V> ServiceInstaller.UnaryBuilder<T,,V> ServiceInstaller.UnaryBuilder<T,V>
- All Known Implementing Classes:
CapabilityServiceInstaller.DefaultBuilder,Installer.AbstractUnaryBuilder,ServiceInstaller.DefaultUnaryBuilder,ServiceInstaller.DefaultUnaryBuilder
- Enclosing interface:
- Installer<ST extends ServiceTarget>
public static interface Installer.UnaryBuilder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends ServiceBuilder<?>,T,V>
extends Installer.Builder<B,I,ST,SB>
Builds an installer of a service providing a single value.
-
Method Summary
Modifier and TypeMethodDescriptionConfigures a task to run onService.start(org.jboss.msc.service.StartContext).Configures a task to run onService.stop(org.jboss.msc.service.StopContext).provides(ServiceName name) Configures a service name provided by this service.withCaptor(Consumer<V> captor) Configures a captor invoked with the service value onService.start(org.jboss.msc.service.StartContext), and with null onService.stop(StopContext).
-
Method Details
-
provides
Configures a service name provided by this service.- Parameters:
name- a service name- Returns:
- a reference to this builder
-
withCaptor
Configures a captor invoked with the service value onService.start(org.jboss.msc.service.StartContext), and with null onService.stop(StopContext).- Parameters:
captor- a consumer of the service value on start, and null on stop.- Returns:
- a reference to this builder
-
onStart
Configures a task to run onService.start(org.jboss.msc.service.StartContext).- Parameters:
task- a task consuming the service value source- Returns:
- a reference to this builder
-
onStop
Configures a task to run onService.stop(org.jboss.msc.service.StopContext).- Parameters:
task- a task consuming the service value source- Returns:
- a reference to this builder
-