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.
Author
Rossen Stoyanchev
Author
Sebastien Deleuze
Since
4.0
SendToMethodReturnValueHandler(messagingTemplate: SimpMessageSendingOperations, annotationRequired: Boolean) |
open fun getDefaultDestinationPrefix(): String
Return the configured default destination prefix. |
|
open fun getDefaultUserDestinationPrefix(): String
Return the configured default user destination prefix. |
|
open fun getHeaderInitializer(): MessageHeaderInitializer
Return the configured header initializer. |
|
open fun handleReturnValue(returnValue: Any, returnType: MethodParameter, message: Message<*>): Unit |
|
open fun setDefaultDestinationPrefix(defaultDestinationPrefix: String): Unit
Configure a default prefix to add to message destinations in cases where a method is not annotated with SendTo or does not specify any destinations through the annotation's value attribute. By default, the prefix is set to "/topic". |
|
open fun setDefaultUserDestinationPrefix(prefix: String): Unit
Configure a default prefix to add to message destinations in cases where a method is annotated with SendToUser but does not specify any destinations through the annotation's value attribute. By default, the prefix is set to "/queue". |
|
open fun setHeaderInitializer(headerInitializer: MessageHeaderInitializer): Unit
Configure a MessageHeaderInitializer to apply to the headers of all messages sent to the client outbound channel. By default this property is not set. |
|
open fun supportsReturnType(returnType: MethodParameter): Boolean |
|
open fun toString(): String |