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 aEventResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic EventResult
static EventResult
final boolean
Indicates whether some other object is "equal to" this one.error()
Returns the value of theerror
record component.static EventResult
Returns the value of theerrorMessage
record component.boolean
static EventResult
final int
hashCode()
Returns a hash code value for this object.stage()
Returns the value of thestage
record component.status()
Returns the value of thestatus
record component.final String
toString()
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 aEventResult
record class.- Parameters:
status
- the value for thestatus
record componentstage
- the value for thestage
record componenterrorMessage
- the value for theerrorMessage
record componenterror
- the value for theerror
record 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 thestatus
record component.- Returns:
- the value of the
status
record component
-
stage
Returns the value of thestage
record component.- Returns:
- the value of the
stage
record component
-
errorMessage
Returns the value of theerrorMessage
record component.- Returns:
- the value of the
errorMessage
record component
-
error
Returns the value of theerror
record component.- Returns:
- the value of the
error
record component
-