Package org.wildfly.service
Interface ServiceInstaller
-
- All Superinterfaces:
Installer<org.jboss.msc.service.ServiceTarget>
- All Known Implementing Classes:
ServiceInstaller.DefaultServiceInstaller
public interface ServiceInstaller extends Installer<org.jboss.msc.service.ServiceTarget>
Encapsulates service installation into aServiceTarget.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceServiceInstaller.AsyncBuilder<B>Implemented by builds with asynchronous service support.static interfaceServiceInstaller.BuilderBuilds aServiceInstaller.static classServiceInstaller.DefaultNullaryBuilderstatic classServiceInstaller.DefaultServiceInstallerstatic classServiceInstaller.DefaultUnaryBuilder<T,V>static interfaceServiceInstaller.UnaryBuilder<T,V>Builds aServiceInstallerwhose service provides a single value.-
Nested classes/interfaces inherited from interface org.wildfly.service.Installer
Installer.AbstractBuilder<B,I extends Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, Installer.AbstractNullaryBuilder<B,I extends Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, Installer.AbstractUnaryBuilder<B,I extends Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>,T,V>, Installer.Configuration<SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, Installer.DefaultInstaller<ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, Installer.UnaryService<T,V>
-
-
Method Summary
Static Methods Modifier and Type Method Description static ServiceInstaller.Builderbuilder(Runnable startTask, Runnable stopTask)Returns aServiceInstallerbuilder that executes the specified tasks onService.start(StartContext)andService.stop(StopContext), respectively.static <T,V>
ServiceInstaller.UnaryBuilder<T,V>builder(Function<T,V> mapper, Supplier<T> factory)Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified factory and mapping function.static <V> ServiceInstaller.UnaryBuilder<V,V>builder(Supplier<V> factory)Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified factory.static <V> ServiceInstaller.UnaryBuilder<V,V>builder(ServiceDependency<V> dependency)Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified dependency.static ServiceInstaller.Builderbuilder(ServiceInstaller installer)Returns aServiceInstallerbuilder that installs the specified installer into a child target.static <V> ServiceInstaller.UnaryBuilder<V,V>builder(V value)Returns aServiceInstallerbuilder whose installed service provides the specified value.
-
-
-
Method Detail
-
builder
static <V> ServiceInstaller.UnaryBuilder<V,V> builder(V value)
Returns aServiceInstallerbuilder whose installed service provides the specified value.- Type Parameters:
V- the service value type- Parameters:
value- the service value- Returns:
- a service installer builder
-
builder
static <V> ServiceInstaller.UnaryBuilder<V,V> builder(ServiceDependency<V> dependency)
Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified dependency.- Type Parameters:
V- the service value type- Parameters:
dependency- a service dependency- Returns:
- a service installer builder
-
builder
static <V> ServiceInstaller.UnaryBuilder<V,V> builder(Supplier<V> factory)
Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified factory.- Type Parameters:
V- the service value type- Parameters:
factory- provides the service value- Returns:
- a service installer builder
-
builder
static <T,V> ServiceInstaller.UnaryBuilder<T,V> builder(Function<T,V> mapper, Supplier<T> factory)
Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified factory and mapping function.- Type Parameters:
T- the source value typeV- the service value type- Parameters:
mapper- a function that returns the service value given the value supplied by the factoryfactory- provides the input to the specified mapper- Returns:
- a service installer builder
-
builder
static ServiceInstaller.Builder builder(ServiceInstaller installer)
Returns aServiceInstallerbuilder that installs the specified installer into a child target.- Parameters:
installer- a service installer- Returns:
- a service installer builder
-
builder
static ServiceInstaller.Builder builder(Runnable startTask, Runnable stopTask)
Returns aServiceInstallerbuilder that executes the specified tasks onService.start(StartContext)andService.stop(StopContext), respectively.- Parameters:
startTask- a start taskstopTask- a stop task- Returns:
- a service installer builder
-
-