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:
@@ -18,7 +18,9 @@
|
||||
|
||||
<context:component-scan base-package="org.springframework.integration.samples.cafe.annotation"/>
|
||||
|
||||
<gateway id="cafe" request-channel="orders" service-interface="org.springframework.integration.samples.cafe.Cafe"/>
|
||||
<gateway id="cafe"
|
||||
service-interface="org.springframework.integration.samples.cafe.Cafe"
|
||||
default-request-channel="orders" />
|
||||
|
||||
<channel id="orders"/>
|
||||
<channel id="drinks"/>
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
<message-bus/>
|
||||
|
||||
<gateway id="cafe" request-channel="orders" service-interface="org.springframework.integration.samples.cafe.Cafe"/>
|
||||
<gateway id="cafe"
|
||||
service-interface="org.springframework.integration.samples.cafe.Cafe"
|
||||
default-request-channel="orders"/>
|
||||
|
||||
<channel id="orders"/>
|
||||
<splitter input-channel="orders" ref="orderSplitter" method="split" output-channel="drinks"/>
|
||||
|
||||
Reference in New Issue
Block a user