Package org.wildfly.subsystem.service
Interface ServiceInstaller
-
- All Superinterfaces:
DeploymentServiceInstaller,org.wildfly.service.Installer<RequirementServiceTarget>,ResourceServiceInstaller
- All Known Implementing Classes:
ServiceInstaller.DefaultServiceInstaller
public interface ServiceInstaller extends ResourceServiceInstaller, DeploymentServiceInstaller, org.wildfly.service.Installer<RequirementServiceTarget>
AResourceServiceInstallerthat encapsulates service installation into aRequirementServiceTarget.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceServiceInstaller.Builder<T,V>Builds aServiceInstaller.static classServiceInstaller.DefaultServiceInstaller<T,V>Default service installer using native MSC service installation.-
Nested classes/interfaces inherited from interface org.wildfly.service.Installer
org.wildfly.service.Installer.AbstractInstaller<ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>,T extends Object,V extends Object>, org.wildfly.service.Installer.Configuration<SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>,T extends Object,V extends Object>, org.wildfly.service.Installer.DefaultService<T extends Object,V extends Object>
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static <T,V>
ServiceInstaller.Builder<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.Builder<V,V>builder(Supplier<V> factory)Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified factory.static <V> ServiceInstaller.Builder<V,V>builder(ServiceDependency<V> dependency)Returns aServiceInstallerbuilder whose installed service provides the value supplied by the specified dependency.static <V> ServiceInstaller.Builder<V,V>builder(V value)Returns aServiceInstallerbuilder whose installed service provides the specified value.default Consumer<OperationContext>install(OperationContext context)Installs a service into the target associated with the specified operation context.default voidinstall(DeploymentPhaseContext context)Installs a service into the target associated with the deployment phase of the specified context.
-
-
-
Method Detail
-
builder
static <V> ServiceInstaller.Builder<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.Builder<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.Builder<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.Builder<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
-
install
default Consumer<OperationContext> install(OperationContext context)
Description copied from interface:ResourceServiceInstallerInstalls a service into the target associated with the specified operation context.- Specified by:
installin interfaceResourceServiceInstaller- Parameters:
context- an operation context- Returns:
- a mechanism to remove the installed service
-
install
default void install(DeploymentPhaseContext context)
Description copied from interface:DeploymentServiceInstallerInstalls a service into the target associated with the deployment phase of the specified context.- Specified by:
installin interfaceDeploymentServiceInstaller- Parameters:
context- a deployment phase context
-
-