@Override public void init() { this.registerBeanDefinitionParser("channel", new AmqpChannelParser()); this.registerBeanDefinitionParser("publish-subscribe-channel", new AmqpChannelParser()); this.registerBeanDefinitionParser("inbound-channel-adapter", new AmqpInboundChannelAdapterParser()); this.registerBeanDefinitionParser("inbound-gateway", new AmqpInboundGatewayParser()); this.registerBeanDefinitionParser("outbound-channel-adapter", new AmqpOutboundChannelAdapterParser()); this.registerBeanDefinitionParser("outbound-gateway", new AmqpOutboundGatewayParser()); this.registerBeanDefinitionParser("outbound-async-gateway", new AmqpOutboundGatewayParser()); }
AmqpPublishSubscribeMessageChannelSpec(ConnectionFactory connectionFactory) { super(connectionFactory); this.amqpChannelFactoryBean.setPubSub(true); }
AmqpPollableMessageChannelSpec(ConnectionFactory connectionFactory) { this(new AmqpChannelFactoryBean(false), connectionFactory); }
AmqpPollableMessageChannelSpec(AmqpChannelFactoryBean amqpChannelFactoryBean, ConnectionFactory connectionFactory) { this.amqpChannelFactoryBean = amqpChannelFactoryBean; this.amqpChannelFactoryBean.setConnectionFactory(connectionFactory); this.amqpChannelFactoryBean.setSingleton(false); this.amqpChannelFactoryBean.setPubSub(false); /* We need this artificial BeanFactory to overcome AmqpChannelFactoryBean initialization. The real BeanFactory will be applied later for the target AbstractAmqpChannel instance. */ this.amqpChannelFactoryBean.setBeanFactory(new DefaultListableBeanFactory()); }
/** * @param acknowledgeMode the acknowledgeMode. * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setAcknowledgeMode(AcknowledgeMode) */ public S acknowledgeMode(AcknowledgeMode acknowledgeMode) { this.amqpChannelFactoryBean.setAcknowledgeMode(acknowledgeMode); return _this(); }
/** * @param messageConverter the messageConverter. * @return the spec. * @see org.springframework.amqp.rabbit.core.RabbitTemplate#setMessageConverter(MessageConverter) */ public S amqpMessageConverter(MessageConverter messageConverter) { this.amqpChannelFactoryBean.setMessageConverter(messageConverter); return _this(); }
/** * Configure the outbound header mapper to use when {@link #extractPayload(boolean)} * is true. Defaults to a {@code DefaultAmqpHeaderMapper}. * @param mapper the mapper. * @return the spec. * @see #extractPayload(boolean) */ public S outboundHeaderMapper(AmqpHeaderMapper mapper) { this.amqpChannelFactoryBean.setOutboundHeaderMapper(mapper); return _this(); }
/** * @param maxSubscribers the maxSubscribers. * @return the spec. * @see org.springframework.integration.amqp.channel.PointToPointSubscribableAmqpChannel#setMaxSubscribers(int) */ public S maxSubscribers(int maxSubscribers) { this.amqpChannelFactoryBean.setMaxSubscribers(maxSubscribers); return _this(); }
/** * @param autoStartup the autoStartup. * @return the spec. * @see org.springframework.context.SmartLifecycle */ public S autoStartup(boolean autoStartup) { this.amqpChannelFactoryBean.setAutoStartup(autoStartup); return _this(); }
/** * @param exposeListenerChannel the exposeListenerChannel. * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setExposeListenerChannel(boolean) */ public S exposeListenerChannel(boolean exposeListenerChannel) { this.amqpChannelFactoryBean.setExposeListenerChannel(exposeListenerChannel); return _this(); }
/** * @param shutdownTimeout the shutdownTimeout. * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setShutdownTimeout(long) */ public S shutdownTimeout(long shutdownTimeout) { this.amqpChannelFactoryBean.setShutdownTimeout(shutdownTimeout); return _this(); }
/** * Configure a {@link TransactionAttribute} to be used with the * {@link #transactionManager(PlatformTransactionManager)}. * @param transactionAttribute the transactionAttribute. * @return the spec. */ public S transactionAttribute(TransactionAttribute transactionAttribute) { this.amqpChannelFactoryBean.setTransactionAttribute(transactionAttribute); return _this(); }
/** * Configure the txSize. * @param txSize the txSize. * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setTxSize(int) */ public S txSize(int txSize) { this.amqpChannelFactoryBean.setTxSize(txSize); return _this(); }
/** * @param encoding the encoding. * @return the spec. * @see org.springframework.amqp.rabbit.core.RabbitTemplate#setEncoding(String) */ public S encoding(String encoding) { this.amqpChannelFactoryBean.setEncoding(encoding); return _this(); }
/** * @param exchange the exchange. * @return the spec. * @see org.springframework.integration.amqp.config.AmqpChannelFactoryBean#setExchange(FanoutExchange) */ public AmqpPublishSubscribeMessageChannelSpec exchange(FanoutExchange exchange) { this.amqpChannelFactoryBean.setExchange(exchange); return _this(); }
/** * @param receiveTimeout the receiveTimeout * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setReceiveTimeout(long) */ public S receiveTimeout(long receiveTimeout) { this.amqpChannelFactoryBean.setReceiveTimeout(receiveTimeout); return _this(); }
/** * Configure an {@link Executor} used to invoke the message listener. * @param taskExecutor the taskExecutor. * @return the spec. */ public S taskExecutor(Executor taskExecutor) { this.amqpChannelFactoryBean.setTaskExecutor(taskExecutor); return _this(); }
/** * Configure the delivery mode for messages that don't have an * {@link org.springframework.amqp.support.AmqpHeaders#DELIVERY_MODE} header. * Default is {@link MessageDeliveryMode#PERSISTENT}. * @param mode the mode. * @return the spec. */ public S defaultDeliveryMode(MessageDeliveryMode mode) { this.amqpChannelFactoryBean.setDefaultDeliveryMode(mode); return _this(); }
/** * @param errorHandler the errorHandler. * @return the spec. * @see org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer#setErrorHandler(ErrorHandler) */ public S errorHandler(ErrorHandler errorHandler) { this.amqpChannelFactoryBean.setErrorHandler(errorHandler); return _this(); }
AmqpMessageChannelSpec(ConnectionFactory connectionFactory) { super(new AmqpChannelFactoryBean(true), connectionFactory); }