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

java.lang.Object
io.helidon.service.registry.ActivationRequest.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:
ActivationRequest.Builder
Enclosing interface:
ActivationRequest

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

    • BuilderBase

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

    • from

      public BUILDER from(ActivationRequest 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(ActivationRequest.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
    • clearStartingPhase

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

      public BUILDER startingPhase(ActivationPhase startingPhase)
      The phase to start activation. Typically, this should be left as the default (i.e., PENDING).
      Parameters:
      startingPhase - phase to start
      Returns:
      updated builder instance
      See Also:
    • targetPhase

      public BUILDER targetPhase(ActivationPhase targetPhase)
      Ultimate target phase for activation.

      Defaults to ActivationPhase.ACTIVE, unless configured otherwise (in the registry).

      Parameters:
      targetPhase - phase to target
      Returns:
      updated builder instance
      See Also:
    • throwIfError

      public BUILDER throwIfError(boolean throwIfError)
      Whether to throw an exception on failure to activate, or return an error activation result on activation.
      Parameters:
      throwIfError - whether to throw on failure
      Returns:
      updated builder instance
      See Also:
    • startingPhase

      public Optional<ActivationPhase> startingPhase()
      The phase to start activation. Typically, this should be left as the default (i.e., PENDING).
      Returns:
      the starting phase
    • targetPhase

      public Optional<ActivationPhase> targetPhase()
      Ultimate target phase for activation.

      Defaults to ActivationPhase.ACTIVE, unless configured otherwise (in the registry).

      Returns:
      the target phase
    • throwIfError

      public boolean throwIfError()
      Whether to throw an exception on failure to activate, or return an error activation result on activation.
      Returns:
      the throw if 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.