Sonar Fixes - Javadoc-only imports
This commit is contained in:
committed by
Artem Bilan
parent
a39881fd0d
commit
e8df546b04
@@ -23,7 +23,6 @@ import org.springframework.amqp.rabbit.connection.Connection;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionListener;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.amqp.support.AmqpHeaders;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.integration.amqp.support.AmqpHeaderMapper;
|
||||
import org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper;
|
||||
@@ -109,7 +108,8 @@ public abstract class AbstractAmqpChannel extends AbstractMessageChannel
|
||||
/**
|
||||
* Set the delivery mode to use if the message has no
|
||||
* {@value org.springframework.amqp.support.AmqpHeaders#DELIVERY_MODE}
|
||||
* header and the message property was not set by the {@code MessagePropertiesConverter}.
|
||||
* header and the message property was not set by the
|
||||
* {@code MessagePropertiesConverter}.
|
||||
* @param defaultDeliveryMode the default delivery mode.
|
||||
* @since 4.3
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ public abstract class AbstractAmqpChannel extends AbstractMessageChannel
|
||||
* {@link org.springframework.amqp.support.converter.SimpleMessageConverter} with a
|
||||
* String payload that contains json; the converter will set the content type to
|
||||
* {@code text/plain} which can be overridden to {@code application/json} by setting
|
||||
* the {@link AmqpHeaders#CONTENT_TYPE} message header.
|
||||
* the {@link org.springframework.amqp.support.AmqpHeaders#CONTENT_TYPE} message header.
|
||||
* Only applies when {@link #setExtractPayload(boolean) extractPayload} is true.
|
||||
* Default: false.
|
||||
* @param headersMappedLast true if headers are mapped after conversion.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,11 +22,9 @@ import java.util.concurrent.Executor;
|
||||
import org.aopalliance.aop.Advice;
|
||||
|
||||
import org.springframework.amqp.core.AcknowledgeMode;
|
||||
import org.springframework.amqp.core.MessageListener;
|
||||
import org.springframework.amqp.core.MessagePostProcessor;
|
||||
import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer;
|
||||
import org.springframework.amqp.rabbit.listener.ListenerContainerIdleEvent;
|
||||
import org.springframework.amqp.rabbit.support.MessagePropertiesConverter;
|
||||
import org.springframework.amqp.support.ConditionalExceptionLogger;
|
||||
import org.springframework.amqp.support.ConsumerTagStrategy;
|
||||
@@ -203,7 +201,8 @@ public abstract class AbstractMessageListenerContainerSpec<S extends AbstractMes
|
||||
|
||||
/**
|
||||
* Set {@link MessagePostProcessor}s that will be applied after message reception, before
|
||||
* invoking the {@link MessageListener}. Often used to decompress data. Processors are invoked in order,
|
||||
* invoking the {@link org.springframework.amqp.core.MessageListener}.
|
||||
* Often used to decompress data. Processors are invoked in order,
|
||||
* depending on {@code PriorityOrder}, {@code Order} and finally unordered.
|
||||
* @param afterReceivePostProcessors the post processor.
|
||||
* @return the spec.
|
||||
@@ -249,7 +248,9 @@ public abstract class AbstractMessageListenerContainerSpec<S extends AbstractMes
|
||||
}
|
||||
|
||||
/**
|
||||
* How often to emit {@link ListenerContainerIdleEvent}s in milliseconds.
|
||||
* How often to emit
|
||||
* {@link org.springframework.amqp.rabbit.listener.ListenerContainerIdleEvent}s
|
||||
* in milliseconds.
|
||||
* @param idleEventInterval the interval.
|
||||
* @return the spec.
|
||||
* @see AbstractMessageListenerContainer#setIdleEventInterval(long)
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.support.ErrorMessageStrategy;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
|
||||
/**
|
||||
* The base {@link MessageHandlerSpec} for {@link AbstractAmqpOutboundEndpoint}s.
|
||||
@@ -37,6 +36,7 @@ import org.springframework.messaging.MessageHeaders;
|
||||
* @param <E> the target {@link AbstractAmqpOutboundEndpoint} implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -201,7 +201,8 @@ AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S, E>, E ext
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide the header names that should be mapped from a request to a {@link MessageHeaders}.
|
||||
* Provide the header names that should be mapped from a request to a
|
||||
* {@link org.springframework.messaging.MessageHeaders}.
|
||||
* @param headers The request header names.
|
||||
* @return the spec
|
||||
*/
|
||||
@@ -212,7 +213,7 @@ AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S, E>, E ext
|
||||
|
||||
/**
|
||||
* Provide the header names that should be mapped to a response
|
||||
* from a {@link MessageHeaders}.
|
||||
* from a {@link org.springframework.messaging.MessageHeaders}.
|
||||
* @param headers The reply header names.
|
||||
* @return the spec
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,15 +22,16 @@ import java.util.Map;
|
||||
import org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer;
|
||||
import org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter;
|
||||
import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessageProducerSpec;
|
||||
|
||||
/**
|
||||
* A {@link MessageProducerSpec} for {@link AmqpInboundChannelAdapter}s.
|
||||
* A {@link org.springframework.integration.dsl.MessageProducerSpec} for
|
||||
* {@link AmqpInboundChannelAdapter}s.
|
||||
*
|
||||
* @param <S> the spec type.
|
||||
* @param <C> the container type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.amqp.dsl;
|
||||
import org.springframework.amqp.core.MessageDeliveryMode;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.support.MessagePropertiesConverter;
|
||||
import org.springframework.amqp.support.AmqpHeaders;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
@@ -149,7 +148,8 @@ public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannel
|
||||
|
||||
/**
|
||||
* Configure the delivery mode for messages that don't have an
|
||||
* {@link AmqpHeaders#DELIVERY_MODE} header. Default is {@link MessageDeliveryMode#PERSISTENT}.
|
||||
* {@link org.springframework.amqp.support.AmqpHeaders#DELIVERY_MODE} header.
|
||||
* Default is {@link MessageDeliveryMode#PERSISTENT}.
|
||||
* @param mode the mode.
|
||||
* @return the spec.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,11 +18,10 @@ package org.springframework.integration.amqp.dsl;
|
||||
|
||||
import org.springframework.amqp.core.FanoutExchange;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.integration.amqp.channel.PublishSubscribeAmqpChannel;
|
||||
import org.springframework.integration.amqp.config.AmqpChannelFactoryBean;
|
||||
|
||||
/**
|
||||
* A {@link AmqpMessageChannelSpec} for {@link PublishSubscribeAmqpChannel}s.
|
||||
* A {@link AmqpMessageChannelSpec} for
|
||||
* {@link org.springframework.integration.amqp.channel.PublishSubscribeAmqpChannel}s.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @since 5.0
|
||||
@@ -38,7 +37,7 @@ public class AmqpPublishSubscribeMessageChannelSpec
|
||||
/**
|
||||
* @param exchange the exchange.
|
||||
* @return the spec.
|
||||
* @see AmqpChannelFactoryBean#setExchange(FanoutExchange)
|
||||
* @see org.springframework.integration.amqp.config.AmqpChannelFactoryBean#setExchange(FanoutExchange)
|
||||
*/
|
||||
public AmqpPublishSubscribeMessageChannelSpec exchange(FanoutExchange exchange) {
|
||||
this.amqpChannelFactoryBean.setExchange(exchange);
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.springframework.integration.amqp.support.AmqpMessageHeaderErrorMessag
|
||||
import org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper;
|
||||
import org.springframework.integration.context.OrderlyShutdownCapable;
|
||||
import org.springframework.integration.endpoint.MessageProducerSupport;
|
||||
import org.springframework.integration.support.ErrorMessageStrategy;
|
||||
import org.springframework.integration.support.ErrorMessageUtils;
|
||||
import org.springframework.retry.RecoveryCallback;
|
||||
import org.springframework.retry.support.RetrySynchronizationManager;
|
||||
@@ -160,7 +159,8 @@ public class AmqpInboundChannelAdapter extends MessageProducerSupport implements
|
||||
* If there's a retry template, it will set the attributes holder via the listener. If
|
||||
* there's no retry template, but there's an error channel, we create a new attributes
|
||||
* holder here. If an attributes holder exists (by either method), we set the
|
||||
* attributes for use by the {@link ErrorMessageStrategy}.
|
||||
* attributes for use by the
|
||||
* {@link org.springframework.integration.support.ErrorMessageStrategy}.
|
||||
* @param amqpMessage the AMQP message to use.
|
||||
* @param message the Spring Messaging message to use.
|
||||
* @since 4.3.10
|
||||
|
||||
@@ -39,7 +39,6 @@ import org.springframework.integration.amqp.support.AmqpHeaderMapper;
|
||||
import org.springframework.integration.amqp.support.AmqpMessageHeaderErrorMessageStrategy;
|
||||
import org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper;
|
||||
import org.springframework.integration.gateway.MessagingGatewaySupport;
|
||||
import org.springframework.integration.support.ErrorMessageStrategy;
|
||||
import org.springframework.integration.support.ErrorMessageUtils;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.retry.RecoveryCallback;
|
||||
@@ -216,7 +215,8 @@ public class AmqpInboundGateway extends MessagingGatewaySupport {
|
||||
* If there's a retry template, it will set the attributes holder via the listener. If
|
||||
* there's no retry template, but there's an error channel, we create a new attributes
|
||||
* holder here. If an attributes holder exists (by either method), we set the
|
||||
* attributes for use by the {@link ErrorMessageStrategy}.
|
||||
* attributes for use by the
|
||||
* {@link org.springframework.integration.support.ErrorMessageStrategy}.
|
||||
* @param amqpMessage the AMQP message to use.
|
||||
* @param message the Spring Messaging message to use.
|
||||
* @since 4.3.10
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.springframework.amqp.rabbit.support.MessagePropertiesConverter;
|
||||
import org.springframework.amqp.rabbit.support.RabbitExceptionTranslator;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.amqp.support.converter.SimpleMessageConverter;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.integration.IntegrationMessageHeaderAccessor;
|
||||
import org.springframework.integration.acks.AcknowledgmentCallback;
|
||||
import org.springframework.integration.acks.AcknowledgmentCallbackFactory;
|
||||
@@ -47,7 +46,7 @@ import com.rabbitmq.client.Channel;
|
||||
import com.rabbitmq.client.GetResponse;
|
||||
|
||||
/**
|
||||
* A pollable {@link MessageSource} for RabbitMQ.
|
||||
* A pollable {@link org.springframework.integration.core.MessageSource} for RabbitMQ.
|
||||
*
|
||||
* @author Gary Russell
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,12 +17,11 @@
|
||||
package org.springframework.integration.amqp.support;
|
||||
|
||||
import org.springframework.amqp.core.MessageProperties;
|
||||
import org.springframework.integration.mapping.HeaderMapper;
|
||||
import org.springframework.integration.mapping.RequestReplyHeaderMapper;
|
||||
|
||||
/**
|
||||
* A convenience interface that extends {@link HeaderMapper}
|
||||
* but parameterized with {@link MessageProperties}.
|
||||
* A convenience interface that extends {@link RequestReplyHeaderMapper},
|
||||
* parameterized with {@link MessageProperties}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package org.springframework.integration;
|
||||
|
||||
import org.springframework.integration.dispatcher.MessageDispatcher;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageDeliveryException;
|
||||
|
||||
/**
|
||||
* Exception that indicates an internal error occurred within
|
||||
* a {@link MessageDispatcher} preventing message delivery.
|
||||
* Exception that indicates an internal error occurred within a
|
||||
* {@link org.springframework.integration.dispatcher.MessageDispatcher}
|
||||
* preventing message delivery.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 2.1
|
||||
|
||||
@@ -47,12 +47,10 @@ import org.springframework.integration.handler.AbstractMessageProducingHandler;
|
||||
import org.springframework.integration.handler.DiscardingMessageHandler;
|
||||
import org.springframework.integration.store.MessageGroup;
|
||||
import org.springframework.integration.store.MessageGroupStore;
|
||||
import org.springframework.integration.store.MessageStore;
|
||||
import org.springframework.integration.store.SimpleMessageGroup;
|
||||
import org.springframework.integration.store.SimpleMessageStore;
|
||||
import org.springframework.integration.store.UniqueExpiryCallback;
|
||||
import org.springframework.integration.support.AbstractIntegrationMessageBuilder;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.integration.support.locks.DefaultLockRegistry;
|
||||
import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.integration.util.UUIDConverter;
|
||||
@@ -65,7 +63,8 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
* Abstract Message handler that holds a buffer of correlated messages in a
|
||||
* {@link MessageStore}. This class takes care of correlated groups of messages
|
||||
* {@link org.springframework.integration.store.MessageStore}.
|
||||
* This class takes care of correlated groups of messages
|
||||
* that can be completed in batches. It is useful for custom implementation of
|
||||
* MessageHandlers that require correlation and is used as a base class for Aggregator -
|
||||
* {@link AggregatingMessageHandler} and Resequencer - {@link ResequencingMessageHandler},
|
||||
@@ -79,7 +78,8 @@ import org.springframework.util.CollectionUtils;
|
||||
* {@link HeaderAttributeCorrelationStrategy} and the {@link ReleaseStrategy} will be a
|
||||
* {@link SequenceSizeReleaseStrategy}.
|
||||
* <p>
|
||||
* Use proper {@link CorrelationStrategy} for cases when same {@link MessageStore} is used
|
||||
* Use proper {@link CorrelationStrategy} for cases when same
|
||||
* {@link org.springframework.integration.store.MessageStore} is used
|
||||
* for multiple handlers to ensure uniqueness of message groups across handlers.
|
||||
*
|
||||
* @author Iwein Fuld
|
||||
@@ -274,10 +274,11 @@ public abstract class AbstractCorrelatingMessageHandler extends AbstractMessageP
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a {@link MessageBuilder#popSequenceDetails()} for output message or not.
|
||||
* Default to true.
|
||||
* This option removes the sequence information added by the nearest upstream component with
|
||||
* {@code applySequence=true} (for example splitter).
|
||||
* Perform a
|
||||
* {@link org.springframework.integration.support.MessageBuilder#popSequenceDetails()}
|
||||
* for output message or not. Default to true. This option removes the sequence
|
||||
* information added by the nearest upstream component with {@code applySequence=true}
|
||||
* (for example splitter).
|
||||
* @param popSequence the boolean flag to use.
|
||||
* @since 5.1
|
||||
*/
|
||||
|
||||
@@ -20,20 +20,15 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.integration.scheduling.PollerMetadata;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.scheduling.support.CronTrigger;
|
||||
import org.springframework.scheduling.support.PeriodicTrigger;
|
||||
|
||||
/**
|
||||
* Provides the {@link PollerMetadata} options for the Messaging annotations for
|
||||
* polled endpoints.
|
||||
* It is an analogue of the XML {@code <poller/>} element, but provides only simple attributes.
|
||||
* If the {@link org.springframework.integration.scheduling.PollerMetadata} requires more options
|
||||
* (e.g. Transactional and other Advices) or {@code initialDelay, receiveTimeout} etc,
|
||||
* the {@link org.springframework.integration.scheduling.PollerMetadata} should be configured as
|
||||
* a generic bean and its bean name can be specified as the {@code value} attribute of this annotation.
|
||||
* In that case, the other attributes are not allowed.
|
||||
* Provides the {@link org.springframework.integration.scheduling.PollerMetadata} options
|
||||
* for the Messaging annotations for polled endpoints. It is an analogue of the XML
|
||||
* {@code <poller/>} element, but provides only simple attributes. If the
|
||||
* {@link org.springframework.integration.scheduling.PollerMetadata} requires more options
|
||||
* (e.g. Transactional and other Advices) or {@code initialDelay, receiveTimeout} etc, the
|
||||
* {@link org.springframework.integration.scheduling.PollerMetadata} should be configured
|
||||
* as a generic bean and its bean name can be specified as the {@code value} attribute of
|
||||
* this annotation. In that case, the other attributes are not allowed.
|
||||
* <p>
|
||||
* Non-reference attributes support Property Placeholder resolutions.
|
||||
*
|
||||
@@ -47,12 +42,13 @@ import org.springframework.scheduling.support.PeriodicTrigger;
|
||||
public @interface Poller {
|
||||
|
||||
/**
|
||||
* @return The {@link PollerMetadata} bean name.
|
||||
* @return The {@link org.springframework.integration.scheduling.PollerMetadata} bean
|
||||
* name.
|
||||
*/
|
||||
String value() default "";
|
||||
|
||||
/**
|
||||
* @return The {@link Trigger} bean name.
|
||||
* @return The {@link org.springframework.scheduling.Trigger} bean name.
|
||||
*/
|
||||
String trigger() default "";
|
||||
|
||||
@@ -69,20 +65,24 @@ public @interface Poller {
|
||||
String maxMessagesPerPoll() default "";
|
||||
|
||||
/**
|
||||
* @return The fixed delay in milliseconds to create the {@link PeriodicTrigger}.
|
||||
* Can be specified as 'property placeholder', e.g. {@code ${poller.fixedDelay}}.
|
||||
* @return The fixed delay in milliseconds to create the
|
||||
* {@link org.springframework.scheduling.support.PeriodicTrigger}. Can be specified as
|
||||
* 'property placeholder', e.g. {@code ${poller.fixedDelay}}.
|
||||
*/
|
||||
String fixedDelay() default "";
|
||||
|
||||
/**
|
||||
* @return The fixed rate in milliseconds to create the {@link PeriodicTrigger} with {@code fixedRate}.
|
||||
* Can be specified as 'property placeholder', e.g. {@code ${poller.fixedRate}}.
|
||||
* @return The fixed rate in milliseconds to create the
|
||||
* {@link org.springframework.scheduling.support.PeriodicTrigger} with
|
||||
* {@code fixedRate}. Can be specified as 'property placeholder', e.g.
|
||||
* {@code ${poller.fixedRate}}.
|
||||
*/
|
||||
String fixedRate() default "";
|
||||
|
||||
/**
|
||||
* @return The cron expression to create the {@link CronTrigger}.
|
||||
* Can be specified as 'property placeholder', e.g. {@code ${poller.cron}}.
|
||||
* @return The cron expression to create the
|
||||
* {@link org.springframework.scheduling.support.CronTrigger}. Can be specified as
|
||||
* 'property placeholder', e.g. {@code ${poller.cron}}.
|
||||
*/
|
||||
String cron() default "";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,11 +31,11 @@ import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.integration.annotation.Publisher;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* Post-processes beans that contain the method-level @{@link Publisher} annotation.
|
||||
* Post-processes beans that contain the
|
||||
* method-level @{@link org.springframework.integration.annotation.Publisher} annotation.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.springframework.core.OrderComparator;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.context.IntegrationObjectSupport;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.support.converter.DefaultDatatypeChannelMessageConverter;
|
||||
import org.springframework.integration.support.management.AbstractMessageChannelMetrics;
|
||||
import org.springframework.integration.support.management.ConfigurableMetricsAware;
|
||||
import org.springframework.integration.support.management.DefaultMessageChannelMetrics;
|
||||
@@ -232,7 +231,8 @@ public abstract class AbstractMessageChannel extends IntegrationObjectSupport
|
||||
* expected that the converter will have fully populated the headers; no
|
||||
* further action is performed by the channel. If {@code null} is returned,
|
||||
* conversion to the next datatype (if any) will be attempted.
|
||||
* Defaults to a {@link DefaultDatatypeChannelMessageConverter}.
|
||||
* Defaults to a
|
||||
* {@link org.springframework.integration.support.converter.DefaultDatatypeChannelMessageConverter}.
|
||||
* @param messageConverter The message converter.
|
||||
*/
|
||||
public void setMessageConverter(MessageConverter messageConverter) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,15 +20,15 @@ import org.springframework.integration.MessageDispatchingException;
|
||||
import org.springframework.integration.dispatcher.MessageDispatcher;
|
||||
import org.springframework.integration.support.management.SubscribableChannelManagement;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageDeliveryException;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Base implementation of {@link MessageChannel} that invokes the subscribed
|
||||
* {@link MessageHandler handler(s)} by delegating to a {@link MessageDispatcher}.
|
||||
* Base implementation of {@link org.springframework.messaging.MessageChannel} that
|
||||
* invokes the subscribed {@link MessageHandler handler(s)} by delegating to a
|
||||
* {@link MessageDispatcher}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.context.IntegrationObjectSupport;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.support.channel.HeaderChannelRegistry;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
@@ -36,7 +35,9 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Converts a channel to a name, retaining a reference to the channel keyed by the name.
|
||||
* Allows a downstream {@link BeanFactoryChannelResolver} to find the channel by name
|
||||
* Allows a downstream
|
||||
* {@link org.springframework.integration.support.channel.BeanFactoryChannelResolver}
|
||||
* to find the channel by name
|
||||
* in the event that the flow serialized the message at some point.
|
||||
* Channels are expired after a configurable delay (60 seconds by default).
|
||||
* The actual average expiry time will be 1.5x the delay.
|
||||
|
||||
@@ -24,12 +24,12 @@ import org.springframework.integration.dispatcher.RoundRobinLoadBalancingStrateg
|
||||
import org.springframework.integration.dispatcher.UnicastingDispatcher;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.util.ErrorHandlingTaskExecutor;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ErrorHandler;
|
||||
|
||||
/**
|
||||
* An implementation of {@link MessageChannel} that delegates to an instance of
|
||||
* An implementation of {@link org.springframework.messaging.MessageChannel}
|
||||
* that delegates to an instance of
|
||||
* {@link UnicastingDispatcher} which in turn delegates all dispatching
|
||||
* invocations to an {@link Executor}.
|
||||
* <p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,10 +17,10 @@
|
||||
package org.springframework.integration.channel.interceptor;
|
||||
|
||||
import org.springframework.integration.channel.ChannelInterceptorAware;
|
||||
import org.springframework.messaging.support.ChannelInterceptor;
|
||||
|
||||
/**
|
||||
* {@link ChannelInterceptor}s implementing this interface can veto
|
||||
* {@link org.springframework.messaging.support.ChannelInterceptor}s implementing this
|
||||
* interface can veto
|
||||
* global interception of a particular channel. Could be used, for example,
|
||||
* when an interceptor itself writes to an output channel (which should
|
||||
* not be intercepted with this interceptor).
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.List;
|
||||
|
||||
import org.aopalliance.aop.Advice;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.aggregator.AggregatingMessageHandler;
|
||||
import org.springframework.integration.aggregator.CorrelationStrategy;
|
||||
@@ -37,7 +36,8 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
/**
|
||||
* {@link FactoryBean} to create an {@link AggregatingMessageHandler}.
|
||||
* {@link org.springframework.beans.factory.FactoryBean} to create an
|
||||
* {@link AggregatingMessageHandler}.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -68,7 +68,6 @@ import org.springframework.integration.support.converter.ConfigurableCompositeMe
|
||||
import org.springframework.integration.support.converter.DefaultDatatypeChannelMessageConverter;
|
||||
import org.springframework.integration.support.json.JacksonPresent;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.messaging.converter.CompositeMessageConverter;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -467,8 +466,8 @@ class DefaultConfiguringBeanFactoryPostProcessor
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the default {@link CompositeMessageConverter} for argument resolvers
|
||||
* during handler method invocation.
|
||||
* Register the default {@link ConfigurableCompositeMessageConverter} for argument
|
||||
* resolvers during handler method invocation.
|
||||
*/
|
||||
private void registerArgumentResolverMessageConverter() {
|
||||
if (!this.beanFactory.containsBean(IntegrationContextUtils.ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME)) {
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.integration.support.management.IntegrationManagement;
|
||||
|
||||
/**
|
||||
* Enables default configuring of management in Spring Integration components in an existing application.
|
||||
@@ -100,11 +99,12 @@ public @interface EnableIntegrationManagement {
|
||||
* time.
|
||||
* <p>
|
||||
* Set this to false to disable logging by default in all framework components that implement
|
||||
* {@link IntegrationManagement} (channels, message handlers etc). This turns off logging such as
|
||||
* {@link org.springframework.integration.support.management.IntegrationManagement}
|
||||
* (channels, message handlers etc). This turns off logging such as
|
||||
* "PreSend on channel", "Received message" etc.
|
||||
* <p>
|
||||
* After the context is initialized, individual components can have their setting changed by invoking
|
||||
* {@link IntegrationManagement#setLoggingEnabled(boolean)}.
|
||||
* {@link org.springframework.integration.support.management.IntegrationManagement#setLoggingEnabled(boolean)}.
|
||||
* @return the value; true by default.
|
||||
*/
|
||||
String defaultLoggingEnabled() default "true";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,11 +26,11 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.config.ConstructorArgumentValues;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.integration.channel.FixedSubscriberChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Used to post process candidates for {@link FixedSubscriberChannel} {@link MessageHandler}s.
|
||||
* Used to post process candidates for {@link FixedSubscriberChannel}
|
||||
* {@link org.springframework.messaging.MessageHandler}s.
|
||||
* @author Gary Russell
|
||||
* @since 4.0
|
||||
*
|
||||
|
||||
@@ -28,12 +28,12 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.core.type.MethodMetadata;
|
||||
import org.springframework.integration.channel.interceptor.GlobalChannelInterceptorWrapper;
|
||||
import org.springframework.messaging.support.ChannelInterceptor;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
* The {@link IntegrationConfigurationInitializer} to populate {@link GlobalChannelInterceptorWrapper}
|
||||
* for {@link ChannelInterceptor}s marked with {@link GlobalChannelInterceptor} annotation.
|
||||
* for {@link org.springframework.messaging.support.ChannelInterceptor}s marked with
|
||||
* {@link GlobalChannelInterceptor} annotation.
|
||||
* <p>
|
||||
* {@link org.springframework.context.annotation.Bean} methods are also processed.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,17 +19,18 @@ package org.springframework.integration.config;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
|
||||
import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
|
||||
/**
|
||||
* {@link BeanFactoryPostProcessor} to apply external Integration infrastructure configurations
|
||||
* via loading {@link IntegrationConfigurationInitializer} implementations using {@link SpringFactoriesLoader}.
|
||||
* {@link BeanDefinitionRegistryPostProcessor} to apply external Integration
|
||||
* infrastructure configurations via loading {@link IntegrationConfigurationInitializer}
|
||||
* implementations using {@link SpringFactoriesLoader}.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @since 4.0
|
||||
*/
|
||||
public class IntegrationConfigurationBeanFactoryPostProcessor implements BeanDefinitionRegistryPostProcessor {
|
||||
|
||||
@@ -22,14 +22,11 @@ import java.util.Map.Entry;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.context.expression.BeanFactoryResolver;
|
||||
import org.springframework.context.expression.MapAccessor;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.expression.BeanResolver;
|
||||
import org.springframework.expression.PropertyAccessor;
|
||||
import org.springframework.expression.TypeConverter;
|
||||
import org.springframework.expression.TypeLocator;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -39,7 +36,8 @@ import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
|
||||
* a {@link BeanFactoryResolver}.
|
||||
* </li>
|
||||
* <li>
|
||||
* a {@link TypeConverter} based on the {@link ConversionService} from the application context.
|
||||
* a {@link org.springframework.expression.TypeConverter} based on the
|
||||
* {@link org.springframework.core.convert.ConversionService} from the application context.
|
||||
* </li>
|
||||
* <li>
|
||||
* a set of provided {@link PropertyAccessor}s including a default {@link MapAccessor}.
|
||||
@@ -50,7 +48,9 @@ import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
|
||||
* </ul>
|
||||
* <p>
|
||||
* After initialization this factory populates functions and property accessors from
|
||||
* {@link SpelFunctionFactoryBean}s and {@link SpelPropertyAccessorRegistrar}, respectively.
|
||||
* {@link SpelFunctionFactoryBean}s and
|
||||
* {@link org.springframework.integration.expression.SpelPropertyAccessorRegistrar},
|
||||
* respectively.
|
||||
* Functions and property accessors are also inherited from any parent context.
|
||||
* </p>
|
||||
* <p>
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.beans.factory.support.ManagedSet;
|
||||
import org.springframework.context.ApplicationContextException;
|
||||
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.integration.aop.PublisherAnnotationBeanPostProcessor;
|
||||
import org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.context.IntegrationProperties;
|
||||
@@ -134,7 +133,9 @@ public class IntegrationRegistrar implements ImportBeanDefinitionRegistrar {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register {@link MessagingAnnotationPostProcessor} and {@link PublisherAnnotationBeanPostProcessor}, if necessary.
|
||||
* Register {@link MessagingAnnotationPostProcessor} and
|
||||
* {@link org.springframework.integration.aop.PublisherAnnotationBeanPostProcessor},
|
||||
* if necessary.
|
||||
* Inject {@code defaultPublishedChannel} from provided {@link AnnotationMetadata}, if any.
|
||||
* @param meta The {@link AnnotationMetadata} to get additional properties for {@link BeanDefinition}s.
|
||||
* @param registry The {@link BeanDefinitionRegistry} to register additional {@link BeanDefinition}s.
|
||||
|
||||
@@ -22,20 +22,19 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.context.expression.MapAccessor;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.expression.PropertyAccessor;
|
||||
import org.springframework.expression.TypeConverter;
|
||||
import org.springframework.expression.spel.support.DataBindingPropertyAccessor;
|
||||
import org.springframework.expression.spel.support.SimpleEvaluationContext;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* {@link FactoryBean} to populate {@link SimpleEvaluationContext} instances enhanced with:
|
||||
* <ul>
|
||||
* <li>
|
||||
* a {@link TypeConverter} based on the {@link ConversionService} from the application context.
|
||||
* a {@link org.springframework.expression.TypeConverter} based on the
|
||||
* {@link org.springframework.core.convert.ConversionService}
|
||||
* from the application context.
|
||||
* </li>
|
||||
* <li>
|
||||
* a set of provided {@link PropertyAccessor}s including a default {@link MapAccessor}.
|
||||
@@ -46,7 +45,9 @@ import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
|
||||
* </ul>
|
||||
* <p>
|
||||
* After initialization this factory populates functions and property accessors from
|
||||
* {@link SpelFunctionFactoryBean}s and {@link SpelPropertyAccessorRegistrar}, respectively.
|
||||
* {@link SpelFunctionFactoryBean}s and
|
||||
* {@link org.springframework.integration.expression.SpelPropertyAccessorRegistrar},
|
||||
* respectively.
|
||||
* Functions and property accessors are also inherited from any parent context.
|
||||
* </p>
|
||||
* <p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,6 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
|
||||
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -33,13 +32,16 @@ import org.springframework.util.StringUtils;
|
||||
* <p>
|
||||
* Includes logic to determine {@link org.springframework.messaging.MessageChannel}:
|
||||
* if 'channel' attribute is defined - uses its value as 'channelName';
|
||||
* if 'id' attribute is defined - creates {@link DirectChannel} at runtime and uses id's value as 'channelName';
|
||||
* if 'id' attribute is defined - creates
|
||||
* {@link org.springframework.integration.channel.DirectChannel}
|
||||
* at runtime and uses id's value as 'channelName';
|
||||
* if current component is defined as nested element inside any other components e.g. <chain>
|
||||
* 'id' and 'channel' attributes will be ignored and this component will not be parsed as
|
||||
* {@link org.springframework.integration.endpoint.AbstractEndpoint}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public abstract class AbstractChannelAdapterParser extends AbstractBeanDefinitionParser {
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ import org.springframework.beans.BeanMetadataElement;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
/**
|
||||
* Base class for parsers that create an instance of {@link AbstractCorrelatingMessageHandler}
|
||||
* Base class for parsers that create an instance of
|
||||
* {@link org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler}.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Stefan Ferstl
|
||||
|
||||
@@ -46,7 +46,6 @@ import org.springframework.integration.config.ExpressionFactoryBean;
|
||||
import org.springframework.integration.config.FixedSubscriberChannelBeanFactoryPostProcessor;
|
||||
import org.springframework.integration.config.IntegrationConfigUtils;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.endpoint.AbstractPollingEndpoint;
|
||||
import org.springframework.integration.transaction.TransactionHandleMessageAdvice;
|
||||
import org.springframework.transaction.interceptor.DefaultTransactionAttribute;
|
||||
import org.springframework.transaction.interceptor.MatchAlwaysTransactionAttributeSource;
|
||||
@@ -398,7 +397,7 @@ public abstract class IntegrationNamespaceUtils {
|
||||
* For example, this advisor will be applied on the Polling Task proxy.
|
||||
* @param txElement The transactional element.
|
||||
* @return The bean definition.
|
||||
* @see AbstractPollingEndpoint
|
||||
* @see org.springframework.integration.endpoint.AbstractPollingEndpoint
|
||||
*/
|
||||
public static BeanDefinition configureTransactionAttributes(Element txElement) {
|
||||
return configureTransactionAttributes(txElement, false);
|
||||
@@ -413,7 +412,7 @@ public abstract class IntegrationNamespaceUtils {
|
||||
* @param handleMessageAdvice flag if to use {@link TransactionHandleMessageAdvice}
|
||||
* or regular {@link TransactionInterceptor}
|
||||
* @return The bean definition.
|
||||
* @see AbstractPollingEndpoint
|
||||
* @see org.springframework.integration.endpoint.AbstractPollingEndpoint
|
||||
*/
|
||||
public static BeanDefinition configureTransactionAttributes(Element txElement, boolean handleMessageAdvice) {
|
||||
BeanDefinition txDefinition = configureTransactionDefinition(txElement);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,6 @@ package org.springframework.integration.dispatcher;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
@@ -29,7 +28,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
|
||||
|
||||
import org.springframework.core.OrderComparator;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -37,9 +35,10 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* Special Set that maintains the following semantics:
|
||||
* All elements that are un-ordered (do not implement {@link Ordered} interface or annotated
|
||||
* {@link Order} annotation) will be stored in the order in which they were added.
|
||||
* However, for all {@link Ordered} elements a
|
||||
* {@link Comparator} (instantiated by default) for this implementation of {@link Set}, will be
|
||||
* {@link org.springframework.core.annotation.Order} annotation) will be stored in the order
|
||||
* in which they were added. However, for all {@link Ordered} elements a
|
||||
* {@link java.util.Comparator} (instantiated by default) for this implementation of
|
||||
* {@link Set}, will be
|
||||
* used. Those elements will have precedence over un-ordered elements. If elements have the same
|
||||
* order but themselves do not equal to one another the more recent addition will be placed to the
|
||||
* right of (appended next to) the existing element with the same order, thus preserving the order
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.concurrent.Executor;
|
||||
import org.springframework.integration.MessageDispatchingException;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageDeliveryException;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.support.MessageHandlingRunnable;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -36,7 +35,7 @@ import org.springframework.util.Assert;
|
||||
* soon as <em>one</em> of the handlers accepts the Message, the dispatcher will
|
||||
* return <code>true</code> and ignore the rest of its handlers.
|
||||
* <p>
|
||||
* If the dispatcher has no handlers, a {@link MessageDeliveryException} will be
|
||||
* If the dispatcher has no handlers, a {@link MessageDispatchingException} will be
|
||||
* thrown. If all handlers throw Exceptions, the dispatcher will throw an
|
||||
* {@link AggregateMessageDeliveryException}.
|
||||
* <p>
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.springframework.integration.transaction.TransactionInterceptorBuilder
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.interceptor.DefaultTransactionAttribute;
|
||||
import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -110,7 +109,8 @@ public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S, H>,
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with the provided
|
||||
* {@code PlatformTransactionManager} and default {@link DefaultTransactionAttribute}
|
||||
* {@code PlatformTransactionManager} and default
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the {@link MessageHandler}.
|
||||
* @param transactionManager the {@link PlatformTransactionManager} to use.
|
||||
* @return the spec.
|
||||
@@ -121,7 +121,8 @@ public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S, H>,
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with the provided
|
||||
* {@code PlatformTransactionManager} and default {@link DefaultTransactionAttribute}
|
||||
* {@code PlatformTransactionManager} and default
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the {@link MessageHandler}.
|
||||
* @param transactionManager the {@link PlatformTransactionManager} to use.
|
||||
* @param handleMessageAdvice the flag to indicate the target {@link Advice} type:
|
||||
@@ -148,7 +149,9 @@ public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S, H>,
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with default
|
||||
* {@code PlatformTransactionManager} and {@link DefaultTransactionAttribute} for the
|
||||
* {@code PlatformTransactionManager} and
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the
|
||||
* {@link MessageHandler}.
|
||||
* @return the spec.
|
||||
*/
|
||||
@@ -158,8 +161,9 @@ public abstract class ConsumerEndpointSpec<S extends ConsumerEndpointSpec<S, H>,
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with default
|
||||
* {@code PlatformTransactionManager} and {@link DefaultTransactionAttribute} for the
|
||||
* {@link MessageHandler}.
|
||||
* {@code PlatformTransactionManager} and
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the {@link MessageHandler}.
|
||||
* @param handleMessageAdvice the flag to indicate the target {@link Advice} type:
|
||||
* {@code false} - regular {@link TransactionInterceptor}; {@code true} -
|
||||
* {@link org.springframework.integration.transaction.TransactionHandleMessageAdvice}
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.expression.ValueExpression;
|
||||
import org.springframework.integration.store.MessageGroup;
|
||||
import org.springframework.integration.store.MessageGroupStore;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
@@ -47,6 +46,7 @@ import org.springframework.util.Assert;
|
||||
* @param <H> the {@link AbstractCorrelatingMessageHandler} implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -316,7 +316,9 @@ public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a {@link MessageBuilder#popSequenceDetails()} for output message or not.
|
||||
* Perform a
|
||||
* {@link org.springframework.integration.support.MessageBuilder#popSequenceDetails()}
|
||||
* for output message or not.
|
||||
* @param popSequence the boolean flag to use.
|
||||
* @return the endpoint spec.
|
||||
* @since 5.1
|
||||
|
||||
@@ -30,10 +30,7 @@ import org.springframework.integration.store.MessageGroupStore;
|
||||
import org.springframework.integration.transaction.TransactionInterceptorBuilder;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.interceptor.DefaultTransactionAttribute;
|
||||
import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -106,7 +103,8 @@ public final class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpo
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a message channel to which an {@link ErrorMessage} will be sent if sending the
|
||||
* Set a message channel to which an
|
||||
* {@link org.springframework.messaging.support.ErrorMessage} will be sent if sending the
|
||||
* released message fails. If the error flow returns normally, the release is complete.
|
||||
* If the error flow throws an exception, the release will be re-attempted.
|
||||
* If there is a transaction advice on the release task, the error flow is called
|
||||
@@ -123,7 +121,8 @@ public final class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpo
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a message channel name to which an {@link ErrorMessage} will be sent if sending
|
||||
* Set a message channel name to which an
|
||||
* {@link org.springframework.messaging.support.ErrorMessage} will be sent if sending
|
||||
* the released message fails. If the error flow returns normally, the release is
|
||||
* complete. If the error flow throws an exception, the release will be re-attempted.
|
||||
* If there is a transaction advice on the release task, the error flow is called
|
||||
@@ -167,8 +166,10 @@ public final class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpo
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with default
|
||||
* {@link PlatformTransactionManager} and {@link DefaultTransactionAttribute} for the
|
||||
* {@link MessageHandler}.
|
||||
* {@link PlatformTransactionManager} and
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for
|
||||
* the
|
||||
* {@link org.springframework.messaging.MessageHandler}.
|
||||
* @return the spec.
|
||||
* @since 5.0.8
|
||||
*/
|
||||
@@ -179,7 +180,8 @@ public final class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpo
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} for the {@link MessageHandler}.
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} for the
|
||||
* {@link org.springframework.messaging.MessageHandler}.
|
||||
* @param transactionInterceptor the {@link TransactionInterceptor} to use.
|
||||
* @return the spec.
|
||||
* @see TransactionInterceptorBuilder
|
||||
@@ -191,8 +193,9 @@ public final class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpo
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with the provided
|
||||
* {@code PlatformTransactionManager} and default {@link DefaultTransactionAttribute}
|
||||
* for the {@link MessageHandler}.
|
||||
* {@code PlatformTransactionManager} and default
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the {@link org.springframework.messaging.MessageHandler}.
|
||||
* @param transactionManager the {@link PlatformTransactionManager} to use.
|
||||
* @return the spec.
|
||||
* @since 5.0.8
|
||||
|
||||
@@ -21,13 +21,10 @@ import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.endpoint.AbstractPollingEndpoint;
|
||||
import org.springframework.integration.scheduling.PollerMetadata;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import reactor.util.function.Tuple2;
|
||||
@@ -38,9 +35,11 @@ import reactor.util.function.Tuples;
|
||||
*
|
||||
* @param <S> the target {@link ConsumerEndpointSpec} implementation type.
|
||||
* @param <F> the target {@link BeanNameAware} implementation type.
|
||||
* @param <H> the target {@link MessageHandler} implementation type.
|
||||
* @param <H> the target {@link org.springframework.messaging.MessageHandler}
|
||||
* implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -75,7 +74,7 @@ public abstract class EndpointSpec<S extends EndpointSpec<S, F, H>, F extends Be
|
||||
/**
|
||||
* @param pollers the pollers
|
||||
* @return the endpoint spec.
|
||||
* @see AbstractPollingEndpoint
|
||||
* @see org.springframework.integration.endpoint.AbstractPollingEndpoint
|
||||
* @see PollerFactory
|
||||
*/
|
||||
public S poller(Function<PollerFactory, PollerSpec> pollers) {
|
||||
@@ -85,7 +84,7 @@ public abstract class EndpointSpec<S extends EndpointSpec<S, F, H>, F extends Be
|
||||
/**
|
||||
* @param pollerMetadataSpec the pollerMetadataSpec
|
||||
* @return the endpoint spec.
|
||||
* @see AbstractPollingEndpoint
|
||||
* @see org.springframework.integration.endpoint.AbstractPollingEndpoint
|
||||
* @see PollerSpec
|
||||
*/
|
||||
public S poller(PollerSpec pollerMetadataSpec) {
|
||||
@@ -99,21 +98,21 @@ public abstract class EndpointSpec<S extends EndpointSpec<S, F, H>, F extends Be
|
||||
/**
|
||||
* @param pollerMetadata the pollerMetadata
|
||||
* @return the endpoint spec.
|
||||
* @see AbstractPollingEndpoint
|
||||
* @see org.springframework.integration.endpoint.AbstractPollingEndpoint
|
||||
*/
|
||||
public abstract S poller(PollerMetadata pollerMetadata);
|
||||
|
||||
/**
|
||||
* @param phase the phase.
|
||||
* @return the endpoint spec.
|
||||
* @see SmartLifecycle
|
||||
* @see org.springframework.context.SmartLifecycle
|
||||
*/
|
||||
public abstract S phase(int phase);
|
||||
|
||||
/**
|
||||
* @param autoStartup the autoStartup.
|
||||
* @return the endpoint spec
|
||||
* @see SmartLifecycle
|
||||
* @see org.springframework.context.SmartLifecycle
|
||||
*/
|
||||
public abstract S autoStartup(boolean autoStartup);
|
||||
|
||||
@@ -122,7 +121,7 @@ public abstract class EndpointSpec<S extends EndpointSpec<S, F, H>, F extends Be
|
||||
* Such endpoints can be started/stopped as a group.
|
||||
* @param role the role for this endpoint.
|
||||
* @return the endpoint spec
|
||||
* @see SmartLifecycle
|
||||
* @see org.springframework.context.SmartLifecycle
|
||||
* @see org.springframework.integration.support.SmartLifecycleRoleController
|
||||
*/
|
||||
public abstract S role(String role);
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.springframework.beans.factory.config.DestructionAwareBeanPostProcesso
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.integration.aggregator.AggregatingMessageHandler;
|
||||
import org.springframework.integration.aggregator.BarrierMessageHandler;
|
||||
import org.springframework.integration.channel.ChannelInterceptorAware;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.FixedSubscriberChannel;
|
||||
@@ -65,7 +64,6 @@ import org.springframework.integration.handler.LambdaMessageProcessor;
|
||||
import org.springframework.integration.handler.LoggingHandler;
|
||||
import org.springframework.integration.handler.MessageProcessor;
|
||||
import org.springframework.integration.handler.MessageTriggerAction;
|
||||
import org.springframework.integration.handler.MethodInvokingMessageProcessor;
|
||||
import org.springframework.integration.handler.ServiceActivatingHandler;
|
||||
import org.springframework.integration.router.AbstractMessageRouter;
|
||||
import org.springframework.integration.router.ErrorMessageExceptionTypeRouter;
|
||||
@@ -81,7 +79,6 @@ import org.springframework.integration.store.MessageStore;
|
||||
import org.springframework.integration.support.MapBuilder;
|
||||
import org.springframework.integration.transformer.ClaimCheckInTransformer;
|
||||
import org.springframework.integration.transformer.ClaimCheckOutTransformer;
|
||||
import org.springframework.integration.transformer.ContentEnricher;
|
||||
import org.springframework.integration.transformer.ExpressionEvaluatingTransformer;
|
||||
import org.springframework.integration.transformer.GenericTransformer;
|
||||
import org.springframework.integration.transformer.HeaderFilter;
|
||||
@@ -959,7 +956,7 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
|
||||
/**
|
||||
* Populate a {@link ServiceActivatingHandler} for the
|
||||
* {@link MethodInvokingMessageProcessor}
|
||||
* {@link org.springframework.integration.handler.MethodInvokingMessageProcessor}
|
||||
* to invoke the discovered {@code method} for provided {@code service} at runtime.
|
||||
* @param service the service object to use.
|
||||
* @return the current {@link IntegrationFlowDefinition}.
|
||||
@@ -970,7 +967,7 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
|
||||
/**
|
||||
* Populate a {@link ServiceActivatingHandler} for the
|
||||
* {@link MethodInvokingMessageProcessor}
|
||||
* {@link org.springframework.integration.handler.MethodInvokingMessageProcessor}
|
||||
* to invoke the {@code method} for provided {@code bean} at runtime.
|
||||
* In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
|
||||
* @param service the service object to use.
|
||||
@@ -983,7 +980,7 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
|
||||
/**
|
||||
* Populate a {@link ServiceActivatingHandler} for the
|
||||
* {@link MethodInvokingMessageProcessor}
|
||||
* {@link org.springframework.integration.handler.MethodInvokingMessageProcessor}
|
||||
* to invoke the {@code method} for provided {@code bean} at runtime.
|
||||
* In addition accept options for the integration endpoint using {@link GenericEndpointSpec}.
|
||||
* @param service the service object to use.
|
||||
@@ -1238,7 +1235,8 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate a {@link ContentEnricher} to the current integration flow position
|
||||
* Populate a {@link org.springframework.integration.transformer.ContentEnricher}
|
||||
* to the current integration flow position
|
||||
* with provided options.
|
||||
* Typically used with a Java 8 Lambda expression:
|
||||
* <pre class="code">
|
||||
@@ -1250,7 +1248,8 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
* .<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))
|
||||
* }
|
||||
* </pre>
|
||||
* @param enricherConfigurer the {@link Consumer} to provide {@link ContentEnricher} options.
|
||||
* @param enricherConfigurer the {@link Consumer} to provide
|
||||
* {@link org.springframework.integration.transformer.ContentEnricher} options.
|
||||
* @return the current {@link IntegrationFlowDefinition}.
|
||||
* @see EnricherSpec
|
||||
*/
|
||||
@@ -2882,7 +2881,8 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate a {@link BarrierMessageHandler} instance for provided timeout.
|
||||
* Populate a {@link org.springframework.integration.aggregator.BarrierMessageHandler}
|
||||
* instance for provided timeout.
|
||||
* @param timeout the timeout in milliseconds.
|
||||
* @return the current {@link IntegrationFlowDefinition}.
|
||||
*/
|
||||
@@ -2891,10 +2891,12 @@ public abstract class IntegrationFlowDefinition<B extends IntegrationFlowDefinit
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate a {@link BarrierMessageHandler} instance for provided timeout
|
||||
* and options from {@link BarrierSpec} and endpoint options from {@link GenericEndpointSpec}.
|
||||
* Populate a {@link org.springframework.integration.aggregator.BarrierMessageHandler}
|
||||
* instance for provided timeout and options from {@link BarrierSpec} and endpoint
|
||||
* options from {@link GenericEndpointSpec}.
|
||||
* @param timeout the timeout in milliseconds.
|
||||
* @param barrierConfigurer the {@link Consumer} to provide {@link BarrierMessageHandler} options.
|
||||
* @param barrierConfigurer the {@link Consumer} to provide
|
||||
* {@link org.springframework.integration.aggregator.BarrierMessageHandler} options.
|
||||
* @return the current {@link IntegrationFlowDefinition}.
|
||||
*/
|
||||
public B barrier(long timeout, Consumer<BarrierSpec> barrierConfigurer) {
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.integration.dsl.support.FixedSubscriberChannelPrototy
|
||||
import org.springframework.integration.dsl.support.MessageChannelReference;
|
||||
import org.springframework.integration.endpoint.MessageProducerSupport;
|
||||
import org.springframework.integration.endpoint.MethodInvokingMessageSource;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.gateway.AnnotationGatewayProxyFactoryBean;
|
||||
import org.springframework.integration.gateway.GatewayProxyFactoryBean;
|
||||
import org.springframework.integration.gateway.MessagingGatewaySupport;
|
||||
@@ -163,7 +162,8 @@ public final class IntegrationFlows {
|
||||
|
||||
/**
|
||||
* Provides {@link Supplier} as source of messages to the integration flow.
|
||||
* which will be triggered by a <b>provided</b> {@link SourcePollingChannelAdapter}.
|
||||
* which will be triggered by a <b>provided</b>
|
||||
* {@link org.springframework.integration.endpoint.SourcePollingChannelAdapter}.
|
||||
* @param messageSource the {@link Supplier} to populate.
|
||||
* @param endpointConfigurer the {@link Consumer} to provide more options for the
|
||||
* {@link org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean}.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,6 @@ import org.springframework.integration.transaction.TransactionSynchronizationFac
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.interceptor.DefaultTransactionAttribute;
|
||||
import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
import org.springframework.util.ErrorHandler;
|
||||
|
||||
@@ -145,7 +144,8 @@ public final class PollerSpec extends IntegrationComponentSpec<PollerSpec, Polle
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with the
|
||||
* provided {@code PlatformTransactionManager} and default {@link DefaultTransactionAttribute}
|
||||
* provided {@code PlatformTransactionManager} and default
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute}
|
||||
* for the {@code pollingTask}.
|
||||
* @param transactionManager the {@link PlatformTransactionManager} to use.
|
||||
* @return the spec.
|
||||
@@ -157,8 +157,10 @@ public final class PollerSpec extends IntegrationComponentSpec<PollerSpec, Polle
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with default {@code PlatformTransactionManager}
|
||||
* and {@link DefaultTransactionAttribute} for the {@code pollingTask}.
|
||||
* Specify a {@link TransactionInterceptor} {@link Advice} with default
|
||||
* {@code PlatformTransactionManager} and
|
||||
* {@link org.springframework.transaction.interceptor.DefaultTransactionAttribute} for
|
||||
* the {@code pollingTask}.
|
||||
* @return the spec.
|
||||
*/
|
||||
public PollerSpec transactional() {
|
||||
|
||||
@@ -23,15 +23,15 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.integration.config.IntegrationConfigurationInitializer;
|
||||
import org.springframework.integration.dsl.IntegrationComponentSpec;
|
||||
import org.springframework.integration.dsl.IntegrationFlowDefinition;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* The Java DSL Integration infrastructure {@code beanFactory} initializer.
|
||||
* Registers {@link IntegrationFlowBeanPostProcessor} and checks if all
|
||||
* {@link IntegrationComponentSpec} are extracted to the target object using
|
||||
* {@link IntegrationComponentSpec#get()}.
|
||||
* {@link org.springframework.integration.dsl.IntegrationComponentSpec} are extracted to
|
||||
* the target object using
|
||||
* {@link org.springframework.integration.dsl.IntegrationComponentSpec#get()}.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.Aware;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.beans.factory.BeanCreationNotAllowedException;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.beans.factory.BeanFactoryUtils;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
@@ -76,9 +75,9 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.StringValueResolver;
|
||||
|
||||
/**
|
||||
* A {@link BeanPostProcessor} to parse {@link IntegrationFlow} beans and
|
||||
* register their components as beans in the provided {@link BeanFactory},
|
||||
* if necessary.
|
||||
* A {@link BeanPostProcessor} to parse {@link IntegrationFlow} beans and register their
|
||||
* components as beans in the provided
|
||||
* {@link org.springframework.beans.factory.BeanFactory}, if necessary.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -20,33 +20,38 @@ import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.integration.dsl.IntegrationFlow;
|
||||
import org.springframework.integration.dsl.StandardIntegrationFlow;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* An AOP {@link MethodInterceptor} for the {@link IntegrationFlow} proxies
|
||||
* An AOP {@link MethodInterceptor} for the
|
||||
* {@link org.springframework.integration.dsl.IntegrationFlow} proxies
|
||||
* with a delegation to an associated {@link StandardIntegrationFlow} instance, which
|
||||
* is not exposed as a bean during a target {@link IntegrationFlow} bean processing.
|
||||
* is not exposed as a bean during a target
|
||||
* {@link org.springframework.integration.dsl.IntegrationFlow} bean processing.
|
||||
*
|
||||
* <p> In most cases an associated internal {@link StandardIntegrationFlow}
|
||||
* exposes an {@code inputChannel} bean for the target {@link IntegrationFlow},
|
||||
* exposes an {@code inputChannel} bean for the target
|
||||
* {@link org.springframework.integration.dsl.IntegrationFlow},
|
||||
* which doesn't start from the channel, e.g. instantiated from lambda.
|
||||
* This way the advice first tries to obtain an {@code inputChannel} from the
|
||||
* target {@link IntegrationFlow} and then falls back to the {@link #delegate}.
|
||||
* target {@link org.springframework.integration.dsl.IntegrationFlow}
|
||||
* and then falls back to the {@link #delegate}.
|
||||
*
|
||||
* <p> Another aspect of this advice is to control and delegate {@link SmartLifecycle}
|
||||
* of the target {@link IntegrationFlow} and associated {@link #delegate}.
|
||||
* of the target {@link org.springframework.integration.dsl.IntegrationFlow} and associated {@link #delegate}.
|
||||
* The {@link SmartLifecycle#start()} and {@link SmartLifecycle#stop()} operations
|
||||
* are delegated to the {@link StandardIntegrationFlow} as is because that instance
|
||||
* isn't controlled by the standard application context lifecycle.
|
||||
* The {@link SmartLifecycle#isAutoStartup()}, {@link SmartLifecycle#getPhase()}
|
||||
* and {@link SmartLifecycle#isRunning()} are called on the {@link #delegate}
|
||||
* only in case when {@link MethodInvocation#proceed()} returns {@code null}
|
||||
* or isn't called at all, e.g. when target {@link IntegrationFlow} doesn't
|
||||
* or isn't called at all, e.g. when the target
|
||||
* {@link org.springframework.integration.dsl.IntegrationFlow} doesn't
|
||||
* implement {@link SmartLifecycle}.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.1
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.integration.core.MessagingTemplate;
|
||||
import org.springframework.integration.dsl.IntegrationFlow;
|
||||
import org.springframework.integration.support.context.NamedComponent;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -192,7 +191,8 @@ public final class StandardIntegrationFlowContext implements IntegrationFlowCont
|
||||
* Obtain a {@link MessagingTemplate} with its default destination set to the input channel
|
||||
* of the {@link IntegrationFlow} for provided {@code flowId}.
|
||||
* <p> Any {@link IntegrationFlow} bean (not only manually registered) can be used for this method.
|
||||
* <p> If {@link IntegrationFlow} doesn't start with the {@link MessageChannel}, the
|
||||
* <p> If {@link IntegrationFlow} doesn't start with the
|
||||
* {@link org.springframework.messaging.MessageChannel}, the
|
||||
* {@link IllegalStateException} is thrown.
|
||||
* @param flowId the bean name to obtain the input channel from
|
||||
* @return the {@link MessagingTemplate} instance
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.springframework.core.task.SyncTaskExecutor;
|
||||
import org.springframework.integration.channel.MessagePublishingErrorHandler;
|
||||
import org.springframework.integration.support.MessagingExceptionWrapper;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.transaction.ExpressionEvaluatingTransactionSynchronizationProcessor;
|
||||
import org.springframework.integration.transaction.IntegrationResourceHolder;
|
||||
import org.springframework.integration.transaction.IntegrationResourceHolderSynchronization;
|
||||
import org.springframework.integration.transaction.PassThroughTransactionSynchronizationFactory;
|
||||
@@ -441,7 +440,7 @@ public abstract class AbstractPollingEndpoint extends AbstractEndpoint implement
|
||||
/**
|
||||
* Return the key under which the resource will be made available as an
|
||||
* attribute on the {@link IntegrationResourceHolder}. The default
|
||||
* {@link ExpressionEvaluatingTransactionSynchronizationProcessor}
|
||||
* {@link org.springframework.integration.transaction.ExpressionEvaluatingTransactionSynchronizationProcessor}
|
||||
* makes this attribute available as a variable in SpEL expressions.
|
||||
* @return The key, or null (default) if the resource shouldn't be
|
||||
* made available as a attribute.
|
||||
|
||||
@@ -20,14 +20,13 @@ import java.lang.reflect.Method;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* A {@link MessageSource} implementation that invokes a no-argument method so
|
||||
* that its return value may be sent to a channel.
|
||||
* A {@link org.springframework.integration.core.MessageSource} implementation that
|
||||
* invokes a no-argument method so that its return value may be sent to a channel.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,15 +20,16 @@ import org.springframework.expression.Expression;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.expression.spel.SpelParserConfiguration;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.integration.core.MessageSelector;
|
||||
import org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor;
|
||||
|
||||
/**
|
||||
* A {@link MessageSelector} implementation that evaluates a SpEL expression.
|
||||
* The evaluation result of the expression must be a boolean value.
|
||||
* A {@link org.springframework.integration.core.MessageSelector} implementation that
|
||||
* evaluates a SpEL expression. The evaluation result of the expression must be a boolean
|
||||
* value.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Liujiong
|
||||
* @author Gary Russell
|
||||
* @since 2.0
|
||||
*/
|
||||
public class ExpressionEvaluatingSelector extends AbstractMessageProcessingSelector {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,16 +19,17 @@ package org.springframework.integration.filter;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.springframework.integration.annotation.Filter;
|
||||
import org.springframework.integration.core.MessageSelector;
|
||||
import org.springframework.integration.handler.MessageProcessor;
|
||||
import org.springframework.integration.handler.MethodInvokingMessageProcessor;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A method-invoking implementation of {@link MessageSelector}.
|
||||
* A method-invoking implementation of
|
||||
* {@link org.springframework.integration.core.MessageSelector}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public class MethodInvokingSelector extends AbstractMessageProcessingSelector {
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanInitializationException;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
||||
import org.springframework.core.task.AsyncTaskExecutor;
|
||||
import org.springframework.core.task.SimpleAsyncTaskExecutor;
|
||||
@@ -62,7 +61,6 @@ import org.springframework.integration.expression.ValueExpression;
|
||||
import org.springframework.integration.support.DefaultMessageBuilderFactory;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.support.management.TrackableComponent;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
@@ -85,8 +83,11 @@ import reactor.core.publisher.Mono;
|
||||
* Generates a proxy for the provided service interface to enable interaction
|
||||
* with messaging components without application code being aware of them allowing
|
||||
* for POJO-style interaction.
|
||||
* This component is also aware of the {@link ConversionService} set on the enclosing {@link BeanFactory}
|
||||
* under the name {@link IntegrationUtils#INTEGRATION_CONVERSION_SERVICE_BEAN_NAME} to
|
||||
* This component is also aware of the
|
||||
* {@link org.springframework.core.convert.ConversionService} set on the enclosing {@link BeanFactory}
|
||||
* under the name
|
||||
* {@link org.springframework.integration.support.utils.IntegrationUtils#INTEGRATION_CONVERSION_SERVICE_BEAN_NAME}
|
||||
* to
|
||||
* perform type conversions when necessary (thanks to Jon Schneider's contribution and suggestion in INT-1230).
|
||||
*
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,11 +18,11 @@ package org.springframework.integration.gateway;
|
||||
|
||||
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Adapts a {@link RequestReplyExchanger} to the {@link MessageHandler} interface.
|
||||
* Adapts a {@link RequestReplyExchanger} to the
|
||||
* {@link org.springframework.messaging.MessageHandler} interface.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -39,7 +39,6 @@ import org.springframework.integration.support.management.metrics.TimerFacade;
|
||||
import org.springframework.integration.support.utils.IntegrationUtils;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import reactor.core.CoreSubscriber;
|
||||
@@ -48,7 +47,7 @@ import reactor.core.CoreSubscriber;
|
||||
* Base class for MessageHandler implementations that provides basic validation
|
||||
* and error handling capabilities. Asserts that the incoming Message is not
|
||||
* null and that it does not contain a null payload. Converts checked exceptions
|
||||
* into runtime {@link MessagingException}s.
|
||||
* into runtime {@link org.springframework.messaging.MessagingException}s.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.EvaluationException;
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.IntegrationMessageHeaderAccessor;
|
||||
import org.springframework.integration.context.IntegrationObjectSupport;
|
||||
import org.springframework.integration.expression.ExpressionUtils;
|
||||
import org.springframework.integration.store.MessageGroup;
|
||||
import org.springframework.integration.store.MessageGroupStore;
|
||||
@@ -51,7 +50,6 @@ import org.springframework.messaging.MessageHandlingException;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
@@ -126,9 +124,10 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
|
||||
* Create a DelayHandler with the given 'messageGroupId' that is used as 'key' for
|
||||
* {@link MessageGroup} to store delayed Messages in the {@link MessageGroupStore}.
|
||||
* The sending of Messages after the delay will be handled by registered in the
|
||||
* ApplicationContext default {@link ThreadPoolTaskScheduler}.
|
||||
* ApplicationContext default
|
||||
* {@link org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler}.
|
||||
* @param messageGroupId The message group identifier.
|
||||
* @see IntegrationObjectSupport#getTaskScheduler()
|
||||
* @see #getTaskScheduler()
|
||||
*/
|
||||
public DelayHandler(String messageGroupId) {
|
||||
Assert.notNull(messageGroupId, "'messageGroupId' must not be null");
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.core.MessageProducer;
|
||||
import org.springframework.integration.filter.MessageFilter;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
@@ -41,7 +40,8 @@ import org.springframework.util.Assert;
|
||||
* It is expected that each handler will produce reply messages and send them to
|
||||
* its output channel, although this is not enforced. It is possible to filter
|
||||
* messages in the middle of the chain, for example using a
|
||||
* {@link MessageFilter}. A {@link MessageHandler} returning null will have the
|
||||
* {@link org.springframework.integration.filter.MessageFilter}.
|
||||
* A {@link MessageHandler} returning null will have the
|
||||
* same effect, although this option is less expressive.
|
||||
* <p>
|
||||
* This component can be used from the namespace to improve the readability of
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,12 +21,12 @@ import java.lang.reflect.Method;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A {@link MessageHandler} that invokes the specified method on the provided object.
|
||||
* A {@link org.springframework.messaging.MessageHandler} that invokes the specified
|
||||
* method on the provided object.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,14 +25,14 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.aop.ProxyMethodInvocation;
|
||||
import org.springframework.integration.context.IntegrationObjectSupport;
|
||||
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
|
||||
/**
|
||||
* Base class for {@link MessageHandler} advice classes. Subclasses should provide
|
||||
* an implementation for {@link #doInvoke(ExecutionCallback, Object, Message)}.
|
||||
* Used to advise the handleRequestMessage method for {@link AbstractReplyProducingMessageHandler} or
|
||||
* Base class for {@link MessageHandler} advice classes. Subclasses should provide an
|
||||
* implementation for {@link #doInvoke(ExecutionCallback, Object, Message)}. Used to
|
||||
* advise the handleRequestMessage method for
|
||||
* {@link org.springframework.integration.handler.AbstractReplyProducingMessageHandler} or
|
||||
* {@link MessageHandler#handleMessage(Message)} for other message handlers.
|
||||
*
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -25,12 +25,11 @@ import org.springframework.integration.expression.ExpressionUtils;
|
||||
import org.springframework.integration.message.AdviceMessage;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
|
||||
/**
|
||||
* Used to advise {@link MessageHandler}s.
|
||||
* Used to advise {@link org.springframework.messaging.MessageHandler}s.
|
||||
* Two expressions 'onSuccessExpression' and 'onFailureExpression' are evaluated when
|
||||
* appropriate. If the evaluation returns a result, a message is sent to the onSuccessChannel
|
||||
* or onFailureChannel as appropriate; the message is an {@link AdviceMessage}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.integration.handler.advice;
|
||||
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
import org.springframework.integration.IntegrationMessageHeaderAccessor;
|
||||
@@ -25,15 +24,15 @@ import org.springframework.integration.core.MessageSelector;
|
||||
import org.springframework.integration.core.MessagingTemplate;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* The {@link MethodInterceptor} implementation for the
|
||||
* The {@link org.aopalliance.intercept.MethodInterceptor} implementation for the
|
||||
* <a href="http://www.eaipatterns.com/IdempotentReceiver.html">Idempotent Receiver</a>
|
||||
* E.I. Pattern.
|
||||
* <p>
|
||||
* This {@link MethodInterceptor} works like a {@code MessageFilter} if {@link #discardChannel}
|
||||
* This {@link org.aopalliance.intercept.MethodInterceptor} works like a
|
||||
* {@code MessageFilter} if {@link #discardChannel}
|
||||
* is provided or {@link #throwExceptionOnRejection} is set to {@code true}.
|
||||
* However if those properties aren't provided, this interceptor will create an new {@link Message}
|
||||
* with a {@link IntegrationMessageHeaderAccessor#DUPLICATE_MESSAGE} header when the
|
||||
@@ -41,7 +40,8 @@ import org.springframework.util.Assert;
|
||||
* <p>
|
||||
* The {@code idempotent filtering} logic depends on the provided {@link MessageSelector}.
|
||||
* <p>
|
||||
* This class is designed to be used only for the {@link MessageHandler#handleMessage},
|
||||
* This class is designed to be used only for the
|
||||
* {@link org.springframework.messaging.MessageHandler#handleMessage},
|
||||
* method.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 the original author or authors.
|
||||
* Copyright 2017-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,6 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
import org.springframework.integration.util.AbstractExpressionEvaluator;
|
||||
import org.springframework.messaging.Message;
|
||||
@@ -38,9 +37,11 @@ import org.springframework.messaging.handler.invocation.HandlerMethodArgumentRes
|
||||
* <p>
|
||||
* If {@link MethodParameter} is of {@link Properties} type and {@link Message#getPayload()}
|
||||
* is a {@link String} containing {@code =} symbol, the {@link MapArgumentResolver} uses
|
||||
* {@link ConversionService} trying to convert that {@link String} to the {@link Properties} object.
|
||||
* the {@link org.springframework.core.convert.ConversionService} trying to convert that
|
||||
* {@link String} to a {@link Properties} object.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.Collection;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.integration.endpoint.AbstractMessageSource;
|
||||
@@ -33,8 +32,9 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Implementation of {@link MessageSource} based on {@link ResourcePatternResolver} which will
|
||||
* attempt to resolve {@link Resource}s based on the pattern specified.
|
||||
* Implementation of {@link org.springframework.integration.core.MessageSource} based on
|
||||
* {@link ResourcePatternResolver} which will attempt to resolve {@link Resource}s based
|
||||
* on the pattern specified.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,6 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.core.DestinationResolutionException;
|
||||
import org.springframework.messaging.core.DestinationResolver;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -79,7 +78,8 @@ public abstract class AbstractMappingMessageRouter extends AbstractMessageRouter
|
||||
|
||||
/**
|
||||
* Provide mappings from channel keys to channel names.
|
||||
* Channel names will be resolved by the {@link DestinationResolver}.
|
||||
* Channel names will be resolved by the
|
||||
* {@link org.springframework.messaging.core.DestinationResolver}.
|
||||
* @param channelMappings The channel mappings.
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.UUID;
|
||||
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
import org.springframework.integration.channel.NullChannel;
|
||||
import org.springframework.integration.core.MessagingTemplate;
|
||||
import org.springframework.integration.handler.AbstractMessageHandler;
|
||||
import org.springframework.integration.support.management.IntegrationManagedResource;
|
||||
@@ -63,7 +62,8 @@ public abstract class AbstractMessageRouter extends AbstractMessageHandler imple
|
||||
* resolution fails to return any channels, the router will throw an
|
||||
* {@link MessageDeliveryException}.
|
||||
* <p>
|
||||
* If messages shall be ignored (dropped) instead, please provide a {@link NullChannel}.
|
||||
* If messages shall be ignored (dropped) instead, please provide a
|
||||
* {@link org.springframework.integration.channel.NullChannel}.
|
||||
* @param defaultOutputChannel The default output channel.
|
||||
*/
|
||||
public void setDefaultOutputChannel(MessageChannel defaultOutputChannel) {
|
||||
|
||||
@@ -26,12 +26,12 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.jmx.export.annotation.ManagedOperation;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* A Message Router that resolves the target {@link MessageChannel} for
|
||||
* A Message Router that resolves the target
|
||||
* {@link org.springframework.messaging.MessageChannel} for
|
||||
* messages whose payload is a {@link Throwable}.
|
||||
* The channel resolution is based upon the most specific cause
|
||||
* of the error for which a channel-mapping exists.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,11 +21,11 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
* A Message Router that resolves the {@link MessageChannel} based on the
|
||||
* A Message Router that resolves the {@link org.springframework.messaging.MessageChannel}
|
||||
* based on the
|
||||
* {@link Message Message's} payload type.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,11 +16,9 @@
|
||||
|
||||
package org.springframework.integration.store;
|
||||
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
|
||||
/**
|
||||
* A marker interface that indicates this message store has optimizations for
|
||||
* use in a {@link QueueChannel}.
|
||||
* use in a {@link org.springframework.integration.channel.QueueChannel}.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 4.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -63,7 +62,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
|
||||
/**
|
||||
* Flag to indicate that the stores should be expired when this component is destroyed (i.e. usually when its
|
||||
* enclosing {@link ApplicationContext} is closed).
|
||||
* enclosing {@link org.springframework.context.ApplicationContext} is closed).
|
||||
*
|
||||
* @param expireOnDestroy the flag value to set
|
||||
*/
|
||||
@@ -90,10 +89,12 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
this.messageGroupStore = messageGroupStore;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Assert.state(this.messageGroupStore != null, "A MessageGroupStore must be provided");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (this.expireOnDestroy) {
|
||||
if (this.isRunning()) {
|
||||
@@ -110,6 +111,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
* Expire all message groups older than the {@link #setTimeout(long) timeout} provided. Normally this method would
|
||||
* be executed by a scheduled task.
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
if (this.timeout >= 0 && this.isRunning()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
@@ -120,6 +122,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void start() {
|
||||
this.lifecycleLock.lock();
|
||||
try {
|
||||
@@ -135,6 +138,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
this.lifecycleLock.lock();
|
||||
try {
|
||||
@@ -154,6 +158,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isRunning() {
|
||||
this.lifecycleLock.lock();
|
||||
try {
|
||||
@@ -164,6 +169,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhase() {
|
||||
return this.phase;
|
||||
}
|
||||
@@ -172,6 +178,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
this.phase = phase;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoStartup() {
|
||||
return this.autoStartup;
|
||||
}
|
||||
@@ -180,6 +187,7 @@ public class MessageGroupStoreReaper implements Runnable, DisposableBean, Initia
|
||||
this.autoStartup = autoStartup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Runnable callback) {
|
||||
this.lifecycleLock.lock();
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.support;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
@@ -35,7 +34,8 @@ public class DefaultMessageBuilderFactory implements MessageBuilderFactory {
|
||||
* Specify a list of headers which should be considered as a read only
|
||||
* and prohibited from the population to the message.
|
||||
* @param readOnlyHeaders the list of headers for {@code readOnly} mode.
|
||||
* Defaults to {@link MessageHeaders#ID} and {@link MessageHeaders#TIMESTAMP}.
|
||||
* Defaults to {@link org.springframework.messaging.MessageHeaders#ID}
|
||||
* and {@link org.springframework.messaging.MessageHeaders#TIMESTAMP}.
|
||||
* @since 4.3.2
|
||||
*/
|
||||
public void setReadOnlyHeaders(String... readOnlyHeaders) {
|
||||
|
||||
@@ -20,19 +20,19 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.integration.store.SimpleMessageStore;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* An implementation of {@link Message} with a generic payload. Unlike
|
||||
* {@link GenericMessage}, this message (or its headers) can be modified after creation.
|
||||
* {@link org.springframework.messaging.support.GenericMessage},
|
||||
* this message (or its headers) can be modified after creation.
|
||||
* Great care must be taken, when mutating messages, that some other element/thread is not
|
||||
* concurrently using the message. Also note that any in-memory stores (such as
|
||||
* {@link SimpleMessageStore}) may have a reference to the message and changes will be
|
||||
* {@link org.springframework.integration.store.SimpleMessageStore})
|
||||
* may have a reference to the message and changes will be
|
||||
* reflected there too.
|
||||
*
|
||||
* <p>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
package org.springframework.integration.support;
|
||||
|
||||
import org.springframework.messaging.converter.MessageConverter;
|
||||
import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.messaging.handler.annotation.support.PayloadArgumentResolver;
|
||||
import org.springframework.validation.Validator;
|
||||
|
||||
/**
|
||||
* A {@link PayloadArgumentResolver} that treats KafkaNull payloads as null.
|
||||
* {@link Payload @Paylaod} annotation must have required = false.
|
||||
* {@link org.springframework.messaging.handler.annotation.Payload @Paylaod}
|
||||
* annotation must have required = false.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 5.1
|
||||
|
||||
@@ -35,8 +35,6 @@ import org.springframework.integration.leader.Context;
|
||||
import org.springframework.integration.leader.DefaultCandidate;
|
||||
import org.springframework.integration.leader.event.DefaultLeaderEventPublisher;
|
||||
import org.springframework.integration.leader.event.LeaderEventPublisher;
|
||||
import org.springframework.integration.leader.event.OnGrantedEvent;
|
||||
import org.springframework.integration.leader.event.OnRevokedEvent;
|
||||
import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -80,8 +78,9 @@ public class LockRegistryLeaderInitiator implements SmartLifecycle, DisposableBe
|
||||
|
||||
/**
|
||||
* Candidate for leader election. User injects this to receive callbacks on leadership
|
||||
* events. Alternatively applications can listen for the {@link OnGrantedEvent} and
|
||||
* {@link OnRevokedEvent}, as long as the
|
||||
* events. Alternatively applications can listen for the
|
||||
* {@link org.springframework.integration.leader.event.OnGrantedEvent} and
|
||||
* {@link org.springframework.integration.leader.event.OnRevokedEvent}, as long as the
|
||||
* {@link #setLeaderEventPublisher(LeaderEventPublisher) leaderEventPublisher} is set.
|
||||
*/
|
||||
private final Candidate candidate;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 the original author or authors.
|
||||
* Copyright 2015-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,10 +24,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.core.annotation.AliasFor;
|
||||
import org.springframework.jmx.export.annotation.ManagedResource;
|
||||
|
||||
/**
|
||||
* Clone of {@link ManagedResource} limiting beans thus annotated so that they
|
||||
* Clone of {@link org.springframework.jmx.export.annotation.ManagedResource}
|
||||
* limiting beans thus annotated so that they
|
||||
* will only be exported by the {@code IntegrationMBeanExporter} and prevented
|
||||
* from being exported by other MBeanExporters (if present).
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,6 @@ import java.util.Properties;
|
||||
|
||||
import org.springframework.jmx.export.annotation.ManagedAttribute;
|
||||
import org.springframework.jmx.export.annotation.ManagedOperation;
|
||||
import org.springframework.messaging.core.DestinationResolver;
|
||||
|
||||
/**
|
||||
* Exposes channel mapping operations when the router is proxied.
|
||||
@@ -68,7 +67,8 @@ public interface MappingMessageRouterManagement {
|
||||
|
||||
/**
|
||||
* Provide mappings from channel keys to channel names.
|
||||
* Channel names will be resolved by the {@link DestinationResolver}.
|
||||
* Channel names will be resolved by the
|
||||
* {@link org.springframework.messaging.core.DestinationResolver}.
|
||||
* @param channelMappings The channel mappings.
|
||||
* @since 4.0
|
||||
*/
|
||||
|
||||
@@ -26,13 +26,13 @@ import org.springframework.integration.context.IntegrationObjectSupport;
|
||||
import org.springframework.integration.expression.ExpressionUtils;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* This implementation of {@link TransactionSynchronizationFactory}
|
||||
* allows you to configure SpEL expressions, with their execution being coordinated
|
||||
* (synchronized) with a transaction - see {@link TransactionSynchronization}.
|
||||
* (synchronized) with a transaction - see
|
||||
* {@link org.springframework.transaction.support.TransactionSynchronization}.
|
||||
* Expressions for {@code before-commit}, {@code after-commit}, and {@code after-rollback}
|
||||
* are supported, together with a {@code channel} for each where the evaluation result
|
||||
* (if any) will be sent.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,15 +16,15 @@
|
||||
|
||||
package org.springframework.integration.transaction;
|
||||
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionException;
|
||||
import org.springframework.transaction.support.AbstractPlatformTransactionManager;
|
||||
import org.springframework.transaction.support.DefaultTransactionStatus;
|
||||
/**
|
||||
* An implementation of {@link PlatformTransactionManager} that provides transaction-like semantics to
|
||||
* {@link MessageSource}s that are not inherently transactional. It does <b>not</b> make such
|
||||
* An implementation of {@link org.springframework.transaction.PlatformTransactionManager}
|
||||
* that provides transaction-like semantics to
|
||||
* {@link org.springframework.integration.core.MessageSource}s that are not inherently
|
||||
* transactional. It does <b>not</b> make such
|
||||
* sources transactional; rather, together with a {@link TransactionSynchronizationFactory}, it provides
|
||||
* the ability to synchronize operations after a flow completes, via beforeCommit, afterCommit and
|
||||
* afterRollback operations.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,10 +18,7 @@ package org.springframework.integration.transaction;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.aopalliance.aop.Advice;
|
||||
|
||||
import org.springframework.integration.handler.advice.HandleMessageAdvice;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.interceptor.TransactionAttributeSource;
|
||||
import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
@@ -29,8 +26,9 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
/**
|
||||
* A {@link TransactionInterceptor} extension with {@link HandleMessageAdvice} marker.
|
||||
* <p>
|
||||
* When this {@link Advice} is used from the {@code request-handler-advice-chain}, it is applied
|
||||
* to the {@link MessageHandler#handleMessage}
|
||||
* When this {@link org.aopalliance.aop.Advice}
|
||||
* is used from the {@code request-handler-advice-chain}, it is applied
|
||||
* to the {@link org.springframework.messaging.MessageHandler#handleMessage}
|
||||
* (not to the
|
||||
* {@link org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandler#handleRequestMessage}),
|
||||
* therefore the entire downstream process is wrapped to the transaction.
|
||||
@@ -38,6 +36,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
|
||||
* In any other cases it is operated as a regular {@link TransactionInterceptor}.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -23,17 +23,18 @@ import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
|
||||
import org.springframework.integration.support.context.NamedComponent;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A reply-producing {@link MessageHandler} that delegates to a
|
||||
* A reply-producing {@link org.springframework.messaging.MessageHandler}
|
||||
* that delegates to a
|
||||
* {@link Transformer} instance to modify the received {@link Message}
|
||||
* and sends the result to its output channel.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public class MessageTransformingHandler extends AbstractReplyProducingMessageHandler implements Lifecycle {
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.scheduling.TriggerContext;
|
||||
import org.springframework.scheduling.support.PeriodicTrigger;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
/**
|
||||
* This is a dynamically changeable {@link Trigger}. It is based on the
|
||||
* {@link PeriodicTrigger} implementations. However, the fields of this dynamic
|
||||
* {@link org.springframework.scheduling.support.PeriodicTrigger}
|
||||
* implementations. However, the fields of this dynamic
|
||||
* trigger are not final and the properties can be inspected and set via
|
||||
* explicit getters and setters. Changes to the trigger take effect after the
|
||||
* next execution.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,6 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.PayloadApplicationEvent;
|
||||
import org.springframework.context.event.ApplicationEventMulticaster;
|
||||
import org.springframework.context.event.ContextClosedEvent;
|
||||
@@ -34,7 +33,7 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* An inbound Channel Adapter that implements {@link ApplicationListener} and
|
||||
* An inbound Channel Adapter that implements {@link GenericApplicationListener} and
|
||||
* passes Spring {@link ApplicationEvent ApplicationEvents} within messages.
|
||||
* If a {@link #setPayloadExpression payloadExpression} is provided, it will be evaluated against
|
||||
* the ApplicationEvent instance to create the Message payload. Otherwise, the event itself will be the payload.
|
||||
@@ -64,7 +63,7 @@ public class ApplicationEventListeningMessageProducer extends ExpressionMessageP
|
||||
* Set the list of event types (classes that extend ApplicationEvent) that
|
||||
* this adapter should send to the message channel. By default, all event
|
||||
* types will be sent.
|
||||
* In addition, this method re-registers the current instance as a {@link ApplicationListener}
|
||||
* In addition, this method re-registers the current instance as a {@link GenericApplicationListener}
|
||||
* with the {@link ApplicationEventMulticaster} which clears the listener cache. The cache will be
|
||||
* refreshed on the next appropriate {@link ApplicationEvent}.
|
||||
*
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.integration.endpoint.AbstractMessageSource;
|
||||
import org.springframework.integration.metadata.MetadataStore;
|
||||
import org.springframework.integration.metadata.SimpleMetadataStore;
|
||||
@@ -43,8 +42,9 @@ import com.rometools.rome.io.SyndFeedInput;
|
||||
import com.rometools.rome.io.XmlReader;
|
||||
|
||||
/**
|
||||
* This implementation of {@link MessageSource} will produce individual
|
||||
* {@link SyndEntry}s for a feed identified with the 'feedUrl' attribute.
|
||||
* This implementation of {@link org.springframework.integration.core.MessageSource} will
|
||||
* produce individual {@link SyndEntry}s for a feed identified with the 'feedUrl'
|
||||
* attribute.
|
||||
*
|
||||
* @author Josh Long
|
||||
* @author Mario Gray
|
||||
|
||||
@@ -42,10 +42,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import org.springframework.context.Lifecycle;
|
||||
import org.springframework.integration.aggregator.ResequencingMessageGroupProcessor;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.integration.endpoint.AbstractMessageSource;
|
||||
import org.springframework.integration.file.filters.AcceptOnceFileListFilter;
|
||||
import org.springframework.integration.file.filters.DiscardAwareFileListFilter;
|
||||
import org.springframework.integration.file.filters.FileListFilter;
|
||||
import org.springframework.integration.file.filters.ResettableFileListFilter;
|
||||
@@ -54,17 +51,21 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* {@link MessageSource} that creates messages from a file system directory.
|
||||
* {@link org.springframework.integration.core.MessageSource} that creates messages
|
||||
* from a file system directory.
|
||||
* To prevent messages for certain files, you may supply a {@link FileListFilter}.
|
||||
* By default, an {@link AcceptOnceFileListFilter} is used.
|
||||
* By default, when configuring with XML or the DSL,
|
||||
* an {@link org.springframework.integration.file.filters.AcceptOnceFileListFilter} is used.
|
||||
* It ensures files are picked up only once from the directory.
|
||||
* <p>
|
||||
* A common problem with reading files is that a file may be detected before it
|
||||
* is ready. The default {@link AcceptOnceFileListFilter}
|
||||
* is ready. The default
|
||||
* {@link org.springframework.integration.file.filters.AcceptOnceFileListFilter}
|
||||
* does not prevent this. In most cases, this can be prevented if the
|
||||
* file-writing process renames each file as soon as it is ready for reading. A
|
||||
* pattern-matching filter that accepts only files that are ready (e.g. based on
|
||||
* a known suffix), composed with the default {@link AcceptOnceFileListFilter}
|
||||
* a known suffix), composed with the default
|
||||
* {@link org.springframework.integration.file.filters.AcceptOnceFileListFilter}
|
||||
* would allow for this.
|
||||
* <p>
|
||||
* If a external {@link DirectoryScanner} is used, then the {@link FileLocker}
|
||||
@@ -74,7 +75,8 @@ import org.springframework.util.Assert;
|
||||
* <p>
|
||||
* A {@link Comparator} can be used to ensure internal ordering of the Files in
|
||||
* a {@link PriorityBlockingQueue}. This does not provide the same guarantees as
|
||||
* a {@link ResequencingMessageGroupProcessor}, but in cases where writing files
|
||||
* a {@link org.springframework.integration.aggregator.ResequencingMessageGroupProcessor},
|
||||
* but in cases where writing files
|
||||
* and failure downstream are rare it might be sufficient.
|
||||
* <p>
|
||||
* FileReadingMessageSource is fully thread-safe under concurrent
|
||||
|
||||
@@ -61,7 +61,6 @@ import org.springframework.integration.support.locks.LockRegistry;
|
||||
import org.springframework.integration.support.locks.PassThruLockRegistry;
|
||||
import org.springframework.integration.util.WhileLockedProcessor;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessageHandlingException;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -69,7 +68,8 @@ import org.springframework.util.StreamUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@link MessageHandler} implementation that writes the Message payload to a
|
||||
* A {@link org.springframework.messaging.MessageHandler} implementation
|
||||
* that writes the Message payload to a
|
||||
* file. If the payload is a File object, it will copy the File to the specified
|
||||
* destination directory. If the payload is a byte array, a String or an
|
||||
* InputStream it will be written directly. Otherwise, the payload type is
|
||||
|
||||
@@ -30,13 +30,8 @@ import org.springframework.integration.file.DirectoryScanner;
|
||||
import org.springframework.integration.file.FileLocker;
|
||||
import org.springframework.integration.file.FileReadingMessageSource;
|
||||
import org.springframework.integration.file.config.FileListFilterFactoryBean;
|
||||
import org.springframework.integration.file.filters.AcceptAllFileListFilter;
|
||||
import org.springframework.integration.file.filters.AcceptOnceFileListFilter;
|
||||
import org.springframework.integration.file.filters.ExpressionFileListFilter;
|
||||
import org.springframework.integration.file.filters.FileListFilter;
|
||||
import org.springframework.integration.file.filters.IgnoreHiddenFileListFilter;
|
||||
import org.springframework.integration.file.filters.RegexPatternFileListFilter;
|
||||
import org.springframework.integration.file.filters.SimplePatternFileListFilter;
|
||||
import org.springframework.integration.file.locking.NioFileLocker;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -144,9 +139,12 @@ public class FileInboundChannelAdapterSpec
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure an {@link AcceptOnceFileListFilter} if {@code preventDuplicates == true},
|
||||
* otherwise - {@link AcceptAllFileListFilter}.
|
||||
* @param preventDuplicates true to configure an {@link AcceptOnceFileListFilter}.
|
||||
* Configure an
|
||||
* {@link org.springframework.integration.file.filters.AcceptOnceFileListFilter} if
|
||||
* {@code preventDuplicates == true}, otherwise -
|
||||
* {@link org.springframework.integration.file.filters.AcceptAllFileListFilter}.
|
||||
* @param preventDuplicates true to configure an
|
||||
* {@link org.springframework.integration.file.filters.AcceptOnceFileListFilter}.
|
||||
* @return the spec.
|
||||
*/
|
||||
public FileInboundChannelAdapterSpec preventDuplicates(boolean preventDuplicates) {
|
||||
@@ -156,9 +154,11 @@ public class FileInboundChannelAdapterSpec
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Configure an {@link IgnoreHiddenFileListFilter} if {@code ignoreHidden == true}.
|
||||
* @param ignoreHidden true to configure an {@link IgnoreHiddenFileListFilter}.
|
||||
* Configure an
|
||||
* {@link org.springframework.integration.file.filters.IgnoreHiddenFileListFilter} if
|
||||
* {@code ignoreHidden == true}.
|
||||
* @param ignoreHidden true to configure an
|
||||
* {@link org.springframework.integration.file.filters.IgnoreHiddenFileListFilter}.
|
||||
* @return the spec.
|
||||
*/
|
||||
public FileInboundChannelAdapterSpec ignoreHidden(boolean ignoreHidden) {
|
||||
@@ -168,7 +168,8 @@ public class FileInboundChannelAdapterSpec
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a {@link SimplePatternFileListFilter}.
|
||||
* Configure a
|
||||
* {@link org.springframework.integration.file.filters.SimplePatternFileListFilter}.
|
||||
* @param pattern The pattern.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
@@ -181,7 +182,8 @@ public class FileInboundChannelAdapterSpec
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a {@link RegexPatternFileListFilter}.
|
||||
* Configure a
|
||||
* {@link org.springframework.integration.file.filters.RegexPatternFileListFilter}.
|
||||
* @param regex The regex.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,6 @@ import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessageHandlerSpec;
|
||||
import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.file.DefaultFileNameGenerator;
|
||||
import org.springframework.integration.file.FileHeaders;
|
||||
import org.springframework.integration.file.FileNameGenerator;
|
||||
import org.springframework.integration.file.FileWritingMessageHandler;
|
||||
import org.springframework.integration.file.support.FileExistsMode;
|
||||
@@ -136,11 +135,11 @@ public class FileWritingMessageHandlerSpec
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify whether to delete source Files after writing to the destination
|
||||
* directory. The default is <em>false</em>. When set to <em>true</em>, it
|
||||
* will only have an effect if the inbound Message has a File payload or
|
||||
* a {@link FileHeaders#ORIGINAL_FILE} header value containing either a
|
||||
* File instance or a String representing the original file path.
|
||||
* Specify whether to delete source Files after writing to the destination directory.
|
||||
* The default is <em>false</em>. When set to <em>true</em>, it will only have an
|
||||
* effect if the inbound Message has a File payload or a
|
||||
* {@link org.springframework.integration.file.FileHeaders#ORIGINAL_FILE} header value
|
||||
* containing either a File instance or a String representing the original file path.
|
||||
* @param deleteSourceFiles true to delete the source files.
|
||||
* @return the current Spec
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,6 @@ import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessageSourceSpec;
|
||||
import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.file.FileReadingMessageSource;
|
||||
import org.springframework.integration.file.filters.ExpressionFileListFilter;
|
||||
import org.springframework.integration.file.filters.FileListFilter;
|
||||
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer;
|
||||
@@ -39,6 +38,7 @@ import org.springframework.integration.file.remote.synchronizer.AbstractInboundF
|
||||
* @param <MS> the target {@link AbstractInboundFileSynchronizingMessageSource} implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -176,7 +176,7 @@ public abstract class RemoteFileInboundChannelAdapterSpec<F, S extends RemoteFil
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param expression the SpEL expression for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see org.springframework.integration.file.FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterExpression(String expression) {
|
||||
@@ -188,7 +188,7 @@ public abstract class RemoteFileInboundChannelAdapterSpec<F, S extends RemoteFil
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param filterFunction the {@link Function} for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see org.springframework.integration.file.FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterFunction(Function<F, Boolean> filterFunction) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,6 @@ import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessageHandlerSpec;
|
||||
import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.file.FileReadingMessageSource;
|
||||
import org.springframework.integration.file.filters.CompositeFileListFilter;
|
||||
import org.springframework.integration.file.filters.ExpressionFileListFilter;
|
||||
import org.springframework.integration.file.filters.FileListFilter;
|
||||
@@ -42,6 +41,7 @@ import org.springframework.messaging.Message;
|
||||
* @param <S> the target {@link RemoteFileOutboundGatewaySpec} implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -181,7 +181,7 @@ public abstract class RemoteFileOutboundGatewaySpec<F, S extends RemoteFileOutbo
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param expression the SpEL expression for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileOutboundGateway#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterExpression(String expression) {
|
||||
@@ -193,7 +193,7 @@ public abstract class RemoteFileOutboundGatewaySpec<F, S extends RemoteFileOutbo
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param filterFunction the {@link Function} for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileOutboundGateway#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterFunction(Function<F, Boolean> filterFunction) {
|
||||
@@ -248,7 +248,7 @@ public abstract class RemoteFileOutboundGatewaySpec<F, S extends RemoteFileOutbo
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param expression the SpEL expression for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileOutboundGateway#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S mputFilterExpression(String expression) {
|
||||
@@ -260,7 +260,7 @@ public abstract class RemoteFileOutboundGatewaySpec<F, S extends RemoteFileOutbo
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param filterFunction the {@link Function} for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileOutboundGateway#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S mputFilterFunction(Function<File, Boolean> filterFunction) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,19 +24,17 @@ import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessageSourceSpec;
|
||||
import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.file.FileReadingMessageSource;
|
||||
import org.springframework.integration.file.filters.ExpressionFileListFilter;
|
||||
import org.springframework.integration.file.filters.FileListFilter;
|
||||
import org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource;
|
||||
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
/**
|
||||
* A {@link MessageSourceSpec} for an {@link AbstractInboundFileSynchronizingMessageSource}.
|
||||
* A {@link MessageSourceSpec} for an {@link AbstractRemoteFileStreamingMessageSource}.
|
||||
*
|
||||
* @param <F> the target file type.
|
||||
* @param <S> the target {@link RemoteFileStreamingInboundChannelAdapterSpec} implementation type.
|
||||
* @param <MS> the target {@link AbstractInboundFileSynchronizingMessageSource} implementation type.
|
||||
* @param <MS> the target {@link AbstractRemoteFileStreamingMessageSource} implementation type.
|
||||
*
|
||||
* @author Gary Russell
|
||||
*
|
||||
@@ -106,7 +104,7 @@ public abstract class RemoteFileStreamingInboundChannelAdapterSpec<F,
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param expression the SpEL expression for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileStreamingMessageSource#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterExpression(String expression) {
|
||||
@@ -118,7 +116,7 @@ public abstract class RemoteFileStreamingInboundChannelAdapterSpec<F,
|
||||
* Configure the {@link ExpressionFileListFilter}.
|
||||
* @param filterFunction the {@link Function} for files filtering.
|
||||
* @return the spec.
|
||||
* @see FileReadingMessageSource#setFilter(FileListFilter)
|
||||
* @see AbstractRemoteFileStreamingMessageSource#setFilter(FileListFilter)
|
||||
* @see ExpressionFileListFilter
|
||||
*/
|
||||
public S filterFunction(Function<F, Boolean> filterFunction) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,19 +22,20 @@ import java.nio.channels.FileLock;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.springframework.integration.file.FileReadingMessageSource;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
|
||||
/**
|
||||
* File locking strategy that uses java.nio. The locks taken by FileChannel are shared with all the threads in a single
|
||||
* JVM, so this locking strategy <b>does not</b> prevent files being picked up multiple times within the same JVM.
|
||||
* {@link FileReadingMessageSource}s sharing a Locker will not pick up the same files.
|
||||
* {@link org.springframework.integration.file.FileReadingMessageSource}s sharing a
|
||||
* Locker will not pick up the same files.
|
||||
* <p>
|
||||
* This implementation will acquire or create a {@link FileLock} for the given file. Caching locks might be expensive,
|
||||
* so this locking strategy is not recommended for scenarios where many files are accessed in parallel.
|
||||
*
|
||||
* @author Iwein Fuld
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
* @since 2.0
|
||||
*/
|
||||
public class NioFileLocker extends AbstractFileLockerFilter {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.integration.file.remote;
|
||||
|
||||
import org.springframework.integration.file.remote.session.Session;
|
||||
|
||||
/**
|
||||
* {@code RemoteFileTemplate} callback with the underlying client instance providing
|
||||
* access to lower level methods.
|
||||
@@ -33,10 +31,11 @@ import org.springframework.integration.file.remote.session.Session;
|
||||
public interface ClientCallback<C, T> {
|
||||
|
||||
/**
|
||||
* Called within the context of a {@link Session}.
|
||||
* Perform some operation(s) on the client instance underlying the session. The caller will take
|
||||
* care of closing the session after this method exits. However, the implementation
|
||||
* is required to perform any clean up required by the client after performing
|
||||
* Called within the context of a
|
||||
* {@link org.springframework.integration.file.remote.session.Session}. Perform some
|
||||
* operation(s) on the client instance underlying the session. The caller will take
|
||||
* care of closing the session after this method exits. However, the implementation is
|
||||
* required to perform any clean up required by the client after performing
|
||||
* operations.
|
||||
* @param client The client instance.
|
||||
* @return The return value.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2016 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -177,7 +177,7 @@ public interface RemoteFileOperations<F> {
|
||||
* @since 5.1
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface OperationsCallback<F, T> {
|
||||
interface OperationsCallback<F, T> {
|
||||
|
||||
/**
|
||||
* Execute any number of operations using a dedicated remote
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.integration.file.remote.handler;
|
||||
|
||||
import org.springframework.expression.Expression;
|
||||
import org.springframework.integration.file.DefaultFileNameGenerator;
|
||||
import org.springframework.integration.file.FileNameGenerator;
|
||||
import org.springframework.integration.file.remote.RemoteFileTemplate;
|
||||
import org.springframework.integration.file.remote.session.SessionFactory;
|
||||
@@ -138,8 +137,9 @@ public class FileTransferringMessageHandler<F> extends AbstractMessageHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the file name generator used to generate the remote filename to be used when transferring
|
||||
* files to the remote system. Default {@link DefaultFileNameGenerator}.
|
||||
* Set the file name generator used to generate the remote filename to be used when
|
||||
* transferring files to the remote system. Default
|
||||
* {@link org.springframework.integration.file.DefaultFileNameGenerator}.
|
||||
* @param fileNameGenerator the file name generator.
|
||||
* @see RemoteFileTemplate#setFileNameGenerator(FileNameGenerator)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.ftp.inbound;
|
||||
import org.apache.commons.net.ftp.FTPFile;
|
||||
|
||||
import org.springframework.expression.common.LiteralExpression;
|
||||
import org.springframework.integration.file.remote.session.Session;
|
||||
import org.springframework.integration.file.remote.session.SessionFactory;
|
||||
import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer;
|
||||
import org.springframework.integration.ftp.filters.FtpPersistentAcceptOnceFileListFilter;
|
||||
@@ -32,12 +31,14 @@ import org.springframework.integration.metadata.SimpleMetadataStore;
|
||||
* @author Josh Long
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
* @since 2.0
|
||||
*/
|
||||
public class FtpInboundFileSynchronizer extends AbstractInboundFileSynchronizer<FTPFile> {
|
||||
|
||||
/**
|
||||
* Create a synchronizer with the {@link SessionFactory} used to acquire {@link Session} instances.
|
||||
* Create a synchronizer with the {@link SessionFactory} used to acquire
|
||||
* {@link org.springframework.integration.file.remote.session.Session} instances.
|
||||
* @param sessionFactory The session factory.
|
||||
*/
|
||||
public FtpInboundFileSynchronizer(SessionFactory<FTPFile> sessionFactory) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,11 +19,11 @@ package org.springframework.integration.ftp.session;
|
||||
import org.apache.commons.net.ftp.FTPFile;
|
||||
|
||||
import org.springframework.integration.file.remote.AbstractFileInfo;
|
||||
import org.springframework.integration.file.remote.FileInfo;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A {@link FileInfo} implementation for FTP/FTPS.
|
||||
* A {@link org.springframework.integration.file.remote.FileInfo} implementation for
|
||||
* FTP/FTPS.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 2.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,19 +26,19 @@ import org.apache.geode.cache.Region;
|
||||
import org.apache.geode.cache.Scope;
|
||||
import org.apache.geode.cache.util.CacheListenerAdapter;
|
||||
|
||||
import org.springframework.integration.metadata.ConcurrentMetadataStore;
|
||||
import org.springframework.integration.metadata.ListenableMetadataStore;
|
||||
import org.springframework.integration.metadata.MetadataStoreListener;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Gemfire implementation of {@link ConcurrentMetadataStore}.
|
||||
* Gemfire implementation of {@link ListenableMetadataStore}.
|
||||
* Use this {@link org.springframework.integration.metadata.MetadataStore}
|
||||
* to achieve meta-data persistence shared across application instances and
|
||||
* restarts.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Venil Noronha
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
|
||||
@@ -33,17 +33,17 @@ import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.integration.expression.ExpressionUtils;
|
||||
import org.springframework.integration.handler.AbstractMessageHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A {@link MessageHandler} implementation that writes to a GemFire Region. The
|
||||
* Message's payload must be an instance of {@link Map} or {@link #cacheEntryExpressions}
|
||||
* must be provided.
|
||||
* A {@link org.springframework.messaging.MessageHandler} implementation that writes to a
|
||||
* GemFire Region. The Message's payload must be an instance of {@link Map} or
|
||||
* {@link #cacheEntryExpressions} must be provided.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author David Turanski
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
|
||||
@@ -23,19 +23,19 @@ import java.util.List;
|
||||
import org.apache.geode.cache.Region;
|
||||
|
||||
import org.springframework.integration.store.AbstractKeyValueMessageStore;
|
||||
import org.springframework.integration.store.MessageGroupStore;
|
||||
import org.springframework.integration.store.MessageStore;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.PatternMatchUtils;
|
||||
|
||||
/**
|
||||
* Gemfire implementation of the key/value style {@link MessageStore} and
|
||||
* {@link MessageGroupStore}
|
||||
* Gemfire implementation of the key/value style
|
||||
* {@link org.springframework.integration.store.MessageStore} and
|
||||
* {@link org.springframework.integration.store.MessageGroupStore}
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
* @author David Turanski
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor;
|
||||
import org.springframework.integration.scripting.DefaultScriptVariableGenerator;
|
||||
import org.springframework.integration.scripting.ScriptVariableGenerator;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.scripting.ScriptSource;
|
||||
@@ -51,7 +50,8 @@ public class GroovyCommandMessageProcessor extends AbstractScriptExecutingMessag
|
||||
|
||||
|
||||
/**
|
||||
* Creates a {@link GroovyCommandMessageProcessor} that will use the {@link DefaultScriptVariableGenerator}.
|
||||
* Creates a {@link GroovyCommandMessageProcessor} that will use the
|
||||
* {@link org.springframework.integration.scripting.DefaultScriptVariableGenerator}.
|
||||
*/
|
||||
public GroovyCommandMessageProcessor() {
|
||||
super();
|
||||
@@ -67,7 +67,8 @@ public class GroovyCommandMessageProcessor extends AbstractScriptExecutingMessag
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link GroovyCommandMessageProcessor} that will use the {@link DefaultScriptVariableGenerator}
|
||||
* Creates a {@link GroovyCommandMessageProcessor} that will use the
|
||||
* {@link org.springframework.integration.scripting.DefaultScriptVariableGenerator}
|
||||
* and provided {@link Binding}.
|
||||
* Provided 'binding' will be used in the {@link BindingOverwriteGroovyObjectCustomizerDecorator} to overwrite
|
||||
* original Groovy Script 'binding'.
|
||||
|
||||
@@ -24,10 +24,10 @@ import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.annotation.AliasFor;
|
||||
import org.springframework.integration.http.management.IntegrationGraphController;
|
||||
|
||||
/**
|
||||
* Enables the {@link IntegrationGraphController} if
|
||||
* Enables the
|
||||
* {@link org.springframework.integration.http.management.IntegrationGraphController} if
|
||||
* {@code org.springframework.web.servlet.DispatcherServlet} or
|
||||
* {@code org.springframework.web.reactive.DispatcherHandler} is present in the classpath.
|
||||
*
|
||||
@@ -35,7 +35,7 @@ import org.springframework.integration.http.management.IntegrationGraphControlle
|
||||
*
|
||||
* @since 4.3
|
||||
*
|
||||
* @see IntegrationGraphController
|
||||
* @see org.springframework.integration.http.management.IntegrationGraphController
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@@ -44,17 +44,21 @@ import org.springframework.integration.http.management.IntegrationGraphControlle
|
||||
public @interface EnableIntegrationGraphController {
|
||||
|
||||
/**
|
||||
* Specify the Request Mapping path for the {@link IntegrationGraphController}.
|
||||
* Specify the Request Mapping path for the
|
||||
* {@link org.springframework.integration.http.management.IntegrationGraphController}.
|
||||
* Defaults to {@value HttpContextUtils#GRAPH_CONTROLLER_DEFAULT_PATH}.
|
||||
* @return The Request Mapping path for the {@link IntegrationGraphController}
|
||||
* @return The Request Mapping path for the
|
||||
* {@link org.springframework.integration.http.management.IntegrationGraphController}
|
||||
*/
|
||||
@AliasFor("path")
|
||||
String value() default HttpContextUtils.GRAPH_CONTROLLER_DEFAULT_PATH;
|
||||
|
||||
/**
|
||||
* Specify the Request Mapping path for the {@link IntegrationGraphController}.
|
||||
* Specify the Request Mapping path for the
|
||||
* {@link org.springframework.integration.http.management.IntegrationGraphController}.
|
||||
* Defaults to {@value HttpContextUtils#GRAPH_CONTROLLER_DEFAULT_PATH}.
|
||||
* @return The Request Mapping path for the {@link IntegrationGraphController}
|
||||
* @return The Request Mapping path for the
|
||||
* {@link org.springframework.integration.http.management.IntegrationGraphController}
|
||||
*/
|
||||
@AliasFor("value")
|
||||
String path() default HttpContextUtils.GRAPH_CONTROLLER_DEFAULT_PATH;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,11 +26,11 @@ import org.springframework.http.HttpInputMessage;
|
||||
import org.springframework.http.HttpOutputMessage;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.AbstractHttpMessageConverter;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
* An {@link HttpMessageConverter} implementation for {@link Serializable} instances.
|
||||
* An {@link org.springframework.http.converter.HttpMessageConverter} implementation for
|
||||
* {@link Serializable} instances.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
* Copyright 2016-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,17 +19,18 @@ package org.springframework.integration.http.dsl;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.integration.dsl.MessagingGatewaySpec;
|
||||
import org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport;
|
||||
import org.springframework.web.multipart.MultipartResolver;
|
||||
|
||||
/**
|
||||
* A base {@link MessagingGatewaySpec} for the {@link HttpRequestHandlingEndpointSupport} implementations.
|
||||
* A base {@link org.springframework.integration.dsl.MessagingGatewaySpec} for the
|
||||
* {@link HttpRequestHandlingEndpointSupport} implementations.
|
||||
*
|
||||
* @param <S> the target {@link BaseHttpInboundEndpointSpec} implementation type.
|
||||
* @param <E> the target {@link HttpRequestHandlingEndpointSupport} implementation type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -28,13 +28,11 @@ import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.integration.dsl.ComponentsRegistration;
|
||||
import org.springframework.integration.dsl.MessagingGatewaySpec;
|
||||
import org.springframework.integration.expression.FunctionExpression;
|
||||
import org.springframework.integration.http.inbound.BaseHttpInboundEndpoint;
|
||||
import org.springframework.integration.http.inbound.CrossOrigin;
|
||||
import org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport;
|
||||
import org.springframework.integration.http.inbound.RequestMapping;
|
||||
import org.springframework.integration.http.support.DefaultHttpHeaderMapper;
|
||||
import org.springframework.integration.mapping.HeaderMapper;
|
||||
@@ -43,6 +41,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
@@ -94,7 +93,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* Specify a SpEL expression to evaluate in order to generate the Message payload.
|
||||
* @param payloadExpression The payload expression.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
*/
|
||||
public S payloadExpression(String payloadExpression) {
|
||||
return payloadExpression(PARSER.parseExpression(payloadExpression));
|
||||
@@ -104,7 +103,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* Specify a SpEL expression to evaluate in order to generate the Message payload.
|
||||
* @param payloadExpression The payload expression.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
*/
|
||||
public S payloadExpression(Expression payloadExpression) {
|
||||
this.target.setPayloadExpression(payloadExpression);
|
||||
@@ -116,7 +115,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* @param payloadFunction The payload {@link Function}.
|
||||
* @param <P> the expected HTTP request body type.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setPayloadExpression(Expression)
|
||||
*/
|
||||
public <P> S payloadFunction(Function<HttpEntity<P>, ?> payloadFunction) {
|
||||
return payloadExpression(new FunctionExpression<>(payloadFunction));
|
||||
@@ -126,7 +125,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* Specify a Map of SpEL expressions to evaluate in order to generate the Message headers.
|
||||
* @param headerExpressions The {@link Map} of SpEL expressions for headers.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
*/
|
||||
public S headerExpressions(Map<String, Expression> headerExpressions) {
|
||||
Assert.notNull(headerExpressions, "'headerExpressions' must not be null");
|
||||
@@ -140,7 +139,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* @param header the header name to populate.
|
||||
* @param expression the SpEL expression for the header.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
*/
|
||||
public S headerExpression(String header, String expression) {
|
||||
return headerExpression(header, PARSER.parseExpression(expression));
|
||||
@@ -151,7 +150,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* @param header the header name to populate.
|
||||
* @param expression the SpEL expression for the header.
|
||||
* @return the spec
|
||||
* @see HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
*/
|
||||
public S headerExpression(String header, Expression expression) {
|
||||
this.headerExpressions.put(header, expression);
|
||||
@@ -164,7 +163,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* @param headerFunction the function to evaluate the header value against {@link HttpEntity}.
|
||||
* @param <P> the expected HTTP body type.
|
||||
* @return the current Spec.
|
||||
* @see HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setHeaderExpressions(Map)
|
||||
*/
|
||||
public <P> S headerFunction(String header, Function<HttpEntity<P>, ?> headerFunction) {
|
||||
return headerExpression(header, new FunctionExpression<>(headerFunction));
|
||||
@@ -211,7 +210,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
|
||||
/**
|
||||
* Specify the type of payload to be generated when the inbound HTTP request content is read by the
|
||||
* {@link HttpMessageConverter}s.
|
||||
* {@link org.springframework.http.converter.HttpMessageConverter}s.
|
||||
* By default this value is null which means at runtime any "text" Content-Type will
|
||||
* result in String while all others default to <code>byte[].class</code>.
|
||||
* @param requestPayloadType The payload type.
|
||||
@@ -224,7 +223,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
|
||||
/**
|
||||
* Specify the type of payload to be generated when the inbound HTTP request content is read by the
|
||||
* {@link HttpMessageConverter}s.
|
||||
* {@link org.springframework.http.converter.HttpMessageConverter}s.
|
||||
* By default this value is null which means at runtime any "text" Content-Type will
|
||||
* result in String while all others default to <code>byte[].class</code>.
|
||||
* @param requestPayloadType The payload type.
|
||||
@@ -252,7 +251,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* the default '200 OK' or '500 Internal Server Error' for a timeout.
|
||||
* @param statusCodeExpression The status code Expression.
|
||||
* @return the current Spec.
|
||||
* @see HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
*/
|
||||
public S statusCodeExpression(String statusCodeExpression) {
|
||||
this.target.setStatusCodeExpressionString(statusCodeExpression);
|
||||
@@ -264,7 +263,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* the default '200 OK' or '500 Internal Server Error' for a timeout.
|
||||
* @param statusCodeExpression The status code Expression.
|
||||
* @return the current Spec.
|
||||
* @see HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
*/
|
||||
public S statusCodeExpression(Expression statusCodeExpression) {
|
||||
this.target.setStatusCodeExpression(statusCodeExpression);
|
||||
@@ -276,7 +275,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
* the default '200 OK' or '500 Internal Server Error' for a timeout.
|
||||
* @param statusCodeFunction The status code {@link Function}.
|
||||
* @return the current Spec.
|
||||
* @see HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
* @see org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport#setStatusCodeExpression(Expression)
|
||||
*/
|
||||
public S statusCodeFunction(Function<RequestEntity<?>, ?> statusCodeFunction) {
|
||||
return statusCodeExpression(new FunctionExpression<>(statusCodeFunction));
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.springframework.integration.expression.ExpressionUtils;
|
||||
import org.springframework.integration.gateway.MessagingGatewaySupport;
|
||||
import org.springframework.integration.http.support.DefaultHttpHeaderMapper;
|
||||
import org.springframework.integration.mapping.HeaderMapper;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -241,7 +240,7 @@ public class BaseHttpInboundEndpoint extends MessagingGatewaySupport implements
|
||||
* {@link #BaseHttpInboundEndpoint(boolean) expectReply} is true) resolves
|
||||
* an {@link HttpStatus} from the
|
||||
* {@link org.springframework.integration.http.HttpHeaders#STATUS_CODE} reply
|
||||
* {@link Message} header.
|
||||
* {@link org.springframework.messaging.Message} header.
|
||||
* @param statusCodeExpression The status code Expression.
|
||||
* @since 4.1
|
||||
* @see #setReplyTimeout(long)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user