public class MultiHandlerEnhancerDefinition extends Object implements HandlerEnhancerDefinition
Constructor and Description |
---|
MultiHandlerEnhancerDefinition(Collection<HandlerEnhancerDefinition> delegates)
Initializes an instance that delegates to the given
delegates , in the order provided. |
MultiHandlerEnhancerDefinition(HandlerEnhancerDefinition... delegates)
Initializes an instance that delegates to the given
delegates , in the order provided. |
Modifier and Type | Method and Description |
---|---|
List<HandlerEnhancerDefinition> |
getDelegates()
Returns the delegates of this instance, in the order they are evaluated to resolve parameters.
|
static MultiHandlerEnhancerDefinition |
ordered(Collection<HandlerEnhancerDefinition> delegates)
Creates a MultiHandlerEnhancerDefinition instance with the given
delegates , which are automatically
ordered based on the @Priority annotation on their respective classes. |
static MultiHandlerEnhancerDefinition |
ordered(HandlerEnhancerDefinition... delegates)
Creates a MultiHandlerEnhancerDefinition instance with the given
delegates , which are automatically
ordered based on the @Priority annotation on their respective classes. |
<T> MessageHandlingMember<T> |
wrapHandler(MessageHandlingMember<T> original)
Enhance the given
original handler. |
public MultiHandlerEnhancerDefinition(HandlerEnhancerDefinition... delegates)
delegates
, in the order provided. Changes in
the given array are not reflected in the created instance.delegates
- The enhancers providing the parameter values to usepublic MultiHandlerEnhancerDefinition(Collection<HandlerEnhancerDefinition> delegates)
delegates
, in the order provided. Changes in
the given List are not reflected in the created instance.delegates
- The list of enhancers providing the parameter values to usepublic static MultiHandlerEnhancerDefinition ordered(HandlerEnhancerDefinition... 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
.
If one of the delegates is a MultiHandlerEnhancerDefinition itself, that factory's delegates are 'mixed' with
the given delegates
, based on their respective order.
delegates
- The delegates to include in the factorydelegates
public static MultiHandlerEnhancerDefinition ordered(Collection<HandlerEnhancerDefinition> 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
.
If one of the delegates is a MultiHandlerEnhancerDefinition itself, that factory's delegates are 'mixed' with
the given delegates
, based on their respective order.
delegates
- The delegates to include in the factorydelegates
public List<HandlerEnhancerDefinition> getDelegates()
public <T> MessageHandlingMember<T> wrapHandler(@Nonnull MessageHandlingMember<T> original)
HandlerEnhancerDefinition
original
handler. Implementations may return the original message handler.wrapHandler
in interface HandlerEnhancerDefinition
T
- The type of object that will perform the actual handling of the messageoriginal
- The original message handlerCopyright © 2010–2024. All rights reserved.