Package org.wildfly.service
Class Installer.AbstractBuilder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends DSB,DSB extends ServiceBuilder<?>>
java.lang.Object
org.wildfly.service.Installer.AbstractBuilder<B,I,ST,SB,DSB>
- All Implemented Interfaces:
Installer.Builder<B,,I, ST, DSB> Installer.Configuration<SB,DSB>
- Direct Known Subclasses:
Installer.AbstractNullaryBuilder,Installer.AbstractUnaryBuilder
- Enclosing interface:
- Installer<ST extends ServiceTarget>
public abstract static class Installer.AbstractBuilder<B,I extends Installer<ST>,ST extends ServiceTarget,SB extends DSB,DSB extends ServiceBuilder<?>>
extends Object
implements Installer.Builder<B,I,ST,DSB>, Installer.Configuration<SB,DSB>
-
Constructor Summary
Constructors -
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.protected abstract Bbuilder()Returns the dependency of this serviceReturns the initial mode of the installed service.Returns tasks to be run per lifecycle event.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.Configures a dependency of the installed service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.service.Installer.Builder
build, requiresMethods inherited from interface org.wildfly.service.Installer.Configuration
getServiceFactory
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
builder
-
asPassive
Description copied from interface:Installer.BuilderConfigures 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.- Specified by:
asPassivein interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Returns:
- a reference to this builder
-
asActive
Description copied from interface:Installer.BuilderConfigures the installed service to start immediately after installation, forcing any dependencies to start.- Specified by:
asActivein interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Returns:
- a reference to this builder
-
requires
Description copied from interface:Installer.BuilderConfigures a dependency of the installed service.- Specified by:
requiresin interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Parameters:
dependency- a dependency- Returns:
- a reference to this builder
-
onStart
Description copied from interface:Installer.BuilderConfigures the specified task to be run after the installed service is started.- Specified by:
onStartin interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Parameters:
task- a task to execute upon service start- Returns:
- a reference to this builder
-
onStop
Description copied from interface:Installer.BuilderConfigures the specified task to be run after the installed service is stopped.- Specified by:
onStopin interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Parameters:
task- a task to execute upon service stop- Returns:
- a reference to this builder
-
onRemove
Description copied from interface:Installer.BuilderConfigures the specified task to be run upon removal of the installed service.- Specified by:
onRemovein interfaceInstaller.Builder<B,I extends Installer<ST>, ST extends ServiceTarget, SB extends DSB> - Parameters:
task- a task to execute upon service removal- Returns:
- a reference to this builder
-
getInitialMode
Description copied from interface:Installer.ConfigurationReturns the initial mode of the installed service.- Specified by:
getInitialModein interfaceInstaller.Configuration<B,I extends Installer<ST>> - Returns:
- a service mode
-
getDependency
Description copied from interface:Installer.ConfigurationReturns the dependency of this service- Specified by:
getDependencyin interfaceInstaller.Configuration<B,I extends Installer<ST>> - Returns:
- a service dependency
-
getLifecycleTasks
Description copied from interface:Installer.ConfigurationReturns tasks to be run per lifecycle event. The returned map is either fully populated, or an empty map, if this service has no lifecycle tasks.- Specified by:
getLifecycleTasksin interfaceInstaller.Configuration<B,I extends Installer<ST>> - Returns:
- a potentially empty map of tasks to be run per lifecycle event.
-