Record Class AdapterFailureModeResult
java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterFailureModeResult
- Record Components:
failureMode- failure mode that was testedpassed- whether the adapter handled the failure mode correctlyreasonCode- stable safe reason codesafeMetadata- redacted metadata
public record AdapterFailureModeResult(AdapterFailureMode failureMode, boolean passed, String reasonCode, Map<String,String> safeMetadata)
extends Record
Result of a failure-mode compatibility check.
The record is immutable and thread-safe. A failed result must use safe reason codes and redacted metadata so credentials, payloads, and raw endpoint values cannot leak through public reports.
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterFailureModeResult(AdapterFailureMode failureMode, boolean passed, String reasonCode, Map<String, String> safeMetadata) Creates a failure-mode result. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureModerecord component.final inthashCode()Returns a hash code value for this object.booleanpassed()Returns the value of thepassedrecord component.Returns the value of thereasonCoderecord component.Returns the value of thesafeMetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AdapterFailureModeResult
public AdapterFailureModeResult(AdapterFailureMode failureMode, boolean passed, String reasonCode, Map<String, String> safeMetadata) Creates a failure-mode result.
-
-
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. -
failureMode
Returns the value of thefailureModerecord component.- Returns:
- the value of the
failureModerecord component
-
passed
-
reasonCode
Returns the value of thereasonCoderecord component.- Returns:
- the value of the
reasonCoderecord component
-
safeMetadata
Returns the value of thesafeMetadatarecord component.- Returns:
- the value of the
safeMetadatarecord component
-