Polishing

This commit is contained in:
Juergen Hoeller
2017-07-19 23:55:47 +02:00
parent 12978b8185
commit c752ba5b38
28 changed files with 228 additions and 233 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,20 +40,12 @@ public class IdTimestampMessageHeaderInitializer implements MessageHeaderInitial
* instances with.
* <p>By default this property is set to {@code null} in which case the default
* IdGenerator of {@link org.springframework.messaging.MessageHeaders} is used.
* <p>To have no id's generated at all, see {@link #setDisableIdGeneration()}.
* <p>To have no ids generated at all, see {@link #setDisableIdGeneration()}.
*/
public void setIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
}
/**
* A shortcut for calling {@link #setIdGenerator(org.springframework.util.IdGenerator)}
* with an id generation strategy to disable id generation completely.
*/
public void setDisableIdGeneration() {
this.idGenerator = ID_VALUE_NONE_GENERATOR;
}
/**
* Return the configured {@code IdGenerator}, if any.
*/
@@ -61,6 +53,14 @@ public class IdTimestampMessageHeaderInitializer implements MessageHeaderInitial
return this.idGenerator;
}
/**
* A shortcut for calling {@link #setIdGenerator} with an id generation strategy
* to disable id generation completely.
*/
public void setDisableIdGeneration() {
this.idGenerator = ID_VALUE_NONE_GENERATOR;
}
/**
* Whether to enable the automatic addition of the
* {@link org.springframework.messaging.MessageHeaders#TIMESTAMP} header on