Interface CapabilityServiceInstaller
-
- All Superinterfaces:
org.wildfly.service.Installer<CapabilityServiceTarget>,ResourceServiceInstaller
- All Known Implementing Classes:
CapabilityServiceInstaller.DefaultCapabilityServiceInstaller
public interface CapabilityServiceInstaller extends ResourceServiceInstaller, org.wildfly.service.Installer<CapabilityServiceTarget>
AResourceServiceInstallerthat encapsulates service installation into aCapabilityServiceTarget.- Author:
- Paul Ferraro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCapabilityServiceInstaller.Builder<T,V>Builds aCapabilityServiceInstaller.static classCapabilityServiceInstaller.DefaultBuilder<T,V>static classCapabilityServiceInstaller.DefaultCapabilityServiceInstaller-
Nested classes/interfaces inherited from interface org.wildfly.service.Installer
org.wildfly.service.Installer.AbstractBuilder<B extends Object,I extends org.wildfly.service.Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, org.wildfly.service.Installer.AbstractNullaryBuilder<B extends Object,I extends org.wildfly.service.Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, org.wildfly.service.Installer.AbstractUnaryBuilder<B extends Object,I extends org.wildfly.service.Installer<ST>,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.AsyncBuilder<B extends Object>, org.wildfly.service.Installer.BlockingBuilder<B extends Object>, org.wildfly.service.Installer.Configuration<SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, org.wildfly.service.Installer.DefaultInstaller<ST extends org.jboss.msc.service.ServiceTarget,SB extends DSB,DSB extends org.jboss.msc.service.ServiceBuilder<?>>, org.wildfly.service.Installer.UnaryBuilder<B extends Object,I extends org.wildfly.service.Installer<ST>,ST extends org.jboss.msc.service.ServiceTarget,SB extends org.jboss.msc.service.ServiceBuilder<?>,T extends Object,V extends Object>, org.wildfly.service.Installer.UnaryService<T extends Object,V extends Object>
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static <T,V>
CapabilityServiceInstaller.Builder<T,V>builder(RuntimeCapability<Void> capability, Function<T,V> mapper, Supplier<T> factory)Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the value supplied by the specified factory and mapping function.static <V> CapabilityServiceInstaller.Builder<V,V>builder(RuntimeCapability<Void> capability, Supplier<V> factory)Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the value supplied by the specified factory.static <V> CapabilityServiceInstaller.Builder<V,V>builder(RuntimeCapability<Void> capability, ServiceDependency<V> dependency)Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the value supplied by the specified dependency.static <V> CapabilityServiceInstaller.Builder<V,V>builder(RuntimeCapability<Void> capability, V value)Returns aCapabilityServiceInstallerbuilder for the specified capability 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.
-
-
-
Method Detail
-
builder
static <V> CapabilityServiceInstaller.Builder<V,V> builder(RuntimeCapability<Void> capability, V value)
Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the specified value.- Type Parameters:
V- the service value type- Parameters:
capability- the target capabilityvalue- the service value- Returns:
- a service installer builder
-
builder
static <V> CapabilityServiceInstaller.Builder<V,V> builder(RuntimeCapability<Void> capability, ServiceDependency<V> dependency)
Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the value supplied by the specified dependency.- Type Parameters:
V- the service value type- Parameters:
capability- the target capabilitydependency- a service dependency- Returns:
- a service installer builder
-
builder
static <V> CapabilityServiceInstaller.Builder<V,V> builder(RuntimeCapability<Void> capability, Supplier<V> factory)
Returns aCapabilityServiceInstallerbuilder for the specified capability whose installed service provides the value supplied by the specified factory.- Type Parameters:
V- the service value type- Parameters:
capability- the target capabilityfactory- provides the service value- Returns:
- a service installer builder
-
builder
static <T,V> CapabilityServiceInstaller.Builder<T,V> builder(RuntimeCapability<Void> capability, Function<T,V> mapper, Supplier<T> factory)
Returns aCapabilityServiceInstallerbuilder for the specified capability 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:
capability- the target capabilitymapper- 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
-
-