org.axonframework.common.annotation
Interface ParameterResolverFactory

All Known Implementing Classes:
AbstractAnnotatedParameterResolverFactory, CurrentUnitOfWorkParameterResolverFactory, DefaultParameterResolverFactory, FixtureResourceParameterResolverFactory, MultiParameterResolverFactory, SequenceNumberParameterResolverFactory, SimpleResourceParameterResolverFactory, SpringBeanParameterResolverFactory, TimestampParameterResolverFactory

public interface ParameterResolverFactory

Interface for objects capable of creating Parameter Resolver instances for annotated handler methods. These resolvers provide the parameter values to use, given an incoming Message.

One of the implementations is the ClasspathParameterResolverFactory, which allows application developers to provide custom ParameterResolverFactory implementations using the ServiceLoader mechanism. To do so, place a file called 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 implement the ParameterResolverFactory interface.

Since:
2.1
Author:
Allard Buijze
See Also:
ClasspathParameterResolverFactory

Method Summary
 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.
 

Method Detail

createInstance

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.

If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null.

Parameters:
memberAnnotations - annotations placed on the member (e.g. method)
parameterType - the parameter type to find a resolver for
parameterAnnotations - annotations placed on the parameter
Returns:
a suitable ParameterResolver, or null if none is found


Copyright © 2010-2016. All Rights Reserved.