spring-framework / org.springframework.messaging.support

Package org.springframework.messaging.support

Types

AbstractHeaderMapper

abstract class AbstractHeaderMapper<T : Any> : HeaderMapper<T>

A base HeaderMapper implementation

ChannelInterceptorAdapter

abstract class ChannelInterceptorAdapter : ChannelInterceptor

A ChannelInterceptor base class with empty method implementations as a convenience.

ErrorMessage

open class ErrorMessage : GenericMessage<Throwable>

A GenericMessage with a Throwable payload.

The payload is typically a org.springframework.messaging.MessagingException with the message at the point of failure in its failedMessage property. An optional originalMessage may be provided, which represents the message that existed at the point in the stack where the error message is created.

Consider some code that starts with a message, invokes some process that performs transformation on that message and then fails for some reason, throwing the exception. The exception is caught and an error message produced that contains both the original message, and the transformed message that failed.

ExecutorChannelInterceptor

interface ExecutorChannelInterceptor : ChannelInterceptor

An extension of ChannelInterceptor with callbacks to intercept the asynchronous sending of a org.springframework.messaging.Message to a specific subscriber through an java.util.concurrent.Executor. Supported on org.springframework.messaging.MessageChannel implementations that can be configured with an Executor.

ExecutorSubscribableChannel

open class ExecutorSubscribableChannel : AbstractSubscribableChannel

A SubscribableChannel that sends messages to each of its subscribers.

IdTimestampMessageHeaderInitializer

open class IdTimestampMessageHeaderInitializer : MessageHeaderInitializer

A org.springframework.messaging.support.MessageHeaderInitializer to customize the strategy for ID and TIMESTAMP message header generation.

ImmutableMessageChannelInterceptor

open class ImmutableMessageChannelInterceptor : ChannelInterceptorAdapter

A simpler interceptor that calls MessageHeaderAccessor#setImmutable() on the headers of messages passed through the preSend method.

When configured as the last interceptor in a chain, it allows the component sending the message to leave headers mutable for interceptors to modify prior to the message actually being sent and exposed to concurrent access.

MessageBuilder

class MessageBuilder<T : Any>

A builder for creating a GenericMessage (or ErrorMessage if the payload is of type Throwable).

MessageHandlingRunnable

interface MessageHandlingRunnable : Runnable

Extension of the Runnable interface with methods to obtain the MessageHandler and Message to be handled.