Add JavaConfig Docs for Delayer

Also add `setDelayExpressionString()`.
This commit is contained in:
Gary Russell
2017-03-17 14:10:29 -04:00
committed by Artem Bilan
parent d525edd90d
commit c85b9cbb20
2 changed files with 52 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 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.
@@ -140,9 +140,10 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
}
/**
* Specify the {@link Expression} that should be checked for a delay period
* (in milliseconds) or a Date to delay until. If this property is set, the
* result of the expression evaluation will take precedence over this handler's default delay.
* Specify the {@link Expression} that should be checked for a delay period (in
* milliseconds) or a Date to delay until. If this property is set, the result of the
* expression evaluation (if not null) will take precedence over this handler's
* default delay.
*
* @param delayExpression The delay expression.
*/
@@ -150,6 +151,19 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
this.delayExpression = delayExpression;
}
/**
* Specify the {@code Expression} that should be checked for a delay period (in
* milliseconds) or a Date to delay until. If this property is set, the result of the
* expression evaluation (if not null) will take precedence over this handler's
* default delay.
*
* @param delayExpression The delay expression.
* @since 5.0
*/
public void setDelayExpressionString(String delayExpression) {
this.delayExpression = EXPRESSION_PARSER.parseExpression(delayExpression);
}
/**
* Specify whether {@code Exceptions} thrown by {@link #delayExpression} evaluation should be
* ignored (only logged). In this case case the delayer will fall back to the