public class MultiHandlerDefinition extends Object implements HandlerDefinition
HandlerEnhancerDefinition.| Constructor and Description |
|---|
MultiHandlerDefinition(HandlerDefinition... delegates)
Initializes an instance that delegates to the given
delegates, in the order provided. |
MultiHandlerDefinition(List<HandlerDefinition> delegates)
Initializes an instance that delegates to the given
delegates, in the order provided. |
MultiHandlerDefinition(List<HandlerDefinition> delegates,
HandlerEnhancerDefinition handlerEnhancerDefinition)
Initializes an instance that delegates to the given
delegates, in the order provided. |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<MessageHandlingMember<T>> |
createHandler(Class<T> declaringType,
Executable executable,
ParameterResolverFactory parameterResolverFactory)
Create a
MessageHandlingMember for the given executable method. |
List<HandlerDefinition> |
getDelegates()
Returns the delegates of this instance, in the order they are evaluated to resolve parameters.
|
HandlerEnhancerDefinition |
getHandlerEnhancerDefinition()
Returns handler enhancer definition used to wrap handlers.
|
static MultiHandlerDefinition |
ordered(HandlerDefinition... delegates)
Creates a MultiHandlerDefinition instance with the given
delegates, which are automatically ordered
based
on the @Priority annotation on their respective classes. |
static MultiHandlerDefinition |
ordered(HandlerEnhancerDefinition handlerEnhancerDefinition,
HandlerDefinition... delegates)
Creates a MultiHandlerDefinition instance with the given
delegates, which are automatically ordered
based
on the @Priority annotation on their respective classes. |
static MultiHandlerDefinition |
ordered(List<HandlerDefinition> delegates)
Creates a MultiHandlerDefinition instance with the given
delegates, which are automatically ordered based
on the @Priority annotation on their respective classes. |
static MultiHandlerDefinition |
ordered(List<HandlerDefinition> delegates,
HandlerEnhancerDefinition handlerEnhancerDefinition)
Creates a MultiHandlerDefinition instance with the given
delegates, which are automatically ordered based
on the @Priority annotation on their respective classes. |
public MultiHandlerDefinition(HandlerDefinition... delegates)
delegates, in the order provided. Changes in
the given array are not reflected in the created instance.delegates - The handlerDefinitions providing the parameter values to usepublic MultiHandlerDefinition(List<HandlerDefinition> delegates)
delegates, in the order provided. Changes in
the given list are not reflected in the created instance.delegates - The handlerDefinitions providing the parameter values to usepublic MultiHandlerDefinition(List<HandlerDefinition> delegates, HandlerEnhancerDefinition handlerEnhancerDefinition)
delegates, in the order provided. Changes in
the given List are not reflected in the created instance.delegates - The list of handlerDefinitions providing the parameter values to usehandlerEnhancerDefinition - The enhancer used to wrap the delegatespublic static MultiHandlerDefinition ordered(HandlerDefinition... delegates)
delegates, which are automatically ordered
based
on the @Priority annotation on their respective classes. Classes with
the same Priority are kept in the order as provided in the delegates. As an enhancer, ClasspathHandlerEnhancerDefinition is used.
If one of the delegates is a MultiHandlerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.
delegates - The delegates to include in the factorydelegatespublic static MultiHandlerDefinition ordered(HandlerEnhancerDefinition handlerEnhancerDefinition, HandlerDefinition... delegates)
delegates, which are automatically ordered
based
on the @Priority annotation on their respective classes. Classes with
the same Priority are kept in the order as provided in the delegates. As an enhancer, provided one is
used.
If one of the delegates is a MultiHandlerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.
handlerEnhancerDefinition - The enhancer used to wrap the delegatesdelegates - The delegates to include in the factorydelegatespublic static MultiHandlerDefinition ordered(List<HandlerDefinition> delegates)
delegates, which are automatically ordered based
on the @Priority annotation on their respective classes. Classes with
the same Priority are kept in the order as provided in the delegates. As an enhancer, ClasspathHandlerEnhancerDefinition is used.
If one of the delegates is a MultiHandlerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.
delegates - The delegates to include in the factorydelegatespublic static MultiHandlerDefinition ordered(List<HandlerDefinition> delegates, HandlerEnhancerDefinition handlerEnhancerDefinition)
delegates, which are automatically ordered based
on the @Priority annotation on their respective classes. Classes with
the same Priority are kept in the order as provided in the delegates. As an enhancer, provided one is
used.
If one of the delegates is a MultiHandlerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.
delegates - The delegates to include in the factoryhandlerEnhancerDefinition - The enhancer used to wrap the delegatesdelegatespublic List<HandlerDefinition> getDelegates()
public HandlerEnhancerDefinition getHandlerEnhancerDefinition()
public <T> Optional<MessageHandlingMember<T>> createHandler(@Nonnull Class<T> declaringType, @Nonnull Executable executable, @Nonnull ParameterResolverFactory parameterResolverFactory)
HandlerDefinitionMessageHandlingMember for the given executable method. Use the given parameterResolverFactory to resolve the method's parameters.createHandler in interface HandlerDefinitionT - The type of the declaring objectdeclaringType - The type of object declaring the given executable methodexecutable - The method to inspectparameterResolverFactory - Factory for a ParameterResolver of the methodCopyright © 2010–2023. All rights reserved.