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

java.lang.Object
io.helidon.messaging.MessagingFailureConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Direct Known Subclasses:
MessagingFailureConfig.Builder
Enclosing interface:
MessagingFailureConfig

public abstract static class MessagingFailureConfig.BuilderBase<BUILDER extends MessagingFailureConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends MessagingFailureConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for MessagingFailureConfig.
  • Constructor Details

    • BuilderBase

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

    • from

      public BUILDER from(MessagingFailureConfig 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(MessagingFailureConfig.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
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends MessagingFailureConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends MessagingFailureConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • clearRetry

      public BUILDER clearRetry()
      Clear existing value of retry.
      Returns:
      updated builder instance
      See Also:
    • retry

      public BUILDER retry(Retry retry)
      Complete retry instance for this incoming channel. When present, it replaces the declared retry as a whole. Unspecified options within a configured retry use fault-tolerance defaults, not messaging or handler defaults. When absent, the declared retry is used, or the shared messaging default if no retry was declared.
      Parameters:
      retry - retry instance, if configured
      Returns:
      updated builder instance
      See Also:
    • retry

      public BUILDER retry(RetryConfig retry)
      Complete retry instance for this incoming channel. When present, it replaces the declared retry as a whole. Unspecified options within a configured retry use fault-tolerance defaults, not messaging or handler defaults. When absent, the declared retry is used, or the shared messaging default if no retry was declared.
      Parameters:
      retry - prototype of retry instance, if configured
      Returns:
      updated builder instance
      See Also:
    • retry

      public BUILDER retry(Consumer<RetryConfig.Builder> consumer)
      Complete retry instance for this incoming channel. When present, it replaces the declared retry as a whole. Unspecified options within a configured retry use fault-tolerance defaults, not messaging or handler defaults. When absent, the declared retry is used, or the shared messaging default if no retry was declared.
      Parameters:
      consumer - consumer of builder of retry instance, if configured
      Returns:
      updated builder instance
      See Also:
    • retry

      public BUILDER retry(Supplier<? extends Retry> supplier)
      Complete retry instance for this incoming channel. When present, it replaces the declared retry as a whole. Unspecified options within a configured retry use fault-tolerance defaults, not messaging or handler defaults. When absent, the declared retry is used, or the shared messaging default if no retry was declared.
      Parameters:
      supplier - supplier of retry instance, if configured
      Returns:
      updated builder instance
      See Also:
    • clearOnExhausted

      public BUILDER clearOnExhausted()
      Clear existing value of onExhausted.
      Returns:
      updated builder instance
      See Also:
    • onExhausted

      public BUILDER onExhausted(FailureDisposition onExhausted)
      Disposition used when retry attempts are exhausted.
      Parameters:
      onExhausted - exhaustion disposition override, if configured
      Returns:
      updated builder instance
      See Also:
    • clearDeadLetter

      public BUILDER clearDeadLetter()
      Clear existing value of deadLetter.
      Returns:
      updated builder instance
      See Also:
    • deadLetter

      public BUILDER deadLetter(DeadLetterConfig deadLetter)
      Dead-letter target override. Required by the effective policy when its disposition is DEAD_LETTER.
      Parameters:
      deadLetter - dead-letter target override, if configured
      Returns:
      updated builder instance
      See Also:
    • deadLetter

      public BUILDER deadLetter(Consumer<DeadLetterConfig.Builder> consumer)
      Dead-letter target override. Required by the effective policy when its disposition is DEAD_LETTER.
      Parameters:
      consumer - consumer of builder of dead-letter target override, if configured
      Returns:
      updated builder instance
      See Also:
    • deadLetter

      public BUILDER deadLetter(Supplier<? extends DeadLetterConfig> supplier)
      Dead-letter target override. Required by the effective policy when its disposition is DEAD_LETTER.
      Parameters:
      supplier - supplier of dead-letter target override, if configured
      Returns:
      updated builder instance
      See Also:
    • retry

      public Optional<Retry> retry()
      Complete retry instance for this incoming channel. When present, it replaces the declared retry as a whole. Unspecified options within a configured retry use fault-tolerance defaults, not messaging or handler defaults. When absent, the declared retry is used, or the shared messaging default if no retry was declared.
      Returns:
      retry instance, if configured
    • onExhausted

      public Optional<FailureDisposition> onExhausted()
      Disposition used when retry attempts are exhausted.
      Returns:
      exhaustion disposition override, if configured
    • deadLetter

      public Optional<DeadLetterConfig> deadLetter()
      Dead-letter target override. Required by the effective policy when its disposition is DEAD_LETTER.
      Returns:
      dead-letter target override, if configured
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.
    • buildPrototype

      protected final MessagingFailureConfig buildPrototype(MessagingFailureConfig.BuilderBase<?,?> builder)
      Create a new prototype instance from a builder.
      Parameters:
      builder - builder used to create the prototype
      Returns:
      new prototype instance
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance