/** * @param groupTimeoutExpression the group timeout expression string. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeoutExpression(String groupTimeoutExpression) { Assert.hasText(groupTimeoutExpression, "'groupTimeoutExpression' must not be empty string."); this.handler.setGroupTimeoutExpression(PARSER.parseExpression(groupTimeoutExpression)); return _this(); }
/** * Configure the handler with a group timeout expression that evaluates to * this constant value. * @param groupTimeout the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression * @see ValueExpression */ public S groupTimeout(long groupTimeout) { this.handler.setGroupTimeoutExpression(new ValueExpression<>(groupTimeout)); return _this(); }
/** * Configure the handler with a function that will be invoked to resolve the group timeout, * based on the message group. * Usually used with a JDK8 lambda: * <p>{@code .groupTimeout(g -> g.size() * 2000L)}. * @param groupTimeoutFunction a function invoked to resolve the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeout(Function<MessageGroup, Long> groupTimeoutFunction) { this.handler.setGroupTimeoutExpression(new FunctionExpression<>(groupTimeoutFunction)); return _this(); }
/** * @param groupTimeoutExpression the group timeout expression string. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeoutExpression(String groupTimeoutExpression) { Assert.hasText(groupTimeoutExpression, "'groupTimeoutExpression' must not be empty string."); this.handler.setGroupTimeoutExpression(PARSER.parseExpression(groupTimeoutExpression)); return _this(); }
/** * @param groupTimeoutExpression the group timeout expression string. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeoutExpression(String groupTimeoutExpression) { Assert.hasText(groupTimeoutExpression, "'groupTimeoutExpression' must not be empty string."); this.handler.setGroupTimeoutExpression(PARSER.parseExpression(groupTimeoutExpression)); return _this(); }
/** * @param groupTimeoutExpression the group timeout expression string. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeoutExpression(String groupTimeoutExpression) { Assert.hasText(groupTimeoutExpression, "'groupTimeoutExpression' must not be empty string."); this.handler.setGroupTimeoutExpression(PARSER.parseExpression(groupTimeoutExpression)); return _this(); }
/** * Configure the handler with a group timeout expression that evaluates to * this constant value. * @param groupTimeout the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression * @see ValueExpression */ public S groupTimeout(long groupTimeout) { this.handler.setGroupTimeoutExpression(new ValueExpression<>(groupTimeout)); return _this(); }
/** * Configure the handler with a group timeout expression that evaluates to * this constant value. * @param groupTimeout the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression * @see ValueExpression */ public S groupTimeout(long groupTimeout) { this.handler.setGroupTimeoutExpression(new ValueExpression<Long>(groupTimeout)); return _this(); }
/** * Configure the handler with a function that will be invoked to resolve the group timeout, * based on the message group. * Usually used with a JDK8 lambda: * <p>{@code .groupTimeout(g -> g.size() * 2000L)}. * @param groupTimeoutFunction a function invoked to resolve the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeout(Function<MessageGroup, Long> groupTimeoutFunction) { this.handler.setGroupTimeoutExpression(new FunctionExpression<>(groupTimeoutFunction)); return _this(); }
/** * Configure the handler with a group timeout expression that evaluates to * this constant value. * @param groupTimeout the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression * @see ValueExpression */ public S groupTimeout(long groupTimeout) { this.handler.setGroupTimeoutExpression(new ValueExpression<Long>(groupTimeout)); return _this(); }
/** * Configure the handler with a function that will be invoked to resolve the group timeout, * based on the message group. * Usually used with a JDK8 lambda: * <p>{@code .groupTimeout(g -> g.size() * 2000L)}. * @param groupTimeoutFunction a function invoked to resolve the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeout(Function<MessageGroup, Long> groupTimeoutFunction) { this.handler.setGroupTimeoutExpression(new FunctionExpression<MessageGroup>(groupTimeoutFunction)); return _this(); }
/** * Configure the handler with a function that will be invoked to resolve the group timeout, * based on the message group. * Usually used with a JDK8 lambda: * <p>{@code .groupTimeout(g -> g.size() * 2000L)}. * @param groupTimeoutFunction a function invoked to resolve the group timeout in milliseconds. * @return the handler spec. * @see AbstractCorrelatingMessageHandler#setGroupTimeoutExpression */ public S groupTimeout(Function<MessageGroup, Long> groupTimeoutFunction) { this.handler.setGroupTimeoutExpression(new FunctionExpression<MessageGroup>(groupTimeoutFunction)); return _this(); }