Interface ServiceInstaller

All Superinterfaces:
DeploymentServiceInstaller, org.wildfly.service.Installer<org.jboss.as.controller.RequirementServiceTarget>, ResourceServiceInstaller
All Known Implementing Classes:
ServiceInstaller.DefaultServiceInstaller

public interface ServiceInstaller extends ResourceServiceInstaller, DeploymentServiceInstaller, org.wildfly.service.Installer<org.jboss.as.controller.RequirementServiceTarget>
A ResourceServiceInstaller that encapsulates service installation into a RequirementServiceTarget.
Author:
Paul Ferraro
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    static class 
     
    static class 
     
    static class 
     
    static interface 
    Builds a ServiceInstaller whose installed service provides a single value.

    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.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.StartWhen, org.wildfly.service.Installer.UnaryService<T extends Object,V extends Object>
  • Field Summary

    Fields inherited from interface org.wildfly.subsystem.service.ResourceServiceInstaller

    NONE
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(Runnable startTask, Runnable stopTask)
    Returns a ServiceInstaller builder that executes the specified tasks on Service.start(StartContext) and Service.stop(StopContext), respectively.
    static <T, V> ServiceInstaller.UnaryBuilder<T,V>
    builder(Function<T,V> mapper, Supplier<T> factory)
    Returns a ServiceInstaller builder whose installed service provides the value supplied by the specified factory and mapping function.
    builder(Supplier<V> factory)
    Returns a ServiceInstaller builder whose installed service provides the value supplied by the specified factory.
    builder(org.wildfly.service.ServiceInstaller installer)
    Returns a ServiceInstaller builder that installs the specified installer into a child target.
    builder(ServiceDependency<V> dependency)
    Returns a ServiceInstaller builder whose installed service provides the value supplied by the specified dependency.
    builder(ServiceInstaller installer, org.jboss.as.controller.capability.CapabilityServiceSupport support)
    Returns a ServiceInstaller builder that installs the specified installer into a child target.
    builder(V value)
    Returns a ServiceInstaller builder whose installed service provides the specified value.
    default Consumer<org.jboss.as.controller.OperationContext>
    install(org.jboss.as.controller.OperationContext context)
    Installs a service into the target associated with the specified operation context.
    default void
    Installs a service into the target associated with the deployment phase of the specified context.

    Methods inherited from interface org.wildfly.service.Installer

    install
  • Method Details

    • builder

      static <V> ServiceInstaller.UnaryBuilder<V,V> builder(V value)
      Returns a ServiceInstaller builder whose installed service provides the specified value. By default, the installed service will start when installed since the provided value is already available.
      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 a ServiceInstaller builder whose installed service provides the value supplied by the specified dependency. By default, the installed service will start when the specified dependency is available.
      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 a ServiceInstaller builder whose installed service provides the value supplied by the specified factory. By default, the installed service will start when required.
      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 a ServiceInstaller builder whose installed service provides the value supplied by the specified factory and mapping function. By default, the installed service will start when required.
      Type Parameters:
      T - the source value type
      V - the service value type
      Parameters:
      mapper - a function that returns the service value given the value supplied by the factory
      factory - provides the input to the specified mapper
      Returns:
      a service installer builder
    • builder

      static ServiceInstaller.Builder builder(org.wildfly.service.ServiceInstaller installer)
      Returns a ServiceInstaller builder that installs the specified installer into a child target. By default, the installed service will start when installed.
      Parameters:
      installer - a service installer
      Returns:
      a service installer builder
    • builder

      static ServiceInstaller.Builder builder(ServiceInstaller installer, org.jboss.as.controller.capability.CapabilityServiceSupport support)
      Returns a ServiceInstaller builder that installs the specified installer into a child target. By default, the installed service will start when installed.
      Parameters:
      installer - a service installer
      support - support for capabilities
      Returns:
      a service installer builder
    • builder

      static ServiceInstaller.Builder builder(Runnable startTask, Runnable stopTask)
      Returns a ServiceInstaller builder that executes the specified tasks on Service.start(StartContext) and Service.stop(StopContext), respectively. By default, the installed service will start when available.
      Parameters:
      startTask - a start task
      stopTask - a stop task
      Returns:
      a service installer builder
    • install

      default Consumer<org.jboss.as.controller.OperationContext> install(org.jboss.as.controller.OperationContext context)
      Description copied from interface: ResourceServiceInstaller
      Installs a service into the target associated with the specified operation context.
      Specified by:
      install in interface ResourceServiceInstaller
      Parameters:
      context - an operation context
      Returns:
      a mechanism to remove the installed service
    • install

      default void install(DeploymentPhaseContext context)
      Description copied from interface: DeploymentServiceInstaller
      Installs a service into the target associated with the deployment phase of the specified context.
      Specified by:
      install in interface DeploymentServiceInstaller
      Parameters:
      context - a deployment phase context