Class ActivationResult.BuilderBase<BUILDER extends ActivationResult.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ActivationResult>

java.lang.Object
io.helidon.inject.api.ActivationResult.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
ActivationResult.Builder
Enclosing interface:
ActivationResult

public abstract static class ActivationResult.BuilderBase<BUILDER extends ActivationResult.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ActivationResult> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for ActivationResult.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(ActivationResult prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(ActivationResult.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • serviceProvider

      public BUILDER serviceProvider(ServiceProvider<?> serviceProvider)
      The service provider undergoing activation or deactivation.
      Parameters:
      serviceProvider - the service provider generating the result
      Returns:
      updated builder instance
      See Also:
    • clearFinishedActivationResult

      public BUILDER clearFinishedActivationResult()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • finishedActivationResult

      public BUILDER finishedActivationResult(Future<io.helidon.inject.api.ActivationResultBlueprint> finishedActivationResult)
      Optionally, given by the implementation provider to indicate the future completion when the provider's ActivationStatus is ActivationStatus.WARNING_SUCCESS_BUT_NOT_READY.
      Parameters:
      finishedActivationResult - the future result, assuming how activation can be async in nature
      Returns:
      updated builder instance
      See Also:
    • startingActivationPhase

      public BUILDER startingActivationPhase(Phase startingActivationPhase)
      The activation phase that was found at onset of the phase transition.
      Parameters:
      startingActivationPhase - the starting phase
      Returns:
      updated builder instance
      See Also:
    • targetActivationPhase

      public BUILDER targetActivationPhase(Phase targetActivationPhase)
      The activation phase that was requested at the onset of the phase transition.
      Parameters:
      targetActivationPhase - the target, desired, ultimate phase requested
      Returns:
      updated builder instance
      See Also:
    • finishingActivationPhase

      public BUILDER finishingActivationPhase(Phase finishingActivationPhase)
      The activation phase we finished successfully on, or are otherwise currently in if not yet finished.
      Parameters:
      finishingActivationPhase - the finishing phase
      Returns:
      updated builder instance
      See Also:
    • clearFinishingStatus

      public BUILDER clearFinishingStatus()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • finishingStatus

      public BUILDER finishingStatus(ActivationStatus finishingStatus)
      How did the activation finish. Will only be populated if the lifecycle event has completed - see finishedActivationResult().
      Parameters:
      finishingStatus - the finishing status
      Returns:
      updated builder instance
      See Also:
    • injectionPlans

      public BUILDER injectionPlans(Map<? extends String,? extends InjectionPlan> injectionPlans)
      This method replaces all values with the new ones.
      Parameters:
      injectionPlans - the resolved injection plan map
      Returns:
      updated builder instance
      See Also:
    • addInjectionPlans

      public BUILDER addInjectionPlans(Map<? extends String,? extends InjectionPlan> injectionPlans)
      This method keeps existing values, then puts all new values into the map.
      Parameters:
      injectionPlans - the resolved injection plan map
      Returns:
      updated builder instance
      See Also:
    • resolvedDependencies

      public BUILDER resolvedDependencies(Map<? extends String,?> resolvedDependencies)
      This method replaces all values with the new ones.
      Parameters:
      resolvedDependencies - the resolved dependency map
      Returns:
      updated builder instance
      See Also:
    • addResolvedDependencies

      public BUILDER addResolvedDependencies(Map<? extends String,?> resolvedDependencies)
      This method keeps existing values, then puts all new values into the map.
      Parameters:
      resolvedDependencies - the resolved dependency map
      Returns:
      updated builder instance
      See Also:
    • wasResolved

      public BUILDER wasResolved(boolean wasResolved)
      Set to true if the injection plan in resolvedDependencies() has been resolved and can be "trusted" as being complete and accurate.
      Parameters:
      wasResolved - true if was resolved
      Returns:
      updated builder instance
      See Also:
    • clearError

      public BUILDER clearError()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • error

      public BUILDER error(Throwable error)
      Any throwable/exceptions that were observed during activation.
      Parameters:
      error - any captured error
      Returns:
      updated builder instance
      See Also:
    • serviceProvider

      public Optional<ServiceProvider<?>> serviceProvider()
      The service provider undergoing activation or deactivation.
      Returns:
      the service provider
    • finishedActivationResult

      public Optional<Future<io.helidon.inject.api.ActivationResultBlueprint>> finishedActivationResult()
      Optionally, given by the implementation provider to indicate the future completion when the provider's ActivationStatus is ActivationStatus.WARNING_SUCCESS_BUT_NOT_READY.
      Returns:
      the finished activation result
    • startingActivationPhase

      public Phase startingActivationPhase()
      The activation phase that was found at onset of the phase transition.
      Returns:
      the starting activation phase
    • targetActivationPhase

      public Phase targetActivationPhase()
      The activation phase that was requested at the onset of the phase transition.
      Returns:
      the target activation phase
    • finishingActivationPhase

      public Optional<Phase> finishingActivationPhase()
      The activation phase we finished successfully on, or are otherwise currently in if not yet finished.
      Returns:
      the finishing activation phase
    • finishingStatus

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

      public Map<String,InjectionPlan> injectionPlans()
      The injection plan that was found or determined, key'ed by each element's ServiceProvider.id().
      Returns:
      the injection plans
    • resolvedDependencies

      public Map<String,Object> resolvedDependencies()
      The dependencies that were resolved or loaded, key'ed by each element's ServiceProvider.id().
      Returns:
      the resolved dependencies
    • wasResolved

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

      public Optional<Throwable> error()
      Any throwable/exceptions that were observed during activation.
      Returns:
      the error
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.