Class ReplayContextParameterResolverFactory
java.lang.Object
org.axonframework.messaging.eventhandling.replay.annotation.ReplayContextParameterResolverFactory
- All Implemented Interfaces:
ParameterResolverFactory
public class ReplayContextParameterResolverFactory
extends Object
implements ParameterResolverFactory
An implementation of the
ParameterResolverFactory which resolves the parameter annotated with
ReplayContext.
Will resolve the parameter from the ProcessingContext if it contains a ReplayToken with a matching
context of that type. Otherwise, it will resolve always to null. This parameter resolver will always match to prevent
missing event handlers.
- Since:
- 4.6.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(Executable executable, Parameter[] parameters, int parameterIndex) If available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.
-
Constructor Details
-
ReplayContextParameterResolverFactory
public ReplayContextParameterResolverFactory()
-
-
Method Details
-
createInstance
@Nullable public ParameterResolver<Object> createInstance(@Nonnull Executable executable, @Nonnull Parameter[] parameters, int parameterIndex) Description copied from interface:ParameterResolverFactoryIf available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.If the
ParameterResolverFactorycannot provide a suitableParameterResolver, returnsnull.- Specified by:
createInstancein interfaceParameterResolverFactory- Parameters:
executable- The executable (constructor or method) to inspect.parameters- The parameters on the executable to inspect.parameterIndex- The index of the parameter to return aParameterResolverfor.- Returns:
- A suitable
ParameterResolver, ornullif none is found.
-