Package org.axonframework.eventhandling
Class ConcludesBatchParameterResolverFactory
java.lang.Object
org.axonframework.messaging.annotation.AbstractAnnotatedParameterResolverFactory<ConcludesBatch,Boolean>
org.axonframework.eventhandling.ConcludesBatchParameterResolverFactory
- All Implemented Interfaces:
ParameterResolver<Boolean>,ParameterResolverFactory
public class ConcludesBatchParameterResolverFactory
extends AbstractAnnotatedParameterResolverFactory<ConcludesBatch,Boolean>
implements ParameterResolver<Boolean>
Parameter resolver factory for boolean event handler parameters annotated with
ConcludesBatch. If the event
is processed in the context of a BatchingUnitOfWork and is the last of the batch the resolver injects a
value of true. If the event is processed in another unit of work it is always assumed to be the last of a
batch.- Author:
- Rene de Waele
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize a ConcludesBatchParameterResolverFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected ParameterResolver<Boolean> booleanIndicates whether this resolver is capable of providing a value for the givenmessage.resolveParameterValue(Message<?> message) Resolves the parameter value to use for the givenmessage, ornullif no suitable parameter value can be resolved.Methods inherited from class org.axonframework.messaging.annotation.AbstractAnnotatedParameterResolverFactory
createInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.messaging.annotation.ParameterResolver
supportedPayloadType
-
Constructor Details
-
ConcludesBatchParameterResolverFactory
public ConcludesBatchParameterResolverFactory()Initialize a ConcludesBatchParameterResolverFactory.
-
-
Method Details
-
getResolver
- Specified by:
getResolverin classAbstractAnnotatedParameterResolverFactory<ConcludesBatch,Boolean> - Returns:
- the parameter resolver that is supplied when a matching parameter is located
-
resolveParameterValue
Description copied from interface:ParameterResolverResolves the parameter value to use for the givenmessage, ornullif no suitable parameter value can be resolved.- Specified by:
resolveParameterValuein interfaceParameterResolver<Boolean>- Parameters:
message- The message to resolve the value from- Returns:
- the parameter value for the handler
-
matches
Description copied from interface:ParameterResolverIndicates whether this resolver is capable of providing a value for the givenmessage.- Specified by:
matchesin interfaceParameterResolver<Boolean>- Parameters:
message- The message to evaluate- Returns:
trueif this resolver can provide a value for the message, otherwisefalse
-