Record Class InvocationResult
java.lang.Object
java.lang.Record
org.springframework.kafka.listener.adapter.InvocationResult
- Record Components:
result- the result.messageReturnType- the message return type.sendTo- the expression about sends topic.
public record InvocationResult(Object result, org.springframework.expression.Expression sendTo, boolean messageReturnType)
extends Record
The result of a method invocation.
- Since:
- 2.2
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationResult(Object result, org.springframework.expression.Expression sendTo, boolean messageReturnType) Creates an instance of aInvocationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themessageReturnTyperecord component.result()Returns the value of theresultrecord component.org.springframework.expression.ExpressionsendTo()Returns the value of thesendTorecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
InvocationResult
public InvocationResult(@Nullable Object result, @Nullable org.springframework.expression.Expression sendTo, boolean messageReturnType) Creates an instance of aInvocationResultrecord class.- Parameters:
result- the value for theresultrecord componentsendTo- the value for thesendTorecord componentmessageReturnType- the value for themessageReturnTyperecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
sendTo
@Nullable public org.springframework.expression.Expression sendTo()Returns the value of thesendTorecord component.- Returns:
- the value of the
sendTorecord component
-
messageReturnType
public boolean messageReturnType()Returns the value of themessageReturnTyperecord component.- Returns:
- the value of the
messageReturnTyperecord component
-