Skip to content

Commit 92410b9

Browse files
committed
Deprecate RMI module
* Remove tests from SI-RMI since the module is deprecated * Mention such a deprecation in the docs
1 parent 5ec71d4 commit 92410b9

18 files changed

+46
-853
lines changed

spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiInboundGateway.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@
2525
import org.springframework.lang.Nullable;
2626
import org.springframework.messaging.Message;
2727
import org.springframework.messaging.MessageChannel;
28-
import org.springframework.remoting.rmi.RmiServiceExporter;
2928
import org.springframework.remoting.support.RemoteInvocationExecutor;
3029
import org.springframework.util.Assert;
3130
import org.springframework.util.StringUtils;
@@ -36,14 +35,18 @@
3635
* @author Mark Fisher
3736
* @author Artem Bilan
3837
* @author Gary Russell
38+
*
39+
* @deprecated since 5.4 with no replacement.
3940
*/
41+
@Deprecated
4042
public class RmiInboundGateway extends MessagingGatewaySupport
4143
implements RequestReplyExchanger {
4244

4345
public static final String SERVICE_NAME_PREFIX = "org.springframework.integration.rmiGateway.";
4446

4547

46-
private final RmiServiceExporter exporter = new RmiServiceExporter();
48+
private final org.springframework.remoting.rmi.RmiServiceExporter exporter =
49+
new org.springframework.remoting.rmi.RmiServiceExporter();
4750

4851
private String requestChannelName;
4952

spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiOutboundGateway.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,15 +23,17 @@
2323
import org.springframework.messaging.Message;
2424
import org.springframework.messaging.MessageChannel;
2525
import org.springframework.messaging.MessageHandlingException;
26-
import org.springframework.remoting.rmi.RmiProxyFactoryBean;
2726

2827
/**
2928
* An outbound Messaging Gateway for RMI-based remoting.
3029
*
3130
* @author Mark Fisher
3231
* @author Gary Russell
3332
* @author Artem Bilan
33+
*
34+
* @deprecated since 5.4 with no replacement.
3435
*/
36+
@Deprecated
3537
public class RmiOutboundGateway extends AbstractReplyProducingMessageHandler {
3638

3739
private final RequestReplyExchanger proxy;
@@ -40,7 +42,7 @@ public class RmiOutboundGateway extends AbstractReplyProducingMessageHandler {
4042

4143
/**
4244
* Construct an instance with a `RequestReplyExchanger` built from the
43-
* default {@link RmiProxyFactoryBean}.
45+
* default {@link org.springframework.remoting.rmi.RmiProxyFactoryBean}.
4446
* @param url the url.
4547
*/
4648
public RmiOutboundGateway(String url) {
@@ -49,7 +51,7 @@ public RmiOutboundGateway(String url) {
4951

5052
/**
5153
* Construct an instance with a `RequestReplyExchanger` built from the
52-
* default {@link RmiProxyFactoryBean} which can be modified by the
54+
* default {@link org.springframework.remoting.rmi.RmiProxyFactoryBean} which can be modified by the
5355
* configurer.
5456
* @param url the url.
5557
* @param configurer the {@link RmiProxyFactoryBeanConfigurer}.
@@ -86,7 +88,8 @@ public final Object handleRequestMessage(Message<?> requestMessage) {
8688
}
8789

8890
private RequestReplyExchanger createProxy(String url) {
89-
RmiProxyFactoryBean proxyFactory = new RmiProxyFactoryBean();
91+
org.springframework.remoting.rmi.RmiProxyFactoryBean proxyFactory =
92+
new org.springframework.remoting.rmi.RmiProxyFactoryBean();
9093
proxyFactory.setServiceInterface(RequestReplyExchanger.class);
9194
proxyFactory.setServiceUrl(url);
9295
proxyFactory.setLookupStubOnStartup(false);
@@ -109,7 +112,7 @@ public interface RmiProxyFactoryBeanConfigurer {
109112
* {@code RequestReplyExchanger} is created.
110113
* @param factoryBean the factory bean.
111114
*/
112-
void configure(RmiProxyFactoryBean factoryBean);
115+
void configure(org.springframework.remoting.rmi.RmiProxyFactoryBean factoryBean);
113116

114117
}
115118

spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiInboundGatewayParser.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,22 +21,24 @@
2121
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
2222
import org.springframework.integration.config.xml.AbstractInboundGatewayParser;
2323
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
24-
import org.springframework.integration.rmi.RmiInboundGateway;
2524

2625
/**
2726
* Parser for the &lt;inbound-gateway/&gt; element of the 'rmi' namespace.
2827
*
2928
* @author Mark Fisher
3029
* @author Gary Russell
30+
*
31+
* @deprecated since 5.4 with no replacement.
3132
*/
33+
@Deprecated
3234
public class RmiInboundGatewayParser extends AbstractInboundGatewayParser {
3335

3436
private static final String REMOTE_INVOCATION_EXECUTOR_ATTRIBUTE = "remote-invocation-executor";
3537

3638

3739
@Override
3840
protected String getBeanClassName(Element element) {
39-
return RmiInboundGateway.class.getName();
41+
return org.springframework.integration.rmi.RmiInboundGateway.class.getName();
4042
}
4143

4244
@Override

spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiNamespaceHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,10 @@
2222
* Namespace handler for Spring Integration's <em>rmi</em> namespace.
2323
*
2424
* @author Mark Fisher
25+
*
26+
* @deprecated since 5.4 with no replacement.
2527
*/
28+
@Deprecated
2629
public class RmiNamespaceHandler extends AbstractIntegrationNamespaceHandler {
2730

2831
public void init() {

spring-integration-rmi/src/main/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParser.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,20 +23,21 @@
2323
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
2424
import org.springframework.beans.factory.xml.ParserContext;
2525
import org.springframework.integration.config.xml.AbstractOutboundGatewayParser;
26-
import org.springframework.integration.rmi.RmiInboundGateway;
27-
import org.springframework.integration.rmi.RmiOutboundGateway;
2826
import org.springframework.util.StringUtils;
2927

3028
/**
3129
* Parser for the &lt;outbound-gateway/&gt; element of the 'rmi' namespace.
3230
*
3331
* @author Mark Fisher
32+
*
33+
* @deprecated since 5.4 with no replacement.
3434
*/
35+
@Deprecated
3536
public class RmiOutboundGatewayParser extends AbstractOutboundGatewayParser {
3637

3738
@Override
3839
protected String getGatewayClassName(Element element) {
39-
return RmiOutboundGateway.class.getName();
40+
return org.springframework.integration.rmi.RmiOutboundGateway.class.getName();
4041
}
4142

4243
@Override
@@ -49,7 +50,8 @@ protected String parseUrl(Element element, ParserContext parserContext) {
4950
}
5051
String portAttribute = element.getAttribute("port");
5152
String port = StringUtils.hasText(portAttribute) ? portAttribute : "" + Registry.REGISTRY_PORT;
52-
return "rmi://" + host + ":" + port + "/" + RmiInboundGateway.SERVICE_NAME_PREFIX + remoteChannel;
53+
return "rmi://" + host + ":" + port + "/"
54+
+ org.springframework.integration.rmi.RmiInboundGateway.SERVICE_NAME_PREFIX + remoteChannel;
5355
}
5456

5557
@Override

spring-integration-rmi/src/test/java/org/springframework/integration/rmi/BackToBackTests-context.xml

Lines changed: 0 additions & 62 deletions
This file was deleted.

spring-integration-rmi/src/test/java/org/springframework/integration/rmi/BackToBackTests.java

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)