Top Description Inners Fields Constructors Methods
org.springframework.messaging.handler.annotation.reactive

public Class DestinationVariableMethodArgumentResolver

extends AbstractNamedValueMethodArgumentResolver
Class Inheritance
Imports
java.util.Map, org.springframework.core.MethodParameter, org.springframework.core.convert.ConversionService, org.springframework.lang.Nullable, org.springframework.messaging.Message, .MessageHandlingException, .MessageHeaders, org.springframework.messaging.handler.annotation.DestinationVariable, .ValueConstants, org.springframework.util.Assert

Resolve for @DestinationVariable method parameters.
Author
Rossen Stoyanchev
Since
5.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final String
DESTINATION_TEMPLATE_VARIABLES_HEADER

The name of the header used to for template variables.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected AbstractNamedValueMethodArgumentResolver.NamedValueInfo
protected void
handleMissingValue(String
the name for the value
name
,
MethodParameter
the target method parameter
parameter
,
Message<?>
the message being processed
message
)

Implements abstract org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.handleMissingValue.

Invoked when a value is required, but resolveArgumentInternal returned null and there is no default value.
protected Object
resolveArgumentInternal(MethodParameter
the method parameter to resolve to an argument value
parameter
,
Message<?>
the current request
message
,
String
the name of the value being resolved
name
)

Implements abstract org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.resolveArgumentInternal.

Resolves the given parameter type and value name into an argument value.
public boolean
supportsParameter(MethodParameter
the method parameter to check
parameter
)

Implements org.springframework.messaging.handler.invocation.reactive.HandlerMethodArgumentResolver.supportsParameter.

Whether the given method parameter is supported by this resolver.
Inherited from org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver:
resolveArgumentValue

Field Detail

DESTINATION_TEMPLATE_VARIABLES_HEADERback to summary
public static final String DESTINATION_TEMPLATE_VARIABLES_HEADER

The name of the header used to for template variables.

Constructor Detail

DestinationVariableMethodArgumentResolverback to summary
public DestinationVariableMethodArgumentResolver(ConversionService conversionService)

Method Detail

createNamedValueInfoback to summary
protected AbstractNamedValueMethodArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)

Implements abstract org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.createNamedValueInfo.

Doc from org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.createNamedValueInfo.

Create the NamedValueInfo object for the given method parameter. Implementations typically retrieve the method annotation by means of MethodParameter#getParameterAnnotation(Class).

Parameters
parameter:MethodParameter

the method parameter

Returns:AbstractNamedValueMethodArgumentResolver.NamedValueInfo

the named value information

Annotations
@Override
handleMissingValueback to summary
protected void handleMissingValue(String name, MethodParameter parameter, Message<?> message)

Implements abstract org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.handleMissingValue.

Doc from org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.handleMissingValue.

Invoked when a value is required, but resolveArgumentInternal returned null and there is no default value. Subclasses can throw an appropriate exception for this case.

Parameters
name:String

the name for the value

parameter:MethodParameter

the target method parameter

message:Message<?>

the message being processed

Annotations
@Override
resolveArgumentInternalback to summary
protected Object resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)

Implements abstract org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.resolveArgumentInternal.

Doc from org.springframework.messaging.handler.annotation.reactive.AbstractNamedValueMethodArgumentResolver.resolveArgumentInternal.

Resolves the given parameter type and value name into an argument value.

Parameters
parameter:MethodParameter

the method parameter to resolve to an argument value

message:Message<?>

the current request

name:String

the name of the value being resolved

Returns:Object

the resolved argument. May be null

Annotations
@Override
@Nullable
@SuppressWarnings:unchecked
supportsParameterback to summary
public boolean supportsParameter(MethodParameter parameter)

Implements org.springframework.messaging.handler.invocation.reactive.HandlerMethodArgumentResolver.supportsParameter.

Doc from org.springframework.messaging.handler.invocation.reactive.HandlerMethodArgumentResolver.supportsParameter.

Whether the given method parameter is supported by this resolver.

Parameters
parameter:MethodParameter

the method parameter to check

Returns:boolean

true if this resolver supports the supplied parameter; false otherwise

Annotations
@Override
org.springframework.messaging.handler.annotation.reactive back to summary

private final Class DestinationVariableMethodArgumentResolver.DestinationVariableNamedValueInfo

extends NamedValueInfo
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Constructor Detail

DestinationVariableNamedValueInfoback to summary
private DestinationVariableNamedValueInfo(DestinationVariable annotation)