Record Class AdapterHealth
java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterHealth
- Record Components:
adapterId- adapter provider identifieravailable- whether the provider is available for worklifecycle- lifecycle statereasonCode- stable safe reason codesafeMetadata- redacted metadata
public record AdapterHealth(AdapterProviderId adapterId, boolean available, AdapterLifecycle lifecycle, String reasonCode, Map<String,String> safeMetadata)
extends Record
Safe health snapshot for an adapter provider.
The record is immutable and thread-safe. It may be exposed through admin status, logs, and TCK reports. Metadata is redacted by key and must not carry command payloads, credential values, or raw transport secrets.
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterHealth(AdapterProviderId adapterId, boolean available, AdapterLifecycle lifecycle, String reasonCode, Map<String, String> safeMetadata) Creates an adapter health snapshot. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadapterIdrecord component.booleanReturns the value of theavailablerecord 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 thelifecyclerecord 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
-
AdapterHealth
public AdapterHealth(AdapterProviderId adapterId, boolean available, AdapterLifecycle lifecycle, String reasonCode, Map<String, String> safeMetadata) Creates an adapter health snapshot.
-
-
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. -
adapterId
-
available
-
lifecycle
-
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
-