abstract class AbstractMethodMessageHandler<T : Any> : MessageHandler, ApplicationContextAware, InitializingBean
Abstract base class for HandlerMethod-based message handling. Provides most of the logic required to discover handler methods at startup, find a matching handler method at runtime for a given message and invoke it.
Also supports discovering and invoking exception handling methods to process exceptions raised during message handling.
- the type of the Object that contains information mapping a org.springframework.messaging.handler.HandlerMethod to incoming messages
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
4.0
AbstractMethodMessageHandler()
Abstract base class for HandlerMethod-based message handling. Provides most of the logic required to discover handler methods at startup, find a matching handler method at runtime for a given message and invoke it. Also supports discovering and invoking exception handling methods to process exceptions raised during message handling. |
open fun afterPropertiesSet(): Unit |
|
open fun getApplicationContext(): ApplicationContext |
|
open fun getArgumentResolvers(): MutableList<HandlerMethodArgumentResolver>
Return the complete list of argument resolvers. |
|
open fun getCustomArgumentResolvers(): MutableList<HandlerMethodArgumentResolver>
Return the configured custom argument resolvers, if any. |
|
open fun getCustomReturnValueHandlers(): MutableList<HandlerMethodReturnValueHandler>
Return the configured custom return value handlers, if any. |
|
open fun getDestinationPrefixes(): MutableCollection<String>
Return the configured destination prefixes, if any. |
|
open fun getHandlerMethods(): MutableMap<T, HandlerMethod>
Return a map with all handler methods and their mappings. |
|
open fun getReturnValueHandlers(): MutableList<HandlerMethodReturnValueHandler>
Return the complete list of return value handlers. |
|
open fun handleMessage(message: Message<*>): Unit |
|
open fun setApplicationContext(applicationContext: ApplicationContext): Unit |
|
open fun setArgumentResolvers(argumentResolvers: MutableList<HandlerMethodArgumentResolver>): Unit
Configure the complete list of supported argument types, effectively overriding the ones configured by default. This is an advanced option; for most use cases it should be sufficient to use |
|
open fun setCustomArgumentResolvers(customArgumentResolvers: MutableList<HandlerMethodArgumentResolver>): Unit
Sets the list of custom |
|
open fun setCustomReturnValueHandlers(customReturnValueHandlers: MutableList<HandlerMethodReturnValueHandler>): Unit
Set the list of custom |
|
open fun setDestinationPrefixes(prefixes: MutableCollection<String>): Unit
When this property is configured only messages to destinations matching one of the configured prefixes are eligible for handling. When there is a match the prefix is removed and only the remaining part of the destination is used for method-mapping purposes. By default, no prefixes are configured in which case all messages are eligible for handling. |
|
open fun setReturnValueHandlers(returnValueHandlers: MutableList<HandlerMethodReturnValueHandler>): Unit
Configure the complete list of supported return value types, effectively overriding the ones configured by default. This is an advanced option; for most use cases it should be sufficient to use |
|
open fun toString(): String |