Remove use of deprecated ChannelInterceptorAdapter

Deprecated in favor of default methods on `ChannelInterceptor`.

* Fix race in RouterConcurrencyTest; no assertion on executor shutdown; increase time.
This commit is contained in:
Gary Russell
2018-05-24 15:11:11 -04:00
committed by Artem Bilan
parent b087fddd4d
commit 324c54d8ef
24 changed files with 100 additions and 111 deletions

View File

@@ -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.
@@ -23,7 +23,7 @@ import org.springframework.integration.core.MessageSelector;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.messaging.support.ChannelInterceptor;
/**
* A {@link org.springframework.messaging.support.ChannelInterceptor ChannelInterceptor} that
@@ -31,8 +31,9 @@ import org.springframework.messaging.support.ChannelInterceptorAdapter;
* whether a {@link Message} should be accepted on the {@link MessageChannel}.
*
* @author Mark Fisher
* @author Gary Russell
*/
public class MessageSelectingInterceptor extends ChannelInterceptorAdapter {
public class MessageSelectingInterceptor implements ChannelInterceptor {
private final List<MessageSelector> selectors;

View File

@@ -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.
@@ -21,7 +21,7 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ExecutorChannelInterceptor;
/**
@@ -51,7 +51,7 @@ import org.springframework.messaging.support.ExecutorChannelInterceptor;
* @since 4.2
*/
public abstract class ThreadStatePropagationChannelInterceptor<S>
extends ChannelInterceptorAdapter implements ExecutorChannelInterceptor {
implements ChannelInterceptor, ExecutorChannelInterceptor {
@Override
public final Message<?> preSend(Message<?> message, MessageChannel channel) {

View File

@@ -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.
@@ -32,7 +32,6 @@ import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.util.Assert;
/**
@@ -44,8 +43,7 @@ import org.springframework.util.Assert;
* @author Artem Bilan
*/
@ManagedResource
public class WireTap extends ChannelInterceptorAdapter
implements Lifecycle, VetoCapableInterceptor, BeanFactoryAware {
public class WireTap implements ChannelInterceptor, Lifecycle, VetoCapableInterceptor, BeanFactoryAware {
private static final Log logger = LogFactory.getLog(WireTap.class);