Record Class RemoteError
java.lang.Object
java.lang.Record
org.j7m.middleware.api.RemoteError
- Record Components:
code- stable middleware error codemessage- safe diagnostic messagedetails- public diagnostic detailsinvocationId- invocation or correlation identifier when availableremoteRuntimeId- remote runtime identifier when knownretryable- whether retrying the operation may succeeddirtyTarget- whether the current target should be considered suspect
- All Implemented Interfaces:
Serializable
public record RemoteError(MiddlewareErrorCode code, String message, Map<String,String> details, String invocationId, String remoteRuntimeId, boolean retryable, boolean dirtyTarget)
extends Record
implements Serializable
Public, redacted description of a local or remote middleware failure.
The record is immutable and thread-safe. Detail values are intended for logs and diagnostics and must not contain secrets. The constructor preserves the iteration order of the supplied detail map in an immutable defensive copy so callers that publish canonical public details can produce deterministic JSON and evidence output.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteError(MiddlewareErrorCode code, String message, Map<String, String> details, String invocationId, String remoteRuntimeId, boolean retryable, boolean dirtyTarget) Creates a remote error with defensive immutable copies. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.details()Returns the value of thedetailsrecord component.booleanReturns the value of thedirtyTargetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinvocationIdrecord component.message()Returns the value of themessagerecord component.Returns the value of theremoteRuntimeIdrecord component.booleanReturns the value of theretryablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RemoteError
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
-
message
-
details
-
invocationId
Returns the value of theinvocationIdrecord component.- Returns:
- the value of the
invocationIdrecord component
-
remoteRuntimeId
Returns the value of theremoteRuntimeIdrecord component.- Returns:
- the value of the
remoteRuntimeIdrecord component
-
retryable
-
dirtyTarget
public boolean dirtyTarget()Returns the value of thedirtyTargetrecord component.- Returns:
- the value of the
dirtyTargetrecord component
-