@Override public void afterPropertiesSet() throws Exception { if (this.target instanceof ReleaseStrategy && !StringUtils.hasText(this.methodName)) { this.strategy = (ReleaseStrategy) this.target; return; } if (this.target != null) { if (StringUtils.hasText(this.methodName)) { this.strategy = new MethodInvokingReleaseStrategy(this.target, this.methodName); } else { Method method = MessagingAnnotationUtils.findAnnotatedMethod(this.target, org.springframework.integration.annotation.ReleaseStrategy.class); if (method != null) { this.strategy = new MethodInvokingReleaseStrategy(this.target, method); } else { if (logger.isWarnEnabled()) { logger.warn("No ReleaseStrategy annotated method found on " + this.target.getClass().getSimpleName() + "; falling back to SimpleSequenceSizeReleaseStrategy, target: " + this.target + ", methodName: " + this.methodName); } } } } else { logger.warn("No target supplied; falling back to SimpleSequenceSizeReleaseStrategy"); } }
@Override public void afterPropertiesSet() throws Exception { if (this.target instanceof CorrelationStrategy && !StringUtils.hasText(this.methodName)) { this.strategy = (CorrelationStrategy) this.target; return; } if (this.target != null) { if (StringUtils.hasText(this.methodName)) { this.strategy = new MethodInvokingCorrelationStrategy(this.target, this.methodName); } else { Method method = MessagingAnnotationUtils.findAnnotatedMethod(this.target, org.springframework.integration.annotation.CorrelationStrategy.class); if (method != null) { this.strategy = new MethodInvokingCorrelationStrategy(this.target, method); } } } }
Method releaseStrategyMethod = MessagingAnnotationUtils.findAnnotatedMethod(bean, ReleaseStrategy.class); if (releaseStrategyMethod != null) { releaseStrategy = new MethodInvokingReleaseStrategy(bean, releaseStrategyMethod); Method correlationStrategyMethod = MessagingAnnotationUtils.findAnnotatedMethod(bean, CorrelationStrategy.class); if (correlationStrategyMethod != null) { correlationStrategy = new MethodInvokingCorrelationStrategy(bean, correlationStrategyMethod);
@Override public void afterPropertiesSet() throws Exception { if (this.target instanceof CorrelationStrategy && !StringUtils.hasText(this.methodName)) { this.strategy = (CorrelationStrategy) this.target; return; } if (this.target != null) { if (StringUtils.hasText(this.methodName)) { this.strategy = new MethodInvokingCorrelationStrategy(this.target, this.methodName); } else { Method method = MessagingAnnotationUtils.findAnnotatedMethod(this.target, org.springframework.integration.annotation.CorrelationStrategy.class); if (method != null) { this.strategy = new MethodInvokingCorrelationStrategy(this.target, method); } } } }
@Override public void afterPropertiesSet() throws Exception { if (this.target instanceof ReleaseStrategy && !StringUtils.hasText(this.methodName)) { this.strategy = (ReleaseStrategy) this.target; return; } if (this.target != null) { if (StringUtils.hasText(this.methodName)) { this.strategy = new MethodInvokingReleaseStrategy(this.target, this.methodName); } else { Method method = MessagingAnnotationUtils.findAnnotatedMethod(this.target, org.springframework.integration.annotation.ReleaseStrategy.class); if (method != null) { this.strategy = new MethodInvokingReleaseStrategy(this.target, method); } else { if (logger.isWarnEnabled()) { logger.warn("No ReleaseStrategy annotated method found on " + this.target.getClass().getSimpleName() + "; falling back to SimpleSequenceSizeReleaseStrategy, target: " + this.target + ", methodName: " + this.methodName); } } } } else { logger.warn("No target supplied; falling back to SimpleSequenceSizeReleaseStrategy"); } }
Method releaseStrategyMethod = MessagingAnnotationUtils.findAnnotatedMethod(bean, ReleaseStrategy.class); if (releaseStrategyMethod != null) { releaseStrategy = new MethodInvokingReleaseStrategy(bean, releaseStrategyMethod); Method correlationStrategyMethod = MessagingAnnotationUtils.findAnnotatedMethod(bean, CorrelationStrategy.class); if (correlationStrategyMethod != null) { correlationStrategy = new MethodInvokingCorrelationStrategy(bean, correlationStrategyMethod);