Record Class DefaultRequestHandler.ResponseCallback
java.lang.Object
java.lang.Record
io.fluxzero.sdk.publishing.DefaultRequestHandler.ResponseCallback
- Record Components:
intermediateCallback- AConsumerthat processes intermediateSerializedMessageresponses as they are received.finalCallback- ACompletableFuturethat represents the finalSerializedMessageresponse.
- Enclosing class:
DefaultRequestHandler
protected static record DefaultRequestHandler.ResponseCallback(Consumer<SerializedMessage> intermediateCallback, CompletableFuture<SerializedMessage> finalCallback)
extends Record
Encapsulates a callback mechanism to handle both intermediate and final responses when processing requests.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResponseCallback(Consumer<SerializedMessage> intermediateCallback, CompletableFuture<SerializedMessage> finalCallback) Creates an instance of aResponseCallbackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinalCallbackrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theintermediateCallbackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResponseCallback
protected ResponseCallback(Consumer<SerializedMessage> intermediateCallback, CompletableFuture<SerializedMessage> finalCallback) Creates an instance of aResponseCallbackrecord class.- Parameters:
intermediateCallback- the value for theintermediateCallbackrecord componentfinalCallback- the value for thefinalCallbackrecord component
-
-
Method Details
-
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). -
intermediateCallback
Returns the value of theintermediateCallbackrecord component.- Returns:
- the value of the
intermediateCallbackrecord component
-
finalCallback
Returns the value of thefinalCallbackrecord component.- Returns:
- the value of the
finalCallbackrecord component
-