Record Class InvocationResult
java.lang.Object
java.lang.Record
org.j7m.middleware.transport.api.InvocationResult
- Record Components:
value- logical value, possibly null; discarded when failure is presentfailure- application or policy failure, null for successdiagnostics- trusted protocol status set by a registered host finalizer, never copied from application throwables
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationResult(Object value, Throwable failure) Preserves the outcome constructor with no trusted protocol diagnostics.Creates an outcome without retaining a value alongside a failure. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thediagnosticsrecord component.final booleanIndicates whether some other object is "equal to" this one.failure()Returns the value of thefailurerecord component.static InvocationResultCreates a failed logical result without evaluating application exception methods.final inthashCode()Returns a hash code value for this object.static InvocationResultCreates a successful logical result.toString()Returns a payload-free diagnostic form.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
InvocationResult
-
InvocationResult
-
-
Method Details
-
success
Creates a successful logical result.- Parameters:
value- result, possibly null- Returns:
- successful host outcome
-
failure
Creates a failed logical result without evaluating application exception methods.- Parameters:
failure- non-null failure- Returns:
- failed host outcome
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
value
-
failure
-
diagnostics
Returns the value of thediagnosticsrecord component.- Returns:
- the value of the
diagnosticsrecord component
-