public class IdTimestampMessageHeaderInitializer extends Object implements MessageHeaderInitializer
MessageHeaderInitializer
 to customize the strategy for ID and TIMESTAMP message header generation.| Constructor and Description | 
|---|
| IdTimestampMessageHeaderInitializer() | 
| Modifier and Type | Method and Description | 
|---|---|
| org.springframework.util.IdGenerator | getIdGenerator()Return the configured  IdGenerator, if any. | 
| void | initHeaders(MessageHeaderAccessor headerAccessor)Initialize the given  MessageHeaderAccessor. | 
| boolean | isEnableTimestamp()Return whether the timestamp header is enabled or not. | 
| void | setDisableIdGeneration()A shortcut for calling  setIdGenerator(org.springframework.util.IdGenerator)with an id generation strategy
 to disable id generation completely. | 
| void | setEnableTimestamp(boolean enableTimestamp)Whether to enable the automatic addition of the
  MessageHeaders.TIMESTAMPheader onMessageHeaderAccessorinstances being initialized. | 
| void | setIdGenerator(org.springframework.util.IdGenerator idGenerator)Configure the IdGenerator strategy to initialize  MessageHeaderAccessorinstances with. | 
public void setIdGenerator(@Nullable
                           org.springframework.util.IdGenerator idGenerator)
MessageHeaderAccessor
 instances with.
 By default this property is set to null in which case the default
 IdGenerator of MessageHeaders is used.
 
To have no ids generated at all, see setDisableIdGeneration().
@Nullable public org.springframework.util.IdGenerator getIdGenerator()
IdGenerator, if any.public void setDisableIdGeneration()
setIdGenerator(org.springframework.util.IdGenerator) with an id generation strategy
 to disable id generation completely.public void setEnableTimestamp(boolean enableTimestamp)
MessageHeaders.TIMESTAMP header on
 MessageHeaderAccessor instances being initialized.
 By default this property is set to false.
public boolean isEnableTimestamp()
public void initHeaders(MessageHeaderAccessor headerAccessor)
MessageHeaderInitializerMessageHeaderAccessor.initHeaders in interface MessageHeaderInitializerheaderAccessor - the MessageHeaderAccessor to initialize