Class Phase4IncomingException

All Implemented Interfaces:
Serializable

public class Phase4IncomingException extends Phase4Exception
Special phase4 incoming exception for inbound errors. It adds an HTTP response code to the return values.
Since:
4.1.2
Author:
Philip Helger
See Also:
  • Constructor Details

    • Phase4IncomingException

      public Phase4IncomingException(@NonNull String sMessage)
      Parameters:
      sMessage - Error message
    • Phase4IncomingException

      public Phase4IncomingException(@NonNull String sMessage, @Nullable Throwable aCause)
      Parameters:
      sMessage - Error message
      aCause - Optional causing exception
  • Method Details

    • getHttpStatusCode

      @CheckForSigned public final int getHttpStatusCode()
      Returns:
      The HTTP status code to be returned. All values ≤ 0 means: undefined.
    • hasHttpStatusCode

      public final boolean hasHttpStatusCode()
      Returns:
      true if a defined HTTP status code is present, false otherwise.
    • setHttpStatusCode

      public final @NonNull Phase4IncomingException setHttpStatusCode(int n)
      Set the HTTP Status code to be used.
      Parameters:
      n - The HTTP status code to be used. Any value ≤ 0 means to use the default.
      Returns:
      this for chaining