/** * @param order the order. * @return the endpoint spec. * @see AbstractMessageHandler#setOrder(int) */ public S order(int order) { assertHandler(); if (this.handler instanceof AbstractMessageHandler) { ((AbstractMessageHandler) this.handler).setOrder(order); } else { this.logger.warn("'order' can be applied only for AbstractMessageHandler"); } return _this(); }
/** * @param order the order. * @return the endpoint spec. * @see AbstractMessageHandler#setOrder(int) */ public S order(int order) { assertHandler(); if (this.handler instanceof AbstractMessageHandler) { ((AbstractMessageHandler) this.handler).setOrder(order); } else { this.logger.warn("'order' can be applied only for AbstractMessageHandler"); } return _this(); }
/** * @param order the order. * @return the endpoint spec. * @see AbstractMessageHandler#setOrder(int) */ public S order(int order) { assertHandler(); if (this.handler instanceof AbstractMessageHandler) { ((AbstractMessageHandler) this.handler).setOrder(order); } else { logger.warn("'order' can be applied only for AbstractMessageHandler"); } return _this(); }
/** * @param order the order. * @return the endpoint spec. * @see AbstractMessageHandler#setOrder(int) */ public S order(int order) { assertHandler(); if (this.handler instanceof AbstractMessageHandler) { ((AbstractMessageHandler) this.handler).setOrder(order); } else { logger.warn("'order' can be applied only for AbstractMessageHandler"); } return _this(); }
public Object getObject() throws Exception { if (this.handler == null) { this.initializeHandler(); Assert.notNull(this.handler, "failed to create MessageHandler"); if (this.handler instanceof AbstractReplyProducingMessageHandler && this.outputChannel != null) { ((AbstractReplyProducingMessageHandler) this.handler).setOutputChannel(this.outputChannel); } if (this.handler instanceof BeanFactoryAware) { ((BeanFactoryAware) this.handler).setBeanFactory(beanFactory); } if (this.handler instanceof AbstractMessageHandler && this.order != null) { ((AbstractMessageHandler) this.handler).setOrder(this.order.intValue()); } } return this.handler; }
public Object postProcess(Object bean, String beanName, Method method, T annotation) { MessageHandler handler = this.createHandler(bean, method, annotation); if (handler instanceof AbstractMessageHandler) { Order orderAnnotation = AnnotationUtils.findAnnotation(method, Order.class); if (orderAnnotation != null) { ((AbstractMessageHandler) handler).setOrder(orderAnnotation.value()); } } if (beanFactory instanceof ConfigurableListableBeanFactory) { handler = (MessageHandler) ((ConfigurableListableBeanFactory) beanFactory).initializeBean(handler, "_initHandlerFor_" + beanName); } AbstractEndpoint endpoint = this.createEndpoint(handler, annotation); if (endpoint != null) { return endpoint; } return handler; }