Package com.tnsai.channels.model
Record Class ChannelError
java.lang.Object
java.lang.Record
com.tnsai.channels.model.ChannelError
- Record Components:
channelId- which adapter produced the errorseverity- how critical the error ismessage- human-readable descriptioncause- underlying exception (may be null)timestamp- when the error occurred
public record ChannelError(String channelId, ChannelError.Severity severity, String message, Throwable cause, Instant timestamp)
extends Record
Represents an error that occurred within a channel adapter.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionChannelError(String channelId, ChannelError.Severity severity, String message, Throwable cause, Instant timestamp) Creates an instance of aChannelErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.Returns the value of thechannelIdrecord component.static ChannelErrorfinal booleanIndicates whether some other object is "equal to" this one.static ChannelErrorfinal inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.severity()Returns the value of theseverityrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.static ChannelErrortransient_(String channelId, String message, Throwable cause)
-
Constructor Details
-
ChannelError
public ChannelError(String channelId, ChannelError.Severity severity, String message, Throwable cause, Instant timestamp) Creates an instance of aChannelErrorrecord class.
-
-
Method Details
-
transient_
-
degraded
-
fatal
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-