public class DestinationVariableMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver
@DestinationVariable
method parameters.Modifier and Type | Class and Description |
---|---|
private static class |
DestinationVariableMethodArgumentResolver.DestinationVariableNamedValueInfo |
AbstractNamedValueMethodArgumentResolver.NamedValueInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESTINATION_TEMPLATE_VARIABLES_HEADER
The name of the header used to for template variables.
|
Constructor and Description |
---|
DestinationVariableMethodArgumentResolver(ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
protected AbstractNamedValueMethodArgumentResolver.NamedValueInfo |
createNamedValueInfo(MethodParameter parameter)
Create the
AbstractNamedValueMethodArgumentResolver.NamedValueInfo object for the given method parameter. |
protected void |
handleMissingValue(java.lang.String name,
MethodParameter parameter,
Message<?> message)
Invoked when a value is required, but
AbstractNamedValueMethodArgumentResolver.resolveArgumentInternal(org.springframework.core.MethodParameter, org.springframework.messaging.Message<?>, java.lang.String)
returned null and there is no default value. |
protected java.lang.Object |
resolveArgumentInternal(MethodParameter parameter,
Message<?> message,
java.lang.String name)
Resolves the given parameter type and value name into an argument value.
|
boolean |
supportsParameter(MethodParameter parameter)
Whether the given method parameter is
supported by this resolver.
|
resolveArgumentValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveArgument
public static final java.lang.String DESTINATION_TEMPLATE_VARIABLES_HEADER
public DestinationVariableMethodArgumentResolver(ConversionService conversionService)
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter;
false
otherwiseprotected AbstractNamedValueMethodArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)
AbstractNamedValueMethodArgumentResolver
AbstractNamedValueMethodArgumentResolver.NamedValueInfo
object for the given method parameter.
Implementations typically retrieve the method annotation by means of
MethodParameter.getParameterAnnotation(Class)
.createNamedValueInfo
in class AbstractNamedValueMethodArgumentResolver
parameter
- the method parameter@Nullable protected java.lang.Object resolveArgumentInternal(MethodParameter parameter, Message<?> message, java.lang.String name)
AbstractNamedValueMethodArgumentResolver
resolveArgumentInternal
in class AbstractNamedValueMethodArgumentResolver
parameter
- the method parameter to resolve to an argument valuemessage
- the current requestname
- the name of the value being resolvednull
protected void handleMissingValue(java.lang.String name, MethodParameter parameter, Message<?> message)
AbstractNamedValueMethodArgumentResolver
AbstractNamedValueMethodArgumentResolver.resolveArgumentInternal(org.springframework.core.MethodParameter, org.springframework.messaging.Message<?>, java.lang.String)
returned null
and there is no default value. Sub-classes can
throw an appropriate exception for this case.handleMissingValue
in class AbstractNamedValueMethodArgumentResolver
name
- the name for the valueparameter
- the target method parametermessage
- the message being processed