Record Class EventResult
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.EventResult
- Record Components:
status- of the eventstage- Stage the event was completed in.errorMessage- Cause of error if Status is ERROR or ABORTED
- All Implemented Interfaces:
Serializable
public record EventResult(EventResult.Status status, String stage, @Nullable String errorMessage, @Nullable Throwable error)
extends Record
implements Serializable
Result of submitting an event to an Event Stream
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEventResult(EventResult.Status status, String stage, String errorMessage, Throwable error) Creates an instance of aEventResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic EventResultstatic EventResultfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static EventResultReturns the value of theerrorMessagerecord component.booleanstatic EventResultfinal inthashCode()Returns a hash code value for this object.stage()Returns the value of thestagerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventResult
public EventResult(EventResult.Status status, String stage, @Nullable String errorMessage, @Nullable Throwable error) Creates an instance of aEventResultrecord class.- Parameters:
status- the value for thestatusrecord componentstage- the value for thestagerecord componenterrorMessage- the value for theerrorMessagerecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
handled
-
error
-
dropped
-
aborted
-
fromHandler
public boolean fromHandler() -
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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
stage
Returns the value of thestagerecord component.- Returns:
- the value of the
stagerecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-