Renamed RmiHandler to RmiOutboundGateway and RmiGateway to RmiInboundGateway.

This commit is contained in:
Mark Fisher
2008-09-21 14:37:19 +00:00
parent 01e650b2ee
commit c8eb719d41
10 changed files with 69 additions and 66 deletions

View File

@@ -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.";

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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());
}
}

View File

@@ -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);
}