Record Class HandlerInputResolver.Resolution<M>
java.lang.Object
java.lang.Record
io.fluxzero.common.handling.HandlerInputResolver.Resolution<M>
- Type Parameters:
M- the message type used by the handling pipeline- Record Components:
matched- whether this resolver claims the parameterresolver- function that obtains the argument from each input, ornullfor an unmatched or rejected result
- Enclosing interface:
HandlerInputResolver<M>
public static record HandlerInputResolver.Resolution<M>(boolean matched, Function<? super HandlerInput<M>, Object> resolver)
extends Record
Describes what a resolver decided for one handler parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionResolution(boolean matched, Function<? super HandlerInput<M>, Object> resolver) Creates an instance of aResolutionrecord 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.booleanmatched()Returns the value of thematchedrecord component.static <M> HandlerInputResolver.Resolution<M> rejected()Returns a result indicating that this resolver claims the parameter but rejects the representative input.static <M> HandlerInputResolver.Resolution<M> resolved(Function<? super HandlerInput<M>, Object> resolver) Returns a successful result with a function that supplies the argument for each compatible input.Function<? super HandlerInput<M>, Object> resolver()Returns the value of theresolverrecord component.final StringtoString()Returns a string representation of this record class.static <M> HandlerInputResolver.Resolution<M> Returns a result indicating that this resolver does not handle the parameter.
-
Constructor Details
-
Resolution
-
-
Method Details
-
unmatched
Returns a result indicating that this resolver does not handle the parameter. The next resolver may be tried. -
rejected
Returns a result indicating that this resolver claims the parameter but rejects the representative input. No later resolver should be tried for that parameter. -
resolved
public static <M> HandlerInputResolver.Resolution<M> resolved(Function<? super HandlerInput<M>, Object> resolver) Returns a successful result with a function that supplies the argument for each compatible input.- Parameters:
resolver- the reusable argument-resolution function
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
matched
-
resolver
-