IdTimestampMessageHeaderInitializer

A {@link hunt.stomp.support.MessageHeaderInitializer MessageHeaderInitializer} to customize the strategy for ID and TIMESTAMP message header generation.

@author Rossen Stoyanchev @since 4.1

Members

Functions

getIdGenerator
IdGenerator getIdGenerator()

Return the configured {@code IdGenerator}, if any.

initHeaders
void initHeaders(MessageHeaderAccessor headerAccessor)
Undocumented in source. Be warned that the author may not have intended to support it.
isEnableTimestamp
bool isEnableTimestamp()

Return whether the timestamp header is enabled or not.

setDisableIdGeneration
void setDisableIdGeneration()

A shortcut for calling {@link #setIdGenerator} with an id generation strategy to disable id generation completely.

setEnableTimestamp
void setEnableTimestamp(bool enableTimestamp)

Whether to enable the automatic addition of the {@link hunt.stomp.MessageHeaders#TIMESTAMP} header on {@code MessageHeaderAccessor} instances being initialized. <p>By default this property is set to false.

setIdGenerator
void setIdGenerator(IdGenerator idGenerator)

Configure the IdGenerator strategy to initialize {@code MessageHeaderAccessor} instances with. <p>By default this property is set to {@code null} in which case the default IdGenerator of {@link hunt.stomp.MessageHeaders} is used. <p>To have no ids generated at all, see {@link #setDisableIdGeneration()}.

Inherited Members

From MessageHeaderInitializer

initHeaders
void initHeaders(MessageHeaderAccessor headerAccessor)

Initialize the given {@code MessageHeaderAccessor}. @param headerAccessor the MessageHeaderAccessor to initialize

Meta