Class Tm1TransportException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.skipcheck.tm1.client.error.Tm1Exception
io.skipcheck.tm1.client.error.Tm1TransportException
- All Implemented Interfaces:
Serializable
No complete response from TM1: the connection failed, was reset, or timed out.
phase() says how far the request got, which decides whether it could have
taken effect: a request that never connected didn't, one that timed out waiting for the
response may have. TM1 only answers some long operations (processes, big MDX) when they
finish, so a response timeout often means the work is still running.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow far the request got. -
Constructor Summary
ConstructorsConstructorDescriptionTm1TransportException(Tm1TransportException.Phase phase, boolean idempotent, String method, String url, @Nullable Throwable cause) Creates an exception for a request that got no complete response. -
Method Summary
Modifier and TypeMethodDescriptionbooleanConnect failures are always retryable; response failures only for idempotent requests.booleanFalse only if the request was never sent.phase()How far the request got.Methods inherited from class Tm1Exception
method, urlMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Tm1TransportException
public Tm1TransportException(Tm1TransportException.Phase phase, boolean idempotent, String method, String url, @Nullable Throwable cause) Creates an exception for a request that got no complete response.- Parameters:
phase- how far the request gotidempotent- whether the request is safe to repeat (GET, PUT, DELETE), which makes a response-phase failure retryablemethod- the request's HTTP methodurl- the request's URL, without credentialscause- the underlying failure, ornull
-
-
Method Details
-
isRetryable
public boolean isRetryable()Connect failures are always retryable; response failures only for idempotent requests.- Specified by:
isRetryablein classTm1Exception- Returns:
trueif a retry could succeed
-
mayHaveApplied
public boolean mayHaveApplied()False only if the request was never sent.- Specified by:
mayHaveAppliedin classTm1Exception- Returns:
falseonly if TM1 certainly didn't act on the request
-
phase
How far the request got.- Returns:
- the phase the request failed in
-