Class StatefulHandler.StatefulHandlerInvoker
java.lang.Object
io.fluxzero.sdk.tracking.handling.StatefulHandler.StatefulHandlerInvoker
- Enclosing class:
StatefulHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.fluxzero.common.handling.HandlerInvoker -
Constructor Summary
ConstructorsConstructorDescriptionStatefulHandlerInvoker(io.fluxzero.common.handling.HandlerInvoker delegate, Entry<?> currentEntry, DeserializingMessage message) -
Method Summary
Modifier and TypeMethodDescriptiondefault io.fluxzero.common.handling.HandlerInvokerandFinally(io.fluxzero.common.handling.HandlerInvoker arg0) protected Objectboolean<A extends Annotation>
AClass<?> protected voidhandleResult(Object result) Applies stateful persistence semantics to a handler invocation result.default Objectinvoke()invoke(BiFunction<Object, Object, Object> combiner) booleantoString()protected ObjecttryStoreResult(Object result) Stores a result object if it is assignable to the stateful handler type.boolean
-
Field Details
-
delegate
protected final io.fluxzero.common.handling.HandlerInvoker delegate
-
-
Constructor Details
-
StatefulHandlerInvoker
public StatefulHandlerInvoker(io.fluxzero.common.handling.HandlerInvoker delegate, Entry<?> currentEntry, DeserializingMessage message)
-
-
Method Details
-
invoke
-
handleResult
Applies stateful persistence semantics to a handler invocation result.Supported result forms:
Collection<?>: stores every same-type instance in the collection. If the collection is empty, the current entry is deleted. If the current entry ID is not part of returned IDs, the current entry is deleted.null: deletes the current entry only when the invoked method is expected to return handler state (same/assignable handler type).- Single object: stores it only if it is assignable to the handler type. If the stored ID differs from the current ID, the current entry is deleted (replacement behavior).
-
tryStoreResult
-
computeId
-
getTargetClass
-
getMethod
-
getMethodAnnotation
-
expectResult
public boolean expectResult() -
isPassive
public boolean isPassive() -
wasSkipped
public boolean wasSkipped() -
toString
-
andFinally
default io.fluxzero.common.handling.HandlerInvoker andFinally(io.fluxzero.common.handling.HandlerInvoker arg0) -
invoke
-