Class Tm1Exception

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Tm1ApiException, Tm1ProtocolException, Tm1TransportException, Tm1UnsupportedOperationException

Something went wrong talking to TM1. The root of all the client's exceptions; unchecked.
See Also:
  • Constructor Details

    • Tm1Exception

      protected Tm1Exception(String message, @Nullable String method, @Nullable String url, @Nullable Throwable cause)
      Creates an exception for a failed request.
      Parameters:
      message - the detail message
      method - the request's HTTP method, or null if not known
      url - the request's URL, without credentials, or null if not known
      cause - the underlying failure, or null
  • Method Details

    • isRetryable

      public abstract boolean isRetryable()
      Whether sending the same request again could succeed, such as after a timeout or a 503.
      Returns:
      true if a retry could succeed
    • mayHaveApplied

      public abstract boolean mayHaveApplied()
      Whether the request may have taken effect on TM1 even though it failed. False only when TM1 certainly didn't act on it, such as a connection that was never made, or a request it rejected. Check this before retrying anything that isn't idempotent, like running a process.
      Returns:
      false only if TM1 certainly didn't act on the request
    • method

      public @Nullable String method()
      The request's HTTP method, or null if not known.
      Returns:
      the HTTP method, or null
    • url

      public @Nullable String url()
      The request's URL, never including credentials, or null if not known.
      Returns:
      the URL, or null