Record Class AsyncMethodDescriptor
java.lang.Object
java.lang.Record
org.j7m.middleware.transport.api.AsyncMethodDescriptor
- Record Components:
payloadType- concrete result class encoded on the wire instead of the future object
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncMethodDescriptor(Class<?> payloadType) Validates a concrete logical payload class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static AsyncMethodDescriptorfromMethod(Method method) Resolves a supported parameterized CompletionStage or CompletableFuture declaration.final inthashCode()Returns a hash code value for this object.Class<?> Returns the value of thepayloadTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AsyncMethodDescriptor
Validates a concrete logical payload class.
-
-
Method Details
-
fromMethod
Resolves a supported parameterized CompletionStage or CompletableFuture declaration.- Parameters:
method- exact interface method whose generic signature is preserved- Returns:
- validated logical payload shape
- Throws:
IllegalArgumentException- for an unsupported asynchronous declaration
-
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). -
payloadType
Returns the value of thepayloadTyperecord component.- Returns:
- the value of the
payloadTyperecord component
-