public class MethodAnnotationPublisherMetadataSource extends Object
PublisherMetadataSource
implementation that retrieves the channel
name and expression strings from an annotation.Modifier and Type | Field and Description |
---|---|
static String |
ARGUMENT_MAP_VARIABLE_NAME |
static String |
EXCEPTION_VARIABLE_NAME |
static ExpressionParser |
EXPRESSION_PARSER |
static String |
METHOD_NAME_VARIABLE_NAME |
static Expression |
RETURN_VALUE_EXPRESSION |
static String |
RETURN_VALUE_VARIABLE_NAME |
Constructor and Description |
---|
MethodAnnotationPublisherMetadataSource() |
MethodAnnotationPublisherMetadataSource(Set<Class<? extends Annotation>> annotationTypes) |
Modifier and Type | Method and Description |
---|---|
String |
getChannelName(Method method)
Returns the channel name to which Messages should be published
for this particular method invocation.
|
Expression |
getExpressionForPayload(Method method)
Returns the SpEL expression to be evaluated for creating the Message
payload.
|
Map<String,Expression> |
getExpressionsForHeaders(Method method)
Returns the map of expression strings to be evaluated for any headers
that should be set on the published Message.
|
void |
setChannelAttributeName(String channelAttributeName) |
public static final String METHOD_NAME_VARIABLE_NAME
public static final String ARGUMENT_MAP_VARIABLE_NAME
public static final String RETURN_VALUE_VARIABLE_NAME
public static final String EXCEPTION_VARIABLE_NAME
public static final ExpressionParser EXPRESSION_PARSER
public static final Expression RETURN_VALUE_EXPRESSION
public MethodAnnotationPublisherMetadataSource()
public MethodAnnotationPublisherMetadataSource(Set<Class<? extends Annotation>> annotationTypes)
public void setChannelAttributeName(String channelAttributeName)
public String getChannelName(Method method)
method
- The Method.public Expression getExpressionForPayload(Method method)
method
- the Method.public Map<String,Expression> getExpressionsForHeaders(Method method)
method
- The Method.