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

java.lang.Object
io.helidon.service.registry.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. This method disables automatic service discovery.
      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
    • startingActivationPhase

      public BUILDER startingActivationPhase(ActivationPhase 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(ActivationPhase 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(ActivationPhase 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:
    • 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:
    • success

      public BUILDER success(boolean success)
      Returns true if this result was successful.
      Parameters:
      success - true if successful
      Returns:
      updated builder instance
      See Also:
    • startingActivationPhase

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

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

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

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

      public boolean success()
      Returns true if this result was successful.
      Returns:
      the success
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.