Class ApiRestException.BaseBuilder<B extends ApiRestException.BaseBuilder<B>>

java.lang.Object
io.helidon.integrations.common.rest.ApiRestException.BaseBuilder<B>
Type Parameters:
B - type of the subclass
Direct Known Subclasses:
RestException.Builder, VaultRestException.Builder
Enclosing class:
ApiRestException

public abstract static class ApiRestException.BaseBuilder<B extends ApiRestException.BaseBuilder<B>> extends Object
Base builder extended by specific builder class.
  • Constructor Details

    • BaseBuilder

      public BaseBuilder()
  • Method Details

    • message

      public B message(String message)
      Message configured by RestApi.
      Parameters:
      message - message with explanation of exception
      Returns:
      updated builder
    • message

      public B message(String format, Object... args)
      Message configured by RestApi.
      Parameters:
      format - a Formatter string
      args - format string arguments
      Returns:
      updated builder
    • requestId

      public B requestId(String requestId)
      Request ID configured by RestApi.
      Parameters:
      requestId - request ID
      Returns:
      updated builder
    • status

      public B status(Status status)
      HTTP status configured by RestApi.
      Parameters:
      status - returned status
      Returns:
      updated builder
    • headers

      public B headers(Headers headers)
      HTTP headers configured by RestApi.
      Parameters:
      headers - returned headers
      Returns:
      updated builder
    • apiSpecificError

      public B apiSpecificError(String apiSpecificError)
      Error specific to the integrated system, configured by implementation of the RestApi.
      Parameters:
      apiSpecificError - specific exception
      Returns:
      updated builder
    • cause

      public B cause(Throwable t)
      Possible cause of this exception (such as when we fail to parse returned entity).
      Parameters:
      t - cause of the new throwable
      Returns:
      updated builder
    • me

      protected B me()
      Used to return correct type for setter methods of this builder.
      Returns:
      instance of this class typed as the subclass