GatewayProxyFactoryBean now creates a Map of gateways (per-Method). This will enable support for @Gateway annotations (coming soon). Also, the @Header and @Headers annotations are now supported for gateway method parameters. The 'request-channel' and 'reply-channel' attributes of the <gateway/> element have been changed to 'default-request-channel' and 'default-reply-channel' since the request/reply channels will be configurable on a method-by-method basis with annotations (the same applies to 'request-timeout' and 'reply-timeout'). The MessageMapper interface has been split into InboundMessageMapper (with 'toMessage') and OutboundMessageMapper (with 'fromMessage') since the behavior is not always symmetrical For example, the gateway uses MethodParameterMessageMapper for creating a Message *from* the args array but it uses SimpleMessageMapper (the new name for DefaultMessageMapper) to create a Message whose payload is the method's return value.
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.integration.rmi;
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.Registry;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.integration.adapter.MessageHandler;
|
||||
import org.springframework.integration.adapter.RemotingInboundGatewaySupport;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
@@ -32,7 +33,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class RmiInboundGateway extends RemotingInboundGatewaySupport {
|
||||
public class RmiInboundGateway extends RemotingInboundGatewaySupport implements InitializingBean {
|
||||
|
||||
public static final String SERVICE_NAME_PREFIX = "org.springframewok.integration.rmiGateway.";
|
||||
|
||||
@@ -71,7 +72,6 @@ public class RmiInboundGateway extends RemotingInboundGatewaySupport {
|
||||
this.remoteInvocationExecutor = remoteInvocationExecutor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws RemoteException {
|
||||
RmiServiceExporter exporter = new RmiServiceExporter();
|
||||
if (this.registryHost != null) {
|
||||
|
||||
Reference in New Issue
Block a user