this.handler.setAsync(true); this.handler.setOutputChannel(this.output); this.handler.setBeanFactory(mock(BeanFactory.class));
serviceActivator.setAsync(Boolean.parseBoolean(this.beanFactory.resolveEmbeddedValue(isAsync)));
/** * Allow async replies. If the handler reply is a {@code ListenableFuture} send * the output when it is satisfied rather than sending the future as the result. * Only subclasses that support this feature should set it. * @param async true to allow. * @return the endpoint spec. * @since 1.2 * @see AbstractReplyProducingMessageHandler#setAsync(boolean) */ public S async(boolean async) { assertHandler(); if (this.handler instanceof AbstractReplyProducingMessageHandler) { ((AbstractReplyProducingMessageHandler) this.handler).setAsync(async); } else { logger.warn("'async' can be applied only for AbstractReplyProducingMessageHandler"); } return _this(); }
/** * Allow async replies. If the handler reply is a {@code ListenableFuture} send * the output when it is satisfied rather than sending the future as the result. * Only subclasses that support this feature should set it. * @param async true to allow. * @return the endpoint spec. * @since 1.2 * @see AbstractReplyProducingMessageHandler#setAsync(boolean) */ public S async(boolean async) { assertHandler(); if (this.handler instanceof AbstractReplyProducingMessageHandler) { ((AbstractReplyProducingMessageHandler) this.handler).setAsync(async); } else { logger.warn("'async' can be applied only for AbstractReplyProducingMessageHandler"); } return _this(); }
serviceActivator.setAsync(Boolean.parseBoolean(this.beanFactory.resolveEmbeddedValue(isAsync)));