Class AdapterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.j7m.middleware.api.MiddlewareException
org.j7m.middleware.adapter.spi.AdapterException
- All Implemented Interfaces:
Serializable
public final class AdapterException
extends org.j7m.middleware.api.MiddlewareException
Public exception for adapter SPI and TCK failures.
The exception is immutable after construction and safe to share across
threads. Messages and metadata must already be redacted when the exception is
created. Retryability follows the embedded MiddlewareErrorCode; for
example, timeout and overload failures may be retried by an adapter-specific
policy while invalid configuration should not be retried without correction.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterException(org.j7m.middleware.api.MiddlewareErrorCode code, String message) Creates an adapter exception.AdapterException(org.j7m.middleware.api.MiddlewareErrorCode code, String message, Throwable cause) Creates an adapter exception with a root cause. -
Method Summary
Methods inherited from class org.j7m.middleware.api.MiddlewareException
code, dirtyTarget, of, remote, remoteError, retryableMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AdapterException
Creates an adapter exception.- Parameters:
code- stable middleware error codemessage- safe human-readable message
-
AdapterException
public AdapterException(org.j7m.middleware.api.MiddlewareErrorCode code, String message, Throwable cause) Creates an adapter exception with a root cause.- Parameters:
code- stable middleware error codemessage- safe human-readable messagecause- implementation cause that must not expose secrets through its message
-