public abstract class ParameterResolverFactory extends Object
org.axonframework.common.annotation.ParameterResolverFactory
in the META-INF/services folder. In this file, place the fully qualified class names of all available
implementations.
The factory implementations must be public, non-abstract, have a default public constructor and extend the
ParameterResolverFactory class.ServiceLoader,
ServiceLoader.load(Class)| Constructor and Description |
|---|
ParameterResolverFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ParameterResolver |
createInstance(Annotation[] memberAnnotations,
Class<?> parameterType,
Annotation[] parameterAnnotations)
If available, creates a ParameterResolver instance that can provide a parameter of type
parameterType for a given message. |
static ParameterResolver |
createPayloadResolver(Class<?> parameterType)
Creates a ParameterResolver that resolves the payload of a given message when it is assignable to the given
parameterType. |
static ParameterResolver |
findParameterResolver(Annotation[] memberAnnotations,
Class<?> parameterType,
Annotation[] parameterAnnotations,
boolean isPayloadParameter)
Iterates over all known ParameterResolverFactory implementations to create a ParameterResolver instance for the
given parameters.
|
static void |
registerChangeListener(org.axonframework.common.annotation.ParameterResolverFactory.ChangeListener listener)
Registers a listener that is notified when the ParameterResolverFactory instances are registered or
unregistered.
|
static void |
registerFactory(ParameterResolverFactory factory)
Registers a ParameterResolverFactory at runtime.
|
abstract boolean |
supportsPayloadResolution()
Indicates whether this resolver may be used to resolve the payload parameter of an annotated handler method.
|
static void |
unregisterFactory(ParameterResolverFactory factory)
Unregisters a ParameterResolverFactory at runtime.
|
public static void registerFactory(ParameterResolverFactory factory)
factory - The factory to registerpublic static void unregisterFactory(ParameterResolverFactory factory)
factory was registered
prior to this method invocation.factory - The factory to unregisterpublic static ParameterResolver findParameterResolver(Annotation[] memberAnnotations, Class<?> parameterType, Annotation[] parameterAnnotations, boolean isPayloadParameter)
memberAnnotations - annotations placed on the member (e.g. method)parameterType - the parameter type to find a resolver forparameterAnnotations - annotations places on the parameterisPayloadParameter - whether the parameter to resolve represents a payload parameternull if none is foundpublic static ParameterResolver createPayloadResolver(Class<?> parameterType)
parameterType.parameterType - The type of parameter to create a resolver forpublic abstract boolean supportsPayloadResolution()
protected abstract ParameterResolver createInstance(Annotation[] memberAnnotations, Class<?> parameterType, Annotation[] parameterAnnotations)
parameterType for a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null.memberAnnotations - annotations placed on the member (e.g. method)parameterType - the parameter type to find a resolver forparameterAnnotations - annotations places on the parameternull if none is foundpublic static void registerChangeListener(org.axonframework.common.annotation.ParameterResolverFactory.ChangeListener listener)
listener - The listener to notify when state has changedCopyright © 2010-2013. All Rights Reserved.