Module io.fluxzero.sdk
Package io.fluxzero.sdk.publishing
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<io.fluxzero.common.api.SerializedMessage> intermediateCallback, CompletableFuture<io.fluxzero.common.api.SerializedMessage> finalCallback)
extends Record
Encapsulates a callback mechanism to handle both intermediate and final responses when processing requests.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResponseCallback(Consumer<io.fluxzero.common.api.SerializedMessage> intermediateCallback, CompletableFuture<io.fluxzero.common.api.SerializedMessage> finalCallback) Creates an instance of aResponseCallbackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.CompletableFuture<io.fluxzero.common.api.SerializedMessage> Returns the value of thefinalCallbackrecord component.final inthashCode()Returns a hash code value for this object.Consumer<io.fluxzero.common.api.SerializedMessage> Returns the value of theintermediateCallbackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResponseCallback
protected ResponseCallback(Consumer<io.fluxzero.common.api.SerializedMessage> intermediateCallback, CompletableFuture<io.fluxzero.common.api.SerializedMessage> finalCallback) Creates an instance of aResponseCallbackrecord class.- Parameters:
intermediateCallback- the value for theintermediateCallbackrecord componentfinalCallback- the value for thefinalCallbackrecord 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. 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
-