Class AbstractActivationResult.Builder<B extends AbstractActivationResult.Builder<B,T>,T extends ActivationResult>

java.lang.Object
io.helidon.pico.api.AbstractActivationResult.Builder<B,T>
Type Parameters:
B - the type of the builder
T - the type of the built instance
All Implemented Interfaces:
Builder<B,T>, ActivationResult, Supplier<T>
Direct Known Subclasses:
DefaultActivationResult.Builder
Enclosing class:
AbstractActivationResult

public abstract static class AbstractActivationResult.Builder<B extends AbstractActivationResult.Builder<B,T>,T extends ActivationResult> extends Object implements ActivationResult, Builder<B,T>
Fluent API builder for T.
  • Field Details

    • injectionPlans

      protected final Map injectionPlans
      Field value for java.util.Map<java.lang.String, ? extends io.helidon.pico.spi.InjectionPlan> injectionPlans().
    • resolvedDependencies

      protected final Map resolvedDependencies
      Field value for java.util.Map<java.lang.String, java.lang.Object> resolvedDependencies().
  • Constructor Details

    • Builder

      protected Builder()
      Fluent API builder constructor.
  • Method Details

    • serviceProvider

      public ServiceProvider<?> serviceProvider()
      Description copied from interface: ActivationResult
      The service provider undergoing activation or deactivation.
      Specified by:
      serviceProvider in interface ActivationResult
      Returns:
      the service provider generating the result
    • finishedActivationResult

      public Optional<Future<ActivationResult>> finishedActivationResult()
      Description copied from interface: ActivationResult
      Optionally, given by the implementation provider to indicate the future completion when the provider's ActivationStatus is ActivationStatus.WARNING_SUCCESS_BUT_NOT_READY.
      Specified by:
      finishedActivationResult in interface ActivationResult
      Returns:
      the future result, assuming how activation can be async in nature
    • startingActivationPhase

      public Phase startingActivationPhase()
      Description copied from interface: ActivationResult
      The activation phase that was found at onset of the phase transition.
      Specified by:
      startingActivationPhase in interface ActivationResult
      Returns:
      the starting phase
    • targetActivationPhase

      public Phase targetActivationPhase()
      Description copied from interface: ActivationResult
      The activation phase that was requested at the onset of the phase transition.
      Specified by:
      targetActivationPhase in interface ActivationResult
      Returns:
      the target, desired, ultimate phase requested
    • finishingActivationPhase

      public Phase finishingActivationPhase()
      Description copied from interface: ActivationResult
      The activation phase we finished successfully on, or are otherwise currently in if not yet finished.
      Specified by:
      finishingActivationPhase in interface ActivationResult
      Returns:
      the finishing phase
    • finishingStatus

      public Optional<ActivationStatus> finishingStatus()
      Description copied from interface: ActivationResult
      How did the activation finish. Will only be populated if the lifecycle event has completed - see ActivationResult.finishedActivationResult().
      Specified by:
      finishingStatus in interface ActivationResult
      Returns:
      the finishing status
    • injectionPlans

      public Map<String,? extends InjectionPlan> injectionPlans()
      Description copied from interface: ActivationResult
      The injection plan that was found or determined, key'ed by each element's ServiceProvider.id().
      Specified by:
      injectionPlans in interface ActivationResult
      Returns:
      the resolved injection plan map
    • resolvedDependencies

      public Map<String,Object> resolvedDependencies()
      Description copied from interface: ActivationResult
      The dependencies that were resolved or loaded, key'ed by each element's ServiceProvider.id().
      Specified by:
      resolvedDependencies in interface ActivationResult
      Returns:
      the resolved dependency map
    • wasResolved

      public boolean wasResolved()
      Description copied from interface: ActivationResult
      Set to true if the injection plan in ActivationResult.resolvedDependencies() has been resolved and can be "trusted" as being complete and accurate.
      Specified by:
      wasResolved in interface ActivationResult
      Returns:
      true if was resolved
    • error

      public Optional<Throwable> error()
      Description copied from interface: ActivationResult
      Any throwable/exceptions that were observed during activation.
      Specified by:
      error in interface ActivationResult
      Returns:
      any captured error
    • serviceProvider

      public B serviceProvider(ServiceProvider<?> val)
      Setter for 'serviceProvider'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • finishedActivationResult

      public B finishedActivationResult(Optional<Future<ActivationResult>> val)
      Setter for 'finishedActivationResult'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • finishedActivationResult

      public B finishedActivationResult(Future<ActivationResult> val)
      Setter for 'finishedActivationResult'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • startingActivationPhase

      public B startingActivationPhase(Phase val)
      Setter for 'startingActivationPhase'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • targetActivationPhase

      public B targetActivationPhase(Phase val)
      Setter for 'targetActivationPhase'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • finishingActivationPhase

      public B finishingActivationPhase(Phase val)
      Setter for 'finishingActivationPhase'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • finishingStatus

      public B finishingStatus(Optional<ActivationStatus> val)
      Setter for 'finishingStatus'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • finishingStatus

      public B finishingStatus(ActivationStatus val)
      Setter for 'finishingStatus'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • injectionPlans

      public B injectionPlans(Map<String,? extends InjectionPlan> val)
      Setter for 'injectionPlans'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • resolvedDependencies

      public B resolvedDependencies(Map<String,Object> val)
      Setter for 'resolvedDependencies'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • wasResolved

      public B wasResolved(boolean val)
      Setter for 'wasResolved'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • error

      public B error(Optional<Throwable> val)
      Setter for 'error'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • error

      public B error(Throwable val)
      Setter for 'error'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • accept

      public B accept(T val)
      Accept and update from the provided value object.
      Parameters:
      val - the value object to copy from
      Returns:
      this instance typed to correct type
    • visitAttributes

      public <T> void visitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx)
      Visits all attributes of io.helidon.pico.api.ActivationResult, calling the AttributeVisitor for each.
      Type Parameters:
      T - type of the user defined context
      Parameters:
      visitor - the visitor called for each attribute
      userDefinedCtx - any object you wish to pass to each visit call