diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/RemotingInboundGatewaySupport.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/RemotingInboundGatewaySupport.java
deleted file mode 100644
index 933ae5a69d..0000000000
--- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/RemotingInboundGatewaySupport.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2002-2010 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.gateway;
-
-import org.springframework.integration.Message;
-
-/**
- * Support class for inbound Messaging Gateways.
- *
- * @author Mark Fisher
- *
- * @deprecated as of 2.0. Will be removed in 2.1.
- */
-@Deprecated
-public abstract class RemotingInboundGatewaySupport extends MessagingGatewaySupport implements RequestReplyExchanger {
-
- private volatile boolean expectReply = true;
-
-
- /**
- * Specify whether the gateway should be expected to return a reply.
- * The default is 'true'.
- */
- public void setExpectReply(boolean expectReply) {
- this.expectReply = expectReply;
- }
-
- public Message> exchange(Message> message) {
- if (this.expectReply) {
- return this.sendAndReceiveMessage(message);
- }
- this.send(message);
- return null;
- }
-
-}
diff --git a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiInboundGateway.java b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiInboundGateway.java
index 570535f581..73939b6527 100644
--- a/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiInboundGateway.java
+++ b/spring-integration-rmi/src/main/java/org/springframework/integration/rmi/RmiInboundGateway.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2011 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,9 +19,10 @@ package org.springframework.integration.rmi;
import java.rmi.registry.Registry;
import org.springframework.beans.factory.InitializingBean;
+import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.context.NamedComponent;
-import org.springframework.integration.gateway.RemotingInboundGatewaySupport;
+import org.springframework.integration.gateway.MessagingGatewaySupport;
import org.springframework.integration.gateway.RequestReplyExchanger;
import org.springframework.remoting.rmi.RmiServiceExporter;
import org.springframework.remoting.support.RemoteInvocationExecutor;
@@ -33,8 +34,7 @@ import org.springframework.util.StringUtils;
*
* @author Mark Fisher
*/
-@SuppressWarnings("deprecation")
-public class RmiInboundGateway extends RemotingInboundGatewaySupport implements InitializingBean {
+public class RmiInboundGateway extends MessagingGatewaySupport implements RequestReplyExchanger, InitializingBean {
public static final String SERVICE_NAME_PREFIX = "org.springframework.integration.rmiGateway.";
@@ -45,6 +45,8 @@ public class RmiInboundGateway extends RemotingInboundGatewaySupport implements
private volatile int registryPort = Registry.REGISTRY_PORT;
+ private volatile boolean expectReply = true;
+
private volatile RemoteInvocationExecutor remoteInvocationExecutor;
private volatile RmiServiceExporter exporter;
@@ -66,6 +68,13 @@ public class RmiInboundGateway extends RemotingInboundGatewaySupport implements
super.setRequestChannel(requestChannel);
}
+ /**
+ * Specify whether the gateway should be expected to return a reply.
+ * The default is 'true'.
+ */
+ public void setExpectReply(boolean expectReply) {
+ this.expectReply = expectReply;
+ }
public void setRegistryHost(String registryHost) {
this.registryHost = registryHost;
@@ -105,4 +114,12 @@ public class RmiInboundGateway extends RemotingInboundGatewaySupport implements
super.onInit();
}
+ public Message> exchange(Message> message) {
+ if (this.expectReply) {
+ return this.sendAndReceiveMessage(message);
+ }
+ this.send(message);
+ return null;
+ }
+
}