Checkstyle changes

* Upgrade to Checkstyle 9.0
* apply some JavaDocs rules
* Fix JavaDocs rules violations
* Some other minor clean up in the affected classes
This commit is contained in:
Artem Bilan
2021-09-28 11:55:25 -04:00
parent d2e23c5f03
commit fe57fd281c
217 changed files with 742 additions and 581 deletions

View File

@@ -343,7 +343,7 @@ configure(javaProjects) { subproject ->
checkstyle {
configDirectory.set(rootProject.file('src/checkstyle'))
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.45.1'
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '9.0'
}
jar {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -77,8 +77,8 @@ public abstract class AbstractAmqpChannel extends AbstractMessageChannel impleme
* @param amqpTemplate the template.
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
AbstractAmqpChannel(AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) {
Assert.notNull(amqpTemplate, "amqpTemplate must not be null");
@@ -132,8 +132,8 @@ public abstract class AbstractAmqpChannel extends AbstractMessageChannel impleme
/**
* @return the extract payload.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
protected boolean isExtractPayload() {
return this.extractPayload;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -87,8 +87,8 @@ abstract class AbstractSubscribableAmqpChannel extends AbstractAmqpChannel
* @param amqpTemplate the template.
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
protected AbstractSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container,
AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) {
@@ -120,8 +120,8 @@ abstract class AbstractSubscribableAmqpChannel extends AbstractAmqpChannel
* @param isPubSub true for a pub/sub channel.
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
protected AbstractSubscribableAmqpChannel(String channelName,
AbstractMessageListenerContainer container,

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -57,8 +57,8 @@ public class PointToPointSubscribableAmqpChannel extends AbstractSubscribableAmq
* @param amqpTemplate the template.
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
public PointToPointSubscribableAmqpChannel(String channelName, AbstractMessageListenerContainer container,
AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -82,8 +82,8 @@ public class PollableAmqpChannel extends AbstractAmqpChannel
* @param amqpTemplate the template.
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
public PollableAmqpChannel(String channelName, AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper,
AmqpHeaderMapper inboundMapper) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -68,8 +68,8 @@ public class PublishSubscribeAmqpChannel extends AbstractSubscribableAmqpChannel
* @param amqpTemplate the template
* @param outboundMapper the outbound mapper.
* @param inboundMapper the inbound mapper.
* @see #setExtractPayload(boolean)
* @since 4.3
* @see #setExtractPayload(boolean)
*/
public PublishSubscribeAmqpChannel(String channelName, AbstractMessageListenerContainer container,
AmqpTemplate amqpTemplate, AmqpHeaderMapper outboundMapper, AmqpHeaderMapper inboundMapper) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2021 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.
@@ -37,6 +37,9 @@ import org.springframework.util.backoff.BackOff;
/**
* Base class for container specs.
*
* @param <S> the current spec extension type
* @param <C> the listener container type
*
* @author Gary Russell
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -155,7 +155,7 @@ public final class Amqp {
}
/**
* Create an initial AmqpInboundPolledChannelAdapterSpec
* Create an initial AmqpInboundPolledChannelAdapterSpec.
* @param connectionFactory the connectionFactory.
* @param queue the queue.
* @return the AmqpInboundPolledChannelAdapterSpec.
@@ -168,7 +168,7 @@ public final class Amqp {
}
/**
* Create an initial AmqpInboundPolledChannelAdapterSpec
* Create an initial AmqpInboundPolledChannelAdapterSpec.
* @param connectionFactory the connectionFactory.
* @param ackCallbackFactory the ackCallbackFactory
* @param queue the queue.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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,6 +36,7 @@ import org.springframework.util.ErrorHandler;
* {@link org.springframework.integration.amqp.channel.PointToPointSubscribableAmqpChannel}.
*
* @param <S> the target {@link AmqpMessageChannelSpec} implementation type.
* @param <T> the target channel type.
*
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 the original author or authors.
* Copyright 2020-2021 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,7 @@ package org.springframework.integration.amqp.dsl;
import org.springframework.amqp.core.AmqpTemplate;
/**
* Spec for an outbound AMQP channel adapter
* Spec for an outbound AMQP channel adapter.
*
* @author Gary Russell
* @author Artme Bilan

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -33,6 +33,7 @@ import org.springframework.util.Assert;
* A {@link MessageChannelSpec} for a {@link AbstractAmqpChannel}s.
*
* @param <S> the target {@link AmqpPollableMessageChannelSpec} implementation type.
* @param <T> the target channel type.
*
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 the original author or authors.
* Copyright 2017-2021 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.
@@ -111,8 +111,8 @@ public class SimpleMessageListenerContainerSpec extends
* The batch size to use.
* @param batchSize the batchSize.
* @return the spec.
* @see SimpleMessageListenerContainer#setBatchSize(int)
* @since 5.2
* @see SimpleMessageListenerContainer#setBatchSize(int)
*/
public SimpleMessageListenerContainerSpec batchSize(int batchSize) {
this.listenerContainer.setBatchSize(batchSize);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -340,9 +340,9 @@ public class DefaultAmqpHeaderMapper extends AbstractHeaderMapper<MessagePropert
/**
* Construct a default inbound header mapper.
* @return the mapper.
* @since 4.3
* @see #inboundRequestHeaders()
* @see #inboundReplyHeaders()
* @since 4.3
*/
public static DefaultAmqpHeaderMapper inboundMapper() {
return new DefaultAmqpHeaderMapper(inboundRequestHeaders(), inboundReplyHeaders());
@@ -351,9 +351,9 @@ public class DefaultAmqpHeaderMapper extends AbstractHeaderMapper<MessagePropert
/**
* Construct a default outbound header mapper.
* @return the mapper.
* @since 4.3
* @see #outboundRequestHeaders()
* @see #outboundReplyHeaders()
* @since 4.3
*/
public static DefaultAmqpHeaderMapper outboundMapper() {
return new DefaultAmqpHeaderMapper(outboundRequestHeaders(), outboundReplyHeaders());

View File

@@ -73,7 +73,7 @@ public class CorrelatingMessageBarrier extends AbstractMessageHandler implements
/**
* Set the CorrelationStrategy to be used to determine the correlation key for incoming messages
* Set the CorrelationStrategy to be used to determine the correlation key for incoming messages.
* @param correlationStrategy The correlation strategy.
*/
public void setCorrelationStrategy(CorrelationStrategy correlationStrategy) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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,6 +31,8 @@ import org.springframework.messaging.Message;
/**
* A MessageListProcessor implementation that invokes a method on a target POJO.
*
* @param <T> the method evaluation expecetd result type.
*
* @author Dave Syer
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -57,7 +57,7 @@ public class ResequencingMessageHandler extends AbstractCorrelatingMessageHandle
/**
* Overridden to false for a resequencer so late messages are immediately discarded rather
* than waiting for the next timeout
* than waiting for the next timeout.
*/
@Override
public final void setExpireGroupsUponTimeout(boolean expireGroupsUponTimeout) {

View File

@@ -67,7 +67,7 @@ public @interface Router {
String defaultOutputChannel() default "";
/**
* The 'key=value' pairs to represent channelMapping entries
* The 'key=value' pairs to represent channelMapping entries.
* @return the channelMappings.
* @see org.springframework.integration.router.AbstractMappingMessageRouter#setChannelMapping(String, String)
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -40,7 +40,7 @@ public class DirectChannel extends AbstractSubscribableChannel {
private volatile Integer maxSubscribers;
/**
* Create a channel with default {@link RoundRobinLoadBalancingStrategy}
* Create a channel with default {@link RoundRobinLoadBalancingStrategy}.
*/
public DirectChannel() {
this(new RoundRobinLoadBalancingStrategy());

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -40,7 +40,7 @@ import org.springframework.messaging.MessageHeaders;
public class PriorityChannel extends QueueChannel {
/**
* PriorityBlockingQueue#DEFAULT_INITIAL_CAPACITY is private
* PriorityBlockingQueue#DEFAULT_INITIAL_CAPACITY is private.
*/
private static final int DEFAULT_INITIAL_CAPACITY = 11;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -28,7 +28,7 @@ import java.io.OutputStream;
*/
public interface Codec {
/**
* Encode (encode) an object to an OutputStream
* Encode (encode) an object to an OutputStream.
* @param object the object to encode
* @param outputStream the OutputStream
* @throws IOException if the operation fails
@@ -36,7 +36,7 @@ public interface Codec {
void encode(Object object, OutputStream outputStream) throws IOException;
/**
* Encode an object to a byte array
* Encode an object to a byte array.
* @param object the object to encode
* @return the bytes
* @throws IOException if the operation fails
@@ -44,7 +44,7 @@ public interface Codec {
byte[] encode(Object object) throws IOException;
/**
* Decode an object of a given type
* Decode an object of a given type.
* @param inputStream the input stream containing the encoded object
* @param type the object's class
* @param <T> the object's type
@@ -54,7 +54,7 @@ public interface Codec {
<T> T decode(InputStream inputStream, Class<T> type) throws IOException;
/**
* Decode an object of a given type
* Decode an object of a given type.
* @param bytes the byte array containing the encoded object
* @param type the object's class
* @param <T> the object's type

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -28,9 +28,10 @@ import org.springframework.messaging.support.GenericMessage;
import org.springframework.util.Assert;
/**
* A {@link MessageConverter} that delegates to a {@link Codec} to convert
* A {@link MessageConverter} that delegates to a {@link Codec} to convert.
*
* @author Gary Russell
*
* @since 4.2
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -51,6 +51,8 @@ import org.springframework.util.CollectionUtils;
/**
* Factory bean to create and configure a {@link MessageHandler}.
*
* @param <H> the target message handler type.
*
* @author Dave Syer
* @author Oleg Zhurakousky
* @author Gary Russell

View File

@@ -49,7 +49,7 @@ public final class IntegrationConfigUtils {
}
/**
* Register a {@link SpelFunctionFactoryBean} for the provided method signature
* Register a {@link SpelFunctionFactoryBean} for the provided method signature.
* @param registry the registry for bean to register
* @param functionId the bean name
* @param aClass the class for function

View File

@@ -97,6 +97,8 @@ import reactor.core.publisher.Flux;
/**
* Base class for Method-level annotation post-processors.
*
* @param <T> the target annotation type.
*
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +23,8 @@ import java.util.List;
/**
* Strategy interface for post-processing annotated methods.
*
* @param <T> the target annotation type.
*
* @author Mark Fisher
* @author Gary Russell
* @author Artem Bilan
@@ -36,7 +38,7 @@ public interface MethodAnnotationPostProcessor<T extends Annotation> {
* to create an {@link org.springframework.integration.endpoint.AbstractEndpoint}.
* @param method the method to check if it is eligible to create an Endpoint
* @param annotations the List of annotations to process
* @return the {@code boolean} flag to determine whether or not to create an
* @return the {@code boolean} flag to determine whether to create an
* {@link org.springframework.integration.endpoint.AbstractEndpoint}
* @since 4.0
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,7 +24,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.xml.ParserContext;
/**
* Parser for the top level 'wire-tap' element
* Parser for the top level 'wire-tap' element.
*
* @author David Turanski
* @author Artem Bilan

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,7 @@ import org.springframework.integration.util.AcceptOnceCollectionFilter;
import org.springframework.util.StringUtils;
/**
* Parser for 'resource-inbound-channel-adapter'
* Parser for 'resource-inbound-channel-adapter'.
*
* @author Oleg Zhurakousky
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -29,9 +29,10 @@ import org.springframework.integration.transaction.ExpressionEvaluatingTransacti
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
/**
* Parser for transaction-synchronizatioin-factory element
* Parser for transaction-synchronization-factory element.
*
* @author Oleg Zhurakousky
*
* @since 2.2
*
*/

View File

@@ -72,9 +72,6 @@ public abstract class IntegrationObjectSupport implements BeanNameAware, NamedCo
private static final IdGenerator ID_GENERATOR = new AlternativeJdkIdGenerator();
/**
* Logger that is available to subclasses
*/
protected final LogAccessor logger = new LogAccessor(getClass()); // NOSONAR protected
private final ConversionService defaultConversionService = DefaultConversionService.getSharedInstance();
@@ -292,10 +289,10 @@ public abstract class IntegrationObjectSupport implements BeanNameAware, NamedCo
}
/**
* @see IntegrationContextUtils#getIntegrationProperties(BeanFactory)
* @return The global integration properties.
* @deprecated since version 5.5 in favor of {@link #getIntegrationProperty(String, Class)};
* will be replaced with {@link IntegrationProperties} variant in the next major version.
* @see IntegrationContextUtils#getIntegrationProperties(BeanFactory)
*/
@Deprecated
protected Properties getIntegrationProperties() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +24,8 @@ import org.springframework.messaging.Message;
/**
* Base interface for any source of {@link Message Messages} that can be polled.
*
* @param <T> the expected payload type.
*
* @author Mark Fisher
* @author Artem Bilan
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -47,6 +47,8 @@ import org.springframework.util.StringUtils;
* The class is package-protected and only intended for use by the AbstractDispatcher. It
* <em>must</em> enforce safe concurrent access for all usage by the dispatcher.
*
* @param <E> collection element type.
*
* @author Oleg Zhurakousky
* @author Mark Fisher
* @author Diego Belfer

View File

@@ -896,7 +896,7 @@ public abstract class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlo
* {@code
* .handle(Amqp.outboundAdapter(this.amqpTemplate).routingKeyExpression("headers.routingKey"))
* }
* </pre>
* </pre>.
* @param messageHandlerSpec the {@link MessageHandlerSpec} to configure protocol specific
* {@link MessageHandler}.
* @param <H> the target {@link MessageHandler} type.
@@ -1747,7 +1747,7 @@ public abstract class BaseIntegrationFlowDefinition<B extends BaseIntegrationFlo
}
/**
* A short-cut for the {@code aggregate((aggregator) -> aggregator.processor(aggregatorProcessor))}
* A short-cut for the {@code aggregate((aggregator) -> aggregator.processor(aggregatorProcessor))}.
* @param aggregatorProcessor the POJO representing aggregation strategies.
* @return the current {@link BaseIntegrationFlowDefinition}.
* @since 5.5

View File

@@ -340,8 +340,8 @@ public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,
* @param expireTimeout the timeout in milliseconds to use.
* @return the endpoint spec.
* @since 5.4
* @see AbstractCorrelatingMessageHandler#setExpireTimeout(long)
* @deprecated since 5.5 in favor of {@link #expireTimeout(long)}
* @see AbstractCorrelatingMessageHandler#setExpireTimeout(long)
*/
@Deprecated
public S setExpireTimeout(long expireTimeout) {
@@ -365,8 +365,8 @@ public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,
* @param expireDuration the duration for scheduled purge task.
* @return the endpoint spec.
* @since 5.4
* @see AbstractCorrelatingMessageHandler#setExpireDuration(Duration)
* @deprecated since 5.5 in favor of {@link #expireDuration(Duration)}
* @see AbstractCorrelatingMessageHandler#setExpireDuration(Duration)
*/
@Deprecated
public S setExpireDuration(Duration expireDuration) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -111,9 +111,9 @@ public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpe
* within the transaction.
* @param channel the channel.
* @return the endpoint spec.
* @since 5.0.8
* @see #maxAttempts(int)
* @see #retryDelay(long)
* @since 5.0.8
*/
public DelayerEndpointSpec delayedMessageErrorChannel(MessageChannel channel) {
this.handler.setDelayedMessageErrorChannel(channel);
@@ -129,9 +129,9 @@ public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpe
* within the transaction.
* @param channel the channel name.
* @return the endpoint spec.
* @since 5.0.8
* @see #maxAttempts(int)
* @see #retryDelay(long)
* @since 5.0.8
*/
public DelayerEndpointSpec delayedMessageErrorChannel(String channel) {
this.handler.setDelayedMessageErrorChannelName(channel);
@@ -143,8 +143,8 @@ public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpe
* Default {@value DelayHandler#DEFAULT_MAX_ATTEMPTS}.
* @param maxAttempts the max attempts.
* @return the endpoint spec.
* @see #retryDelay(long)
* @since 5.0.8
* @see #retryDelay(long)
*/
public DelayerEndpointSpec maxAttempts(int maxAttempts) {
this.handler.setMaxAttempts(maxAttempts);
@@ -156,8 +156,8 @@ public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpe
* Default {@value DelayHandler#DEFAULT_RETRY_DELAY}.
* @param retryDelay the retry delay.
* @return the endpoint spec.
* @see #maxAttempts(int)
* @since 5.0.8
* @see #maxAttempts(int)
*/
public DelayerEndpointSpec retryDelay(long retryDelay) {
this.handler.setRetryDelay(retryDelay);
@@ -184,8 +184,8 @@ public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpe
* {@link org.springframework.messaging.MessageHandler}.
* @param transactionInterceptor the {@link TransactionInterceptor} to use.
* @return the spec.
* @see TransactionInterceptorBuilder
* @since 5.0.8
* @see TransactionInterceptorBuilder
*/
public DelayerEndpointSpec transactionalRelease(TransactionInterceptor transactionInterceptor) {
return delayedAdvice(transactionInterceptor);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -98,8 +98,8 @@ public class EnricherSpec extends ConsumerEndpointSpec<EnricherSpec, ContentEnri
/**
* @param errorChannel the error channel.
* @return the enricher spec.
* @see ContentEnricher#setErrorChannel(MessageChannel)
* @since 5.0.1
* @see ContentEnricher#setErrorChannel(MessageChannel)
*/
public EnricherSpec errorChannel(MessageChannel errorChannel) {
this.handler.setErrorChannel(errorChannel);
@@ -109,8 +109,8 @@ public class EnricherSpec extends ConsumerEndpointSpec<EnricherSpec, ContentEnri
/**
* @param errorChannel the name of the error channel bean.
* @return the enricher spec.
* @see ContentEnricher#setErrorChannelName(String)
* @since 5.0.1
* @see ContentEnricher#setErrorChannelName(String)
*/
public EnricherSpec errorChannel(String errorChannel) {
this.handler.setErrorChannelName(errorChannel);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 the original author or authors.
* Copyright 2019-2021 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.
@@ -268,8 +268,8 @@ public class GatewayProxySpec implements ComponentsRegistration {
* Indicate if {@code default} methods on the interface should be proxied as well.
* @param proxyDefaultMethods the boolean flag to proxy default methods or invoke via {@code MethodHandle}.
* @return current {@link GatewayProxySpec}.
* @see GatewayProxyFactoryBean#setProxyDefaultMethods(boolean)
* @since 5.3
* @see GatewayProxyFactoryBean#setProxyDefaultMethods(boolean)
*/
public GatewayProxySpec proxyDefaultMethods(boolean proxyDefaultMethods) {
this.gatewayProxyFactoryBean.setProxyDefaultMethods(proxyDefaultMethods);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -352,8 +352,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param correlationIdFunction the function.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec correlationIdFunction(Function<Message<P>, Object> correlationIdFunction) {
return correlationIdFunction(correlationIdFunction, null);
@@ -366,8 +366,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param overwrite true to overwrite an existing header.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec correlationIdFunction(Function<Message<P>, ?> correlationIdFunction,
Boolean overwrite) {
@@ -430,8 +430,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param replyChannelFunction the function.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec replyChannelFunction(Function<Message<P>, Object> replyChannelFunction) {
return replyChannelFunction(replyChannelFunction, null);
@@ -444,8 +444,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param overwrite true to overwrite an existing header.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec replyChannelFunction(Function<Message<P>, ?> replyChannelFunction,
Boolean overwrite) {
@@ -508,8 +508,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param errorChannelFunction the function.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec errorChannelFunction(Function<Message<P>, Object> errorChannelFunction) {
return errorChannelFunction(errorChannelFunction, null);
@@ -522,8 +522,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param overwrite true to overwrite an existing header.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec errorChannelFunction(Function<Message<P>, ?> errorChannelFunction,
Boolean overwrite) {
@@ -586,8 +586,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param priorityFunction the function.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec priorityFunction(Function<Message<P>, Object> priorityFunction) {
return priorityFunction(priorityFunction, null);
@@ -600,8 +600,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param overwrite true to overwrite an existing header.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec priorityFunction(Function<Message<P>, ?> priorityFunction, Boolean overwrite) {
return headerFunction(IntegrationMessageHeaderAccessor.PRIORITY, priorityFunction, overwrite);
@@ -664,8 +664,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param expirationDateFunction the function.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec expirationDateFunction(Function<Message<P>, Object> expirationDateFunction) {
return expirationDateFunction(expirationDateFunction, null);
@@ -678,8 +678,8 @@ public class HeaderEnricherSpec extends ConsumerEndpointSpec<HeaderEnricherSpec,
* @param overwrite true to overwrite an existing header.
* @param <P> the payload type.
* @return the header enricher spec.
* @see FunctionExpression
* @since 5.2
* @see FunctionExpression
*/
public <P> HeaderEnricherSpec expirationDateFunction(Function<Message<P>, ?> expirationDateFunction,
Boolean overwrite) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2021 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.
@@ -70,7 +70,7 @@ public abstract class MessageProducerSpec<S extends MessageProducerSpec<S, P>, P
/**
* Specify the {@code outputChannel} for the
* {@link org.springframework.integration.core.MessageProducer}
* {@link org.springframework.integration.core.MessageProducer}.
* @param outputChannel the outputChannel.
* @return the spec.
* @see MessageProducerSupport#setOutputChannel(MessageChannel)
@@ -82,7 +82,7 @@ public abstract class MessageProducerSpec<S extends MessageProducerSpec<S, P>, P
/**
* Specify the bean name of the {@code outputChannel} for the
* {@link org.springframework.integration.core.MessageProducer}
* {@link org.springframework.integration.core.MessageProducer}.
* @param outputChannel the outputChannel bean name.
* @return the spec.
* @see MessageProducerSupport#setOutputChannelName(String)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 the original author or authors.
* Copyright 2020-2021 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,6 +25,9 @@ import org.springframework.messaging.ReactiveMessageHandler;
/**
* The {@link MessageHandlerSpec} extension for {@link ReactiveMessageHandler}.
*
* @param <S> the target spec type.
* @param <H> the target message handler type.
*
* @author Artem Bilan
*
* @since 5.4

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 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.
@@ -162,8 +162,8 @@ public final class RouterSpec<K, R extends AbstractMappingMessageRouter>
* @param key the key.
* @param channel the {@link MessageChannel} instance to use.
* @return the router spec.
* @see AbstractMappingMessageRouter#setChannelMapping(String, String)
* @since 5.2
* @see AbstractMappingMessageRouter#setChannelMapping(String, String)
*/
public RouterSpec<K, R> channelMapping(K key, final MessageChannel channel) {
Assert.notNull(key, "'key' must not be null");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2020 the original author or authors.
* Copyright 2018-2021 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.
@@ -218,8 +218,8 @@ public interface IntegrationFlowContext {
* while retaining the ability to reference beans within the flow; adding the unique
* flow id to the bean name makes the name unique.
* @return the current builder instance.
* @see #id(String)
* @since 5.0.6
* @see #id(String)
*/
default IntegrationFlowRegistrationBuilder useFlowIdAsPrefix() {
return this;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2021 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,9 +21,11 @@ import org.springframework.integration.support.management.MessageSourceManagemen
/**
* A message source that can limit the number of remote objects it fetches.
*
* @author Gary Russell
* @since 5.0
* @param <T> the expected payload type.
*
* @author Gary Russell
*
* @since 5.0
*/
public abstract class AbstractFetchLimitingMessageSource<T> extends AbstractMessageSource<T>
implements MessageSourceManagement {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,8 +21,11 @@ import org.springframework.integration.context.ExpressionCapable;
import org.springframework.util.Assert;
/**
* @param <T> the expected payload type.
*
* @author Mark Fisher
* @author Gary Russell
*
* @since 2.0
*/
public class ExpressionEvaluatingMessageSource<T> extends AbstractMessageSource<T> implements ExpressionCapable {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 the original author or authors.
* Copyright 2020-2021 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.
@@ -27,7 +27,7 @@ import reactor.core.publisher.Flux;
/**
* The {@link MessageProducerSupport} to adapt a provided {@link MessageSource}
* into a {@link Flux} and let it be subscribed in the {@link #subscribeToPublisher}
* into a {@link Flux} and let it be subscribed in the {@link #subscribeToPublisher}.
*
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -76,17 +76,17 @@ public class ReloadableResourceBundleExpressionSource implements ExpressionSourc
/**
* Cache to hold filename lists per Locale
* Cache to hold filename lists per Locale.
*/
private final Map<String, Map<Locale, List<String>>> cachedFilenames = new HashMap<>();
/**
* Cache to hold already loaded properties per filename
* Cache to hold already loaded properties per filename.
*/
private final Map<String, PropertiesHolder> cachedProperties = new HashMap<>();
/**
* Cache to hold merged loaded properties per locale
* Cache to hold merged loaded properties per locale.
*/
private final Map<Locale, PropertiesHolder> cachedMergedProperties = new HashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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,14 @@ import org.springframework.util.Assert;
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 4.0
*/
public class ValueExpression<V> implements Expression {
/** Fixed value of this expression */
/**
* Fixed value of this expression.
*/
private final V value;
private final Class<V> aClass;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -27,15 +27,13 @@ import org.springframework.util.Assert;
* @author Oleg Zhurakousky
* @author Mark Fisher
* @author Gary Russell
*
* @since 2.0
*/
class RequestReplyMessageHandlerAdapter extends AbstractReplyProducingMessageHandler {
private final RequestReplyExchanger exchanger;
/**
* @param exchanger
*/
RequestReplyMessageHandlerAdapter(RequestReplyExchanger exchanger) {
Assert.notNull(exchanger, "exchanger must not be null");
this.exchanger = exchanger;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +21,8 @@ import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
/**
* @param <T> the expected payload type.
*
* @author Mark Fisher
* @author Dave Syer
* @author Artem Bilan

View File

@@ -117,9 +117,9 @@ public abstract class AbstractMessageProducingHandler extends AbstractMessageHan
}
/**
* @see #setAsync(boolean)
* @return true if this handler supports async replies.
* @since 4.3
* @see #setAsync(boolean)
*/
protected boolean isAsync() {
return this.async;

View File

@@ -227,9 +227,9 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
* If there is a transaction advice on the release task, the error flow is called
* within the transaction.
* @param delayedMessageErrorChannel the channel.
* @since 5.0.8
* @see #setMaxAttempts(int)
* @see #setRetryDelay(long)
* @since 5.0.8
*/
public void setDelayedMessageErrorChannel(MessageChannel delayedMessageErrorChannel) {
this.delayedMessageErrorChannel = delayedMessageErrorChannel;
@@ -242,9 +242,9 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
* If there is a transaction advice on the release task, the error flow is called
* within the transaction.
* @param delayedMessageErrorChannelName the channel name.
* @since 5.0.8
* @see #setMaxAttempts(int)
* @see #setRetryDelay(long)
* @since 5.0.8
*/
public void setDelayedMessageErrorChannelName(String delayedMessageErrorChannelName) {
this.delayedMessageErrorChannelName = delayedMessageErrorChannelName;
@@ -254,8 +254,8 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
* Set the maximum number of release attempts for when message release fails. Default
* {@value #DEFAULT_MAX_ATTEMPTS}.
* @param maxAttempts the max attempts.
* @see #setRetryDelay(long)
* @since 5.0.8
* @see #setRetryDelay(long)
*/
public void setMaxAttempts(int maxAttempts) {
this.maxAttempts = maxAttempts;
@@ -265,8 +265,8 @@ public class DelayHandler extends AbstractReplyProducingMessageHandler implement
* Set an additional delay to apply when retrying after a release failure. Default
* {@value #DEFAULT_RETRY_DELAY}.
* @param retryDelay the retry delay.
* @see #setMaxAttempts(int)
* @since 5.0.8
* @see #setMaxAttempts(int)
*/
public void setRetryDelay(long retryDelay) {
this.retryDelay = retryDelay;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,23 +26,24 @@ import org.springframework.util.Assert;
*
* @author Artem Bilan
* @author Gary Russell
* @see MethodInvokingMessageHandler
*
* @since 2.1
*
* @see MethodInvokingMessageHandler
*/
public class ExpressionEvaluatingMessageHandler extends AbstractMessageHandler {
private volatile ExpressionEvaluatingMessageProcessor<Void> processor;
private final ExpressionEvaluatingMessageProcessor<Void> processor;
private volatile String componentType;
private String componentType;
public ExpressionEvaluatingMessageHandler(Expression expression) {
Assert.notNull(expression, "'expression' must not be null");
this.processor = new ExpressionEvaluatingMessageProcessor<Void>(expression, Void.class);
this.processor = new ExpressionEvaluatingMessageProcessor<>(expression, Void.class);
setPrimaryExpression(expression);
}
public void setComponentType(String componentType) {
this.componentType = componentType;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +26,8 @@ import org.springframework.util.Assert;
* A {@link MessageProcessor} implementation that evaluates a SpEL expression
* with the Message itself as the root object within the evaluation context.
*
* @param <T> the expected payload type.
*
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell

View File

@@ -161,10 +161,6 @@ public class MessageHandlerChain extends AbstractMessageProducingHandler
return false;
}
/**
* SmartLifecycle implementation (delegates to the {@link #handlers})
*/
@Override
public final boolean isRunning() {
this.lifecycleLock.lock();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -37,6 +37,8 @@ import org.springframework.messaging.Message;
* internal "support" API, intended for use by Spring Integration's various
* message-handling components. As such, it is subject to change.
*
* @param <T> the expected payload type.
*
* @author Mark Fisher
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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,6 +36,8 @@ import org.springframework.messaging.Message;
* SpEL's method resolution are determined by the presence of that
* annotation rather than the method name.
*
* @param <T> the expected payload type.
*
* @author Dave Syer
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -128,8 +128,8 @@ public class IdempotentReceiverInterceptor extends AbstractHandleMessageAdvice {
* Only applies if a {@link #setDiscardChannel(MessageChannel) discardChannel}
* is not provided.
* @param discardChannelName The discard channel name.
* @see #setThrowExceptionOnRejection(boolean)
* @since 5.0.1
* @see #setThrowExceptionOnRejection(boolean)
*/
public void setDiscardChannelName(String discardChannelName) {
this.discardChannelName = discardChannelName;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -96,8 +96,7 @@ public class ObjectToJsonTransformer extends AbstractTransformer {
}
/**
* Sets the content-type header value
*
* Set the content-type header value.
* @param contentType The content type.
*/
public void setContentType(String contentType) {

View File

@@ -43,6 +43,8 @@ import org.springframework.util.StringUtils;
/**
* Abstract base class for {@link RequestReplyHeaderMapper} implementations.
*
* @param <T> the target headers container type.
*
* @author Mark Fisher
* @author Oleg Zhurakousky
* @author Stephane Nicoll

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 the original author or authors.
* Copyright 2020-2021 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.
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* {@link MessageConverter#fromMessage(Message, Class)} and {@link MessageConverter#toMessage(Object, MessageHeaders)}
* methods.
* <p>
* If {@link MessageConverter#fromMessage(Message, Class)} returns {@link String}, it is converted to {@link byte[]}
* If {@link MessageConverter#fromMessage(Message, Class)} returns {@link String}, it is converted to {@code byte[]}
* using a {@link StandardCharsets#UTF_8} encoding.
*
* @author Artem Bilan

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,9 +25,9 @@ import org.springframework.messaging.MessageHeaders;
* types of objects. This would typically be used by adapters where the "other type"
* has a concept of headers or properties (HTTP, JMS, AMQP, etc).
*
* @author Mark Fisher
*
* @param <T> type of the instance to and from which headers will be mapped.
*
* @author Mark Fisher
*/
public interface HeaderMapper<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +24,8 @@ import org.springframework.messaging.Message;
/**
* Strategy interface for mapping from an Object to a{@link Message}.
*
* @param <T> the type of object to create message from.
*
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +22,8 @@ import org.springframework.messaging.Message;
/**
* Strategy interface for mapping from a {@link Message} to an Object.
*
* @param <T> the target result type.
*
* @author Mark Fisher
* @author Gary Russell
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -29,7 +29,9 @@ import org.springframework.messaging.support.GenericMessage;
* Contains the result of the expression evaluation in the payload
* and the original message that the advice passed to the
* handler.
* .
*
* @param <T> the payload type.
*
* @author Gary Russell
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,20 +22,19 @@ package org.springframework.integration.metadata;
* invoked when changes occur in the metadata store.
*
* @author Marius Bogoevici
*
* @since 4.2
*/
public interface ListenableMetadataStore extends ConcurrentMetadataStore {
/**
* Registers a listener with the metadata store
*
* Register a listener with the metadata store.
* @param callback the callback to be registered
*/
void addListener(MetadataStoreListener callback);
/**
* Unregisters a listener
*
* Unregister a listener.
* @param callback the callback to be unregistered
*/
void removeListener(MetadataStoreListener callback);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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,30 +20,30 @@ package org.springframework.integration.metadata;
* A callback to be invoked whenever a value changes in the data store.
*
* @author Marius Bogoevici
*
* @since 4.2
*/
public interface MetadataStoreListener {
/**
* Invoked when a key is added to the store
*
* Invoked when a key is added to the store.
* @param key the key being added
* @param value the value being added
*/
void onAdd(String key, String value);
/**
* Invoked when a key is removed from the store
*
* Invoked when a key is removed from the store.
* @param key the key being removed
* @param oldValue the value being removed
*/
void onRemove(String key, String oldValue);
/**
* Invoked when a key is updated into the store
* Invoked when a key is updated into the store.
* @param key the key being updated
* @param newValue the new value
*/
void onUpdate(String key, String newValue);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -136,7 +136,7 @@ public abstract class AbstractMessageRouter extends AbstractMessageHandler imple
}
/**
* Provides {@link MessagingTemplate} access for subclasses
* Provide {@link MessagingTemplate} access for subclasses.
* @return The messaging template.
*/
protected MessagingTemplate getMessagingTemplate() {

View File

@@ -31,7 +31,7 @@ import org.springframework.messaging.Message;
import org.springframework.util.Assert;
/**
* Base class for implementations of Key/Value style {@link MessageGroupStore} and {@link MessageStore}
* Base class for implementations of Key/Value style {@link MessageGroupStore} and {@link MessageStore}.
*
* @author Oleg Zhurakousky
* @author Gary Russell

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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,14 +23,14 @@ import org.springframework.messaging.Message;
* Defines a minimal message group store with basic capabilities.
*
* @author Gary Russell
*
* @since 4.0
*
*/
public interface BasicMessageGroupStore {
/**
* Returns the size of this MessageGroup.
*
* Return the size of this MessageGroup.
* @param groupId The group identifier.
* @return The size.
*/
@@ -40,7 +40,6 @@ public interface BasicMessageGroupStore {
/**
* Return all Messages currently in the MessageStore that were stored using
* {@link #addMessageToGroup(Object, Message)} with this group id.
*
* @param groupId The group identifier.
* @return A group of messages, empty if none exists for this key.
*/
@@ -48,7 +47,6 @@ public interface BasicMessageGroupStore {
/**
* Store a message with an association to a group id. This can be used to group messages together.
*
* @param groupId The group id to store the message under.
* @param message A message.
* @return The message group.
@@ -56,9 +54,8 @@ public interface BasicMessageGroupStore {
MessageGroup addMessageToGroup(Object groupId, Message<?> message);
/**
* Polls Message from this {@link MessageGroup} (in FIFO style if supported by the implementation)
* while also removing the polled {@link Message}
*
* Poll Message from this {@link MessageGroup} (in FIFO style if supported by the implementation)
* while also removing the polled {@link Message}.
* @param groupId The group identifier.
* @return The message.
*/
@@ -66,7 +63,6 @@ public interface BasicMessageGroupStore {
/**
* Remove the message group with this id.
*
* @param groupId The id of the group to remove.
*/
void removeMessageGroup(Object groupId);

View File

@@ -58,7 +58,7 @@ public interface MessageGroup {
boolean remove(Message<?> messageToRemove);
/**
* Return all available Messages from the group at the time of invocation
* Return all available Messages from the group at the time of invocation.
* @return The messages.
*/
Collection<Message<?>> getMessages();

View File

@@ -350,7 +350,7 @@ public class MessageGroupQueue extends AbstractQueue<Message<?>> implements Bloc
/**
* It is assumed that the 'storeLock' is being held by the caller, otherwise
* IllegalMonitorStateException may be thrown
* IllegalMonitorStateException may be thrown.
* @return a message // TODO @Nullable
*/
protected Message<?> doPoll() {
@@ -361,7 +361,7 @@ public class MessageGroupQueue extends AbstractQueue<Message<?>> implements Bloc
/**
* It is assumed that the 'storeLock' is being held by the caller, otherwise
* IllegalMonitorStateException may be thrown
* IllegalMonitorStateException may be thrown.
* @param message the message to offer.
* @return true if offered.
*/

View File

@@ -90,13 +90,13 @@ public class SimpleMessageStore extends AbstractMessageGroupStore
}
/**
* Creates a SimpleMessageStore with a maximum size limited by the given capacity and the timeout in millisecond
* Create a SimpleMessageStore with a maximum size limited by the given capacity and the timeout in millisecond
* to wait for the empty slot in the store.
* @param individualCapacity The message capacity.
* @param groupCapacity The capacity of each group.
* @param upperBoundTimeout The time to wait if the store is at max capacity.
* @see #SimpleMessageStore(int, int)
* @since 4.3
* @see #SimpleMessageStore(int, int)
*/
public SimpleMessageStore(int individualCapacity, int groupCapacity, long upperBoundTimeout) {
this(individualCapacity, groupCapacity, upperBoundTimeout, new DefaultLockRegistry());
@@ -145,14 +145,14 @@ public class SimpleMessageStore extends AbstractMessageGroupStore
}
/**
* Creates a SimpleMessageStore with unlimited capacity
* Create a SimpleMessageStore with unlimited capacity.
*/
public SimpleMessageStore() {
this(0);
}
/**
* Set to false to disable copying the group in {@link #getMessageGroup(Object)}.
* Set as false to disable copying the group in {@link #getMessageGroup(Object)}.
* Starting with 4.1, this is false by default.
* @param copyOnGet True to copy, false to not.
* @since 4.0.1

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -34,6 +34,8 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.PatternMatchUtils;
/**
* @param <T> the payload type.
*
* @author Gary Russell
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2021 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.
@@ -27,13 +27,14 @@ import org.springframework.util.IdGenerator;
*
* @author Andy Wilkinson
* @author Gary Russell
*
* @since 4.0
*
*/
public class IdGenerators {
/**
* UUID.randomUUID()
* UUID.randomUUID().
*
*/
public static class JdkIdGenerator implements IdGenerator {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@@ -39,6 +39,8 @@ import org.springframework.util.ObjectUtils;
* Named MessageBuilder instead of DefaultMessageBuilder for backwards
* compatibility.
*
* @param <T> the payload type.
*
* @author Arjen Poutsma
* @author Mark Fisher
* @author Oleg Zhurakousky

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 the original author or authors.
* Copyright 2014-2021 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.
@@ -42,6 +42,8 @@ import org.springframework.util.ObjectUtils;
* <b>It is generally recommended that messages transferred between components should
* always be immutable unless great care is taken with their use.</b>
*
* @param <T> the payload type.
*
* @author Gary Russell
* @author Artem Bilan
* @author Stuart Williams

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 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.
@@ -41,6 +41,8 @@ import org.springframework.util.StringUtils;
* <b>It is generally recommended that messages transferred between components should
* always be immutable unless great care is taken with their use.</b>
*
* @param <T> the payload type.
*
* @author Gary Russell
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -72,7 +72,7 @@ public class PartialSuccessException extends MessagingException {
}
/**
* Convenience version of {@link #getPartialResults()} to avoid casting
* Convenience version of {@link #getPartialResults()} to avoid casting.
* @param clazz the type.
* @param <T> the result type.
* @return the partial results.
@@ -83,7 +83,7 @@ public class PartialSuccessException extends MessagingException {
}
/**
* Convenience version of {@link #getDerivedInput()} to avoid casting
* Convenience version of {@link #getDerivedInput()} to avoid casting.
* @param clazz the type.
* @param <T> the type of input.
* @return the partial results.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +31,8 @@ import org.springframework.messaging.Message;
/**
* Base {@link JsonInboundMessageMapper.JsonMessageParser} implementation for Jackson processors.
*
* @param <P> the payload type.
*
* @author Artem Bilan
*
* @since 3.0

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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.
@@ -28,16 +28,20 @@ import org.springframework.util.Assert;
* Abstract {@link InboundMessageMapper} implementation that maps incoming JSON messages
* to a {@link org.springframework.messaging.Message} with the specified payload type.
*
* @param <P> the payload type.
*
* @author Artem Bilan
* @author Gary Russell
*
* @since 3.0
*
* @see JsonInboundMessageMapper
*/
public abstract class AbstractJsonInboundMessageMapper<P> implements InboundMessageMapper<String> {
protected static final String MESSAGE_FORMAT_ERROR = "JSON message is invalid. Expected a message in the format of either " +
"{\"headers\":{...},\"payload\":{...}} or {\"payload\":{...}.\"headers\":{...}} but was ";
protected static final String MESSAGE_FORMAT_ERROR =
"JSON message is invalid. Expected a message in the format of either " +
"{\"headers\":{...},\"payload\":{...}} or {\"payload\":{...}.\"headers\":{...}} but was ";
protected static final Map<String, Class<?>> DEFAULT_HEADER_TYPES = new HashMap<String, Class<?>>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2021 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.
@@ -34,6 +34,8 @@ import com.fasterxml.jackson.databind.type.TypeFactory;
/**
* A Jackson {@link StdNodeBasedDeserializer} extension for {@link Message} implementations.
*
* @param <T> the message type.
*
* @author Artem Bilan
*
* @since 4.3.10

View File

@@ -108,7 +108,7 @@ public class LockRegistryLeaderInitiator implements SmartLifecycle, DisposableBe
/**
* Flag to denote whether the {@link ExecutorService} was provided via the setter and
* thus should not be shutdown when {@link #destroy()} is called
* thus should not be shutdown when {@link #destroy()} is called.
*/
private boolean executorServiceExplicitlySet;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,10 +19,11 @@ package org.springframework.integration.support.locks;
import java.util.concurrent.locks.Lock;
/**
* Strategy for maintaining a registry of shared locks
* Strategy for maintaining a registry of shared locks.
*
* @author Oleg Zhurakousky
* @author Gary Russell
*
* @since 2.1.1
*/
@FunctionalInterface

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 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.
@@ -79,7 +79,7 @@ public interface IntegrationManagement extends NamedComponent, DisposableBean {
}
/**
* Inject a {@link MetricsCaptor}
* Inject a {@link MetricsCaptor}.
* @param captor the captor.
* @since 5.0.4
*/

View File

@@ -115,7 +115,7 @@ public final class IntegrationUtils {
}
/**
* Utility method for null-safe conversion from String to byte[]
* Utility method for null-safe conversion from String to byte[].
* @param value the String to be converted
* @param encoding the encoding
* @return the byte[] corresponding to the given String and encoding, null if provided String argument was null
@@ -131,7 +131,7 @@ public final class IntegrationUtils {
}
/**
* Utility method for null-safe conversion from byte[] to String
* Utility method for null-safe conversion from byte[] to String.
* @param bytes the byte[] to be converted
* @param encoding the encoding
* @return the String corresponding to the given byte[] and encoding, null if provided byte[] argument was null

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2019 the original author or authors.
* Copyright 2017-2021 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.
@@ -42,8 +42,8 @@ public final class PatternMatchUtils {
* @param str the string to match.
* @param patterns the patterns.
* @return true for positive match; false for negative; null if no pattern matches.
* @see org.springframework.util.PatternMatchUtils#simpleMatch(String[], String)
* @since 5.0.5
* @see org.springframework.util.PatternMatchUtils#simpleMatch(String[], String)
*/
public static Boolean smartMatchIgnoreCase(String str, String... patterns) {
if (patterns != null) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,10 +25,11 @@ import org.springframework.transaction.support.ResourceHolder;
/**
* An implementation of the {@link ResourceHolder} which holds an instance of the current Message
* and the synchronization resource
* and the synchronization resource.
*
* @author Gary Russell
* @author Oleg Zhurakousky
*
* @since 2.2
*
*/
@@ -40,7 +41,7 @@ public class IntegrationResourceHolder implements ResourceHolder {
private volatile Message<?> message;
private final Map<String, Object> attributes = new HashMap<String, Object>();
private final Map<String, Object> attributes = new HashMap<>();
public void setMessage(Message<?> message) {
this.message = message;
@@ -51,8 +52,7 @@ public class IntegrationResourceHolder implements ResourceHolder {
}
/**
* Adds attribute to this {@link ResourceHolder} instance
*
* Add attribute to this {@link ResourceHolder} instance.
* @param key The key.
* @param value The value.
*/
@@ -63,7 +63,6 @@ public class IntegrationResourceHolder implements ResourceHolder {
/**
* Will return an immutable Map of current attributes.
* If you need to add an attribute, use the {@link #addAttribute(String, Object)} method.
*
* @return the immutable map.
*/
public Map<String, Object> getAttributes() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,14 +17,17 @@
package org.springframework.integration.transaction;
import org.springframework.transaction.support.TransactionSynchronization;
/**
* Strategy for implementing factories that create {@link TransactionSynchronization}
* Strategy for implementing factories that create {@link TransactionSynchronization}.
*
* @author Oleg Zhurakousky
*
* @since 2.2
*
*/
public interface TransactionSynchronizationFactory {
TransactionSynchronization create(Object key);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,11 @@
package org.springframework.integration.transaction;
/**
* Strategy for implementing transaction synchronization processors
* Strategy for implementing transaction synchronization processors.
*
* @author Oleg Zhurakousky
* @author Gary Russell
*
* @since 2.2
*
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +24,9 @@ import org.springframework.messaging.Message;
* used as the result. Otherwise, the return value will be used as the payload
* of the result Message.
*
* @param <T> inbound payload type.
* @param <U> outbound payload type.
*
* @author Mark Fisher
*/
public abstract class AbstractPayloadTransformer<T, U> extends AbstractTransformer {

View File

@@ -64,7 +64,7 @@ import org.springframework.util.ReflectionUtils;
public class ContentEnricher extends AbstractReplyProducingMessageHandler implements ManageableLifecycle {
/**
* Customized SpelExpressionParser to allow to specify nested properties when parent is null
* Customized SpelExpressionParser to allow to specify nested properties when parent is null.
*/
private static final SpelExpressionParser SPEL_PARSER =
new SpelExpressionParser(new SpelParserConfiguration(true, true));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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.
@@ -30,9 +30,11 @@ import org.springframework.util.Assert;
* {@link AbstractPayloadTransformer} that delegates to a codec to decode the
* payload from a byte[].
*
* @author Gary Russell
* @since 4.2
* @param <T> the payload type.
*
* @author Gary Russell
*
* @since 4.2
*/
public class DecodingTransformer<T> extends AbstractTransformer {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2019 the original author or authors.
* Copyright 2015-2021 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,9 +26,11 @@ import org.springframework.util.Assert;
* {@link AbstractPayloadTransformer} that delegates to a codec to encode the
* payload into a byte[].
*
* @author Gary Russell
* @since 4.2
* @param <T> inbound payload type.
*
* @author Gary Russell
*
* @since 4.2
*/
public class EncodingPayloadTransformer<T> extends AbstractPayloadTransformer<T, byte[]> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,6 +23,9 @@ import org.springframework.util.Assert;
* Transformer that converts the inbound payload to an object by delegating to a
* Converter&lt;Object, Object&gt;. A reference to the delegate must be provided.
*
* @param <T> inbound payload type.
* @param <U> outbound payload type.
*
* @author Gary Russell
* @author Artem Bilan
*

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2021 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,19 +17,23 @@
package org.springframework.integration.transformer.support;
/**
* @param <T> inbound payload type.
*
* @author Mark Fisher
* @author Artem Bilan
*
* @since 3.0
*/
public abstract class AbstractHeaderValueMessageProcessor<T> implements HeaderValueMessageProcessor<T> {
// null indicates no explicit setting
private volatile Boolean overwrite = null;
private Boolean overwrite = null;
public void setOverwrite(Boolean overwrite) {
this.overwrite = overwrite;
}
@Override
public Boolean isOverwrite() {
return this.overwrite;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2020 the original author or authors.
* Copyright 2013-2021 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,6 +26,8 @@ import org.springframework.integration.handler.ExpressionEvaluatingMessageProces
import org.springframework.messaging.Message;
/**
* @param <T> ther paylaod type.
*
* @author Mark Fisher
* @author Artem Bilan
*
@@ -34,8 +36,8 @@ import org.springframework.messaging.Message;
public class ExpressionEvaluatingHeaderValueMessageProcessor<T> extends AbstractHeaderValueMessageProcessor<T>
implements BeanFactoryAware {
private static final ExpressionParser EXPRESSION_PARSER = new SpelExpressionParser(new SpelParserConfiguration(
true, true));
private static final ExpressionParser EXPRESSION_PARSER =
new SpelExpressionParser(new SpelParserConfiguration(true, true));
private final ExpressionEvaluatingMessageProcessor<T> targetProcessor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2021 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,8 +19,11 @@ package org.springframework.integration.transformer.support;
import org.springframework.integration.handler.MessageProcessor;
/**
* @param <T> the payload type.
*
* @author Mark Fisher
* @author Artem Bilan
*
* @since 3.0
*/
public interface HeaderValueMessageProcessor<T> extends MessageProcessor<T> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-2021 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,8 +19,11 @@ package org.springframework.integration.transformer.support;
import org.springframework.messaging.Message;
/**
* @param <T> the value type.
*
* @author Mark Fisher
* @author Artem Bilan
*
* @since 3.0
*/
public class StaticHeaderValueMessageProcessor<T> extends AbstractHeaderValueMessageProcessor<T> {
@@ -31,7 +34,9 @@ public class StaticHeaderValueMessageProcessor<T> extends AbstractHeaderValueMes
this.value = value;
}
@Override
public T processMessage(Message<?> message) {
return this.value;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,10 @@ import java.util.List;
* An implementation of {@link CollectionFilter} that remembers the elements passed in
* the previous invocation in order to avoid returning those elements more than once.
*
* @param <T> the collection element type.
*
* @author Mark Fisher
*
* @since 2.1
*/
public class AcceptOnceCollectionFilter<T> implements CollectionFilter<T> {
@@ -33,7 +36,7 @@ public class AcceptOnceCollectionFilter<T> implements CollectionFilter<T> {
private volatile Collection<T> lastSeenElements = Collections.emptyList();
public synchronized Collection<T> filter(Collection<T> unfilteredElements) {
List<T> filteredElements = new ArrayList<T>();
List<T> filteredElements = new ArrayList<>();
for (T element : unfilteredElements) {
if (!this.lastSeenElements.contains(element)) {
filteredElements.add(element);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 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,10 +31,10 @@ import org.springframework.util.StringUtils;
* <li>matching on method name, if available</li>
* <li>exclusion of void-returning methods if 'requiresReply' is true</li>
* <li>limiting to annotated methods if at least one is present</li>
* </ol>
* <p>
* </ol>.
*
* @author Mark Fisher
*
* @since 2.0
*/
public class AnnotatedMethodFilter implements MethodFilter {
@@ -54,8 +54,8 @@ public class AnnotatedMethodFilter implements MethodFilter {
public List<Method> filter(List<Method> methods) {
List<Method> annotatedCandidates = new ArrayList<Method>();
List<Method> fallbackCandidates = new ArrayList<Method>();
List<Method> annotatedCandidates = new ArrayList<>();
List<Method> fallbackCandidates = new ArrayList<>();
for (Method method : methods) {
if (method.isBridge()) {
continue;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2018-2019 the original author or authors.
* Copyright 2018-2021 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,6 +22,8 @@ import java.util.Iterator;
* A {@link CloseableIterator} is intended to be used when it may hold resources (such as file or socket handles).
* This allows implementations to clean up any resources they need to keep open to iterate over elements.
*
* @param <E> the iterator element type.
*
* @author Ruslan Stelmachenko
* @author Gary Russell
*

Some files were not shown because too many files have changed in this diff Show More