Renamed RmiHandler to RmiOutboundGateway and RmiGateway to RmiInboundGateway.
This commit is contained in:
@@ -28,11 +28,11 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A gateway adapter for RMI-based remoting.
|
||||
* An inbound Messaging Gateway for RMI-based remoting.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class RmiGateway extends RemotingInboundGatewaySupport implements MessageHandler {
|
||||
public class RmiInboundGateway extends RemotingInboundGatewaySupport {
|
||||
|
||||
public static final String SERVICE_NAME_PREFIX = "org.springframewok.integration.rmiGateway.";
|
||||
|
||||
@@ -21,13 +21,13 @@ import org.springframework.integration.handler.MessageHandler;
|
||||
import org.springframework.remoting.rmi.RmiProxyFactoryBean;
|
||||
|
||||
/**
|
||||
* A MessageHandler adapter for RMI-based remoting.
|
||||
* An outbound Messaging Gateway for RMI-based remoting.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class RmiHandler extends AbstractRemotingOutboundGateway {
|
||||
public class RmiOutboundGateway extends AbstractRemotingOutboundGateway {
|
||||
|
||||
public RmiHandler(String url) {
|
||||
public RmiOutboundGateway(String url) {
|
||||
super(url);
|
||||
}
|
||||
|
||||
@@ -20,22 +20,22 @@ import org.w3c.dom.Element;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.integration.adapter.config.AbstractRemotingGatewayParser;
|
||||
import org.springframework.integration.rmi.RmiGateway;
|
||||
import org.springframework.integration.rmi.RmiInboundGateway;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for the <rmi-gateway/> element.
|
||||
* Parser for the <inbound-gateway/> element of the 'rmi' namespace.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class RmiGatewayParser extends AbstractRemotingGatewayParser {
|
||||
public class RmiInboundGatewayParser extends AbstractRemotingGatewayParser {
|
||||
|
||||
private static final String REMOTE_INVOCATION_EXECUTOR_ATTRIBUTE = "remote-invocation-executor";
|
||||
|
||||
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return RmiGateway.class;
|
||||
return RmiInboundGateway.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -26,8 +26,8 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
public class RmiNamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
public void init() {
|
||||
this.registerBeanDefinitionParser("inbound-gateway", new RmiGatewayParser());
|
||||
this.registerBeanDefinitionParser("outbound-gateway", new RmiHandlerParser());
|
||||
this.registerBeanDefinitionParser("inbound-gateway", new RmiInboundGatewayParser());
|
||||
this.registerBeanDefinitionParser("outbound-gateway", new RmiOutboundGatewayParser());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.w3c.dom.Element;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
import org.springframework.integration.adapter.config.AbstractRemotingOutboundGatewayParser;
|
||||
import org.springframework.integration.rmi.RmiGateway;
|
||||
import org.springframework.integration.rmi.RmiHandler;
|
||||
import org.springframework.integration.rmi.RmiInboundGateway;
|
||||
import org.springframework.integration.rmi.RmiOutboundGateway;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -32,11 +32,11 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class RmiHandlerParser extends AbstractRemotingOutboundGatewayParser {
|
||||
public class RmiOutboundGatewayParser extends AbstractRemotingOutboundGatewayParser {
|
||||
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return RmiHandler.class;
|
||||
return RmiOutboundGateway.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +56,7 @@ public class RmiHandlerParser extends AbstractRemotingOutboundGatewayParser {
|
||||
}
|
||||
String portAttribute = element.getAttribute("port");
|
||||
String port = StringUtils.hasText(portAttribute) ? portAttribute : "" + Registry.REGISTRY_PORT;
|
||||
String url = "rmi://" + host + ":" + port + "/" + RmiGateway.SERVICE_NAME_PREFIX + remoteChannel;
|
||||
String url = "rmi://" + host + ":" + port + "/" + RmiInboundGateway.SERVICE_NAME_PREFIX + remoteChannel;
|
||||
builder.addConstructorArgValue(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user