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.

<p>Also supports discovering and invoking exception handling methods to process exceptions raised during message handling.

@author Rossen Stoyanchev @author Juergen Hoeller @since 4.0 @param (T) the type of the Object that contains information mapping a {@link hunt.stomp.handler.HandlerMethod} to incoming messages

Constructors

this
this()
Undocumented in source.

Members

Functions

afterPropertiesSet
void afterPropertiesSet()

Return the complete list of return value handlers.

getDestination
string getDestination(MessageBase message)
Undocumented in source.
getDestinationPrefixes
string[] getDestinationPrefixes()

Return the configured destination prefixes, if any.

getLookupDestination
string getLookupDestination(string destination)

Check whether the given destination (of an incoming message) matches to one of the configured destination prefixes and if so return the remaining portion of the destination after the matched prefix. <p>If there are no matching prefixes, return {@code null}. <p>If there are no destination prefixes, return the destination as is.

handleMessage
void handleMessage(MessageBase message)

Return a map with all handler methods and their mappings.

handleMessageInternal
void handleMessageInternal(MessageBase message, string lookupDestination)
Undocumented in source. Be warned that the author may not have intended to support it.
handleReturnValue
void handleReturnValue(Object returnValue, TypeInfo returnType, MessageBase message, string[] destinations)
Undocumented in source.
opCmp
int opCmp(MessageHandler o)

Find an {@code @MessageExceptionHandler} method for the given exception. The default implementation searches methods in the class hierarchy of the HandlerMethod first and if not found, it continues searching for additional {@code @MessageExceptionHandler} methods among the configured {@linkplain hunt.stomp.handler.MessagingAdviceBean MessagingAdviceBean}, if any. @param handlerMethod the method where the exception was raised @param exception the raised exception @return a method to handle the exception, or {@code null} @since 4.2

setDestinationPrefixes
void setDestinationPrefixes(string[] prefixes)

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. <p>By default, no prefixes are configured in which case all messages are eligible for handling.

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From MessageHandler

handleMessage
void handleMessage(MessageBase message)

Handle the given message. @param message the message to be handled @throws MessagingException if the handler failed to process the message

opCmp
int opCmp(MessageHandler o)
Undocumented in source.

Meta