spring-framework / org.springframework.messaging.simp.annotation.support

Package org.springframework.messaging.simp.annotation.support

Types

PrincipalMethodArgumentResolver

open class PrincipalMethodArgumentResolver : HandlerMethodArgumentResolver

SendToMethodReturnValueHandler

open class SendToMethodReturnValueHandler : HandlerMethodReturnValueHandler

A HandlerMethodReturnValueHandler for sending to destinations specified in a SendTo or SendToUser method-level annotations.

The value returned from the method is converted, and turned to a Message and sent through the provided MessageChannel. The message is then enriched with the session id of the input message as well as the destination from the annotation(s). If multiple destinations are specified, a copy of the message is sent to each destination.

SubscriptionMethodReturnValueHandler

open class SubscriptionMethodReturnValueHandler : HandlerMethodReturnValueHandler

HandlerMethodReturnValueHandler for replying directly to a subscription. It is supported on methods annotated with org.springframework.messaging.simp.annotation.SubscribeMapping such that the return value is treated as a response to be sent directly back on the session. This allows a client to implement a request-response pattern and use it for example to obtain some data upon initialization.

The value returned from the method is converted and turned into a Message that is then enriched with the sessionId, subscriptionId, and destination of the input message.

Note: this default behavior for interpreting the return value from an @SubscribeMapping method can be overridden through use of the SendTo or SendToUser annotations in which case a message is prepared and sent to the broker instead.

Exceptions

MissingSessionUserException

open class MissingSessionUserException : MessagingException