Java Code Examples for org.springframework.messaging.MessageHeaders#ID_VALUE_NONE
The following examples show how to use
org.springframework.messaging.MessageHeaders#ID_VALUE_NONE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageHeaderAccessor.java From spring-analysis-note with MIT License | 6 votes |
public void setImmutable() { if (!this.mutable) { return; } if (getId() == null) { IdGenerator idGenerator = (MessageHeaderAccessor.this.idGenerator != null ? MessageHeaderAccessor.this.idGenerator : MessageHeaders.getIdGenerator()); UUID id = idGenerator.generateId(); if (id != MessageHeaders.ID_VALUE_NONE) { getRawHeaders().put(ID, id); } } if (getTimestamp() == null) { if (MessageHeaderAccessor.this.enableTimestamp) { getRawHeaders().put(TIMESTAMP, System.currentTimeMillis()); } } this.mutable = false; }
Example 2
Source File: MessageHeaderAccessor.java From java-technology-stack with MIT License | 6 votes |
public void setImmutable() { if (!this.mutable) { return; } if (getId() == null) { IdGenerator idGenerator = (MessageHeaderAccessor.this.idGenerator != null ? MessageHeaderAccessor.this.idGenerator : MessageHeaders.getIdGenerator()); UUID id = idGenerator.generateId(); if (id != MessageHeaders.ID_VALUE_NONE) { getRawHeaders().put(ID, id); } } if (getTimestamp() == null) { if (MessageHeaderAccessor.this.enableTimestamp) { getRawHeaders().put(TIMESTAMP, System.currentTimeMillis()); } } this.mutable = false; }
Example 3
Source File: MessageHeaderAccessor.java From spring4-understanding with Apache License 2.0 | 6 votes |
public void setIdAndTimestamp() { if (!isMutable()) { return; } if (getId() == null) { IdGenerator idGenerator = (MessageHeaderAccessor.this.idGenerator != null ? MessageHeaderAccessor.this.idGenerator : MessageHeaders.getIdGenerator()); UUID id = idGenerator.generateId(); if (id != null && id != MessageHeaders.ID_VALUE_NONE) { getRawHeaders().put(ID, id); } } if (getTimestamp() == null) { if (MessageHeaderAccessor.this.enableTimestamp) { getRawHeaders().put(TIMESTAMP, System.currentTimeMillis()); } } }
Example 4
Source File: MessageHeaderAccessor.java From spring-analysis-note with MIT License | 4 votes |
public MutableMessageHeaders(@Nullable Map<String, Object> headers) { super(headers, MessageHeaders.ID_VALUE_NONE, -1L); }
Example 5
Source File: MessageHeaderAccessor.java From java-technology-stack with MIT License | 4 votes |
public MutableMessageHeaders(@Nullable Map<String, Object> headers) { super(headers, MessageHeaders.ID_VALUE_NONE, -1L); }
Example 6
Source File: IdTimestampMessageHeaderInitializer.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override public UUID generateId() { return MessageHeaders.ID_VALUE_NONE; }
Example 7
Source File: MessageHeaderAccessor.java From spring4-understanding with Apache License 2.0 | 4 votes |
public MutableMessageHeaders(Map<String, Object> headers) { super(headers, MessageHeaders.ID_VALUE_NONE, -1L); }