Package org.wildfly.service
Interface Installer.Builder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends ServiceBuilder<?>>
- Type Parameters:
B- the builder typeI- the installer typeST- the service target typeSB- the service builder type
- All Known Subinterfaces:
CapabilityServiceInstaller.Builder<T,,V> Installer.UnaryBuilder<B,,I, ST, SB, T, V> ServiceInstaller.Builder,ServiceInstaller.Builder,ServiceInstaller.UnaryBuilder<T,,V> ServiceInstaller.UnaryBuilder<T,V>
- All Known Implementing Classes:
CapabilityServiceInstaller.DefaultBuilder,Installer.AbstractBuilder,Installer.AbstractNullaryBuilder,Installer.AbstractUnaryBuilder,ServiceInstaller.DefaultNullaryBuilder,ServiceInstaller.DefaultNullaryBuilder,ServiceInstaller.DefaultUnaryBuilder,ServiceInstaller.DefaultUnaryBuilder
- Enclosing interface:
- Installer<ST extends ServiceTarget>
public static interface Installer.Builder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends ServiceBuilder<?>>
Builds an installer of a service.
-
Method Summary
Modifier and TypeMethodDescriptionasActive()Configures the installed service to start immediately after installation, forcing any dependencies to start.Configures the installed service to automatically start when all of its dependencies are available and to automatically stop when any of its dependencies are no longer available.build()Builds a service installer.Configures the specified task to be run upon removal of the installed service.Configures the specified task to be run after the installed service is started.Configures the specified task to be run after the installed service is stopped.default BConfigures dependencies of the installed service.Configures a dependency of the installed service.
-
Method Details
-
requires
Configures a dependency of the installed service.- Parameters:
dependency- a dependency- Returns:
- a reference to this builder
-
requires
Configures dependencies of the installed service.- Parameters:
dependencies- a variable number of dependencies- Returns:
- a reference to this builder
-
asPassive
B asPassive()Configures the installed service to automatically start when all of its dependencies are available and to automatically stop when any of its dependencies are no longer available.- Returns:
- a reference to this builder
-
asActive
B asActive()Configures the installed service to start immediately after installation, forcing any dependencies to start.- Returns:
- a reference to this builder
-
onStart
Configures the specified task to be run after the installed service is started.- Parameters:
task- a task to execute upon service start- Returns:
- a reference to this builder
-
onStop
Configures the specified task to be run after the installed service is stopped.- Parameters:
task- a task to execute upon service stop- Returns:
- a reference to this builder
-
onRemove
Configures the specified task to be run upon removal of the installed service.- Parameters:
task- a task to execute upon service removal- Returns:
- a reference to this builder
-
build
I build()Builds a service installer.- Returns:
- a service installer
-