|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.common.annotation.ParameterResolverFactory
org.axonframework.common.annotation.SimpleResourceParameterResolverFactory
public final class SimpleResourceParameterResolverFactory
Implementation of the ParameterResolverFactory that injects a static list of resources into annotated handler parameters. Any resource is eligible for injection when its type matches the parameter of the annotated handler method.
Since this factory is configured at runtime, it must be registered before any annotated handlers are registered. Handlers that have been registered before will not have their parameter eligible for injection by this factory.
| Method Summary | |
|---|---|
protected 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 void |
register(Collection<?> injectableResources)
Registers the given injectableResources for the ParameterResolverFactory. |
boolean |
supportsPayloadResolution()
Indicates whether this resolver may be used to resolve the payload parameter of an annotated handler method. |
| Methods inherited from class org.axonframework.common.annotation.ParameterResolverFactory |
|---|
createPayloadResolver, findParameterResolver, registerFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void register(Collection<?> injectableResources)
injectableResources for the ParameterResolverFactory. This method must be
called before any annotated handlers are registered. Handlers that have been registered before will not
have their parameter eligible for injection by this factory.
injectableResources - The resources eligible for injection. Each resource is evaluated in the order
provided by the iterator of the given collection.public boolean supportsPayloadResolution()
ParameterResolverFactory
supportsPayloadResolution in class ParameterResolverFactory
protected ParameterResolver createInstance(Annotation[] memberAnnotations,
Class<?> parameterType,
Annotation[] parameterAnnotations)
ParameterResolverFactoryparameterType for a given message.
If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null.
createInstance in class ParameterResolverFactorymemberAnnotations - annotations placed on the member (e.g. method)parameterType - the parameter type to find a resolver forparameterAnnotations - annotations places on the parameter
null if none is found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||