Updated CafeDemo to use the new @Gateway method annotation.

This commit is contained in:
Mark Fisher
2008-09-28 22:18:43 +00:00
parent 170bc6ea79
commit f4a3dadb55
3 changed files with 7 additions and 8 deletions

View File

@@ -16,18 +16,21 @@
package org.springframework.integration.samples.cafe;
import org.springframework.integration.annotation.Gateway;
/**
* The entry point for Cafe Demo. The demo's main() method invokes the
* '<code>placeOrder</code>' method on a generated MessagingGateway proxy.
* The gateway then passes the {@link Order} as the payload of a
* {@link org.springframework.integration.message.Message} to the
* configured <em>requestChannel</em>. The channel reference ('orders')
* is configured in the 'cafeDemo.xml' file.
* configured <em>requestChannel</em>. The channel ('orders') is
* defined in the 'cafeDemo.xml' file.
*
* @author Mark Fisher
*/
public interface Cafe {
@Gateway(requestChannel="orders")
void placeOrder(Order order);
}

View File

@@ -18,9 +18,7 @@
<context:component-scan base-package="org.springframework.integration.samples.cafe.annotation"/>
<gateway id="cafe"
service-interface="org.springframework.integration.samples.cafe.Cafe"
default-request-channel="orders" />
<gateway id="cafe" service-interface="org.springframework.integration.samples.cafe.Cafe"/>
<channel id="orders"/>
<channel id="drinks"/>

View File

@@ -12,9 +12,7 @@
<message-bus/>
<gateway id="cafe"
service-interface="org.springframework.integration.samples.cafe.Cafe"
default-request-channel="orders"/>
<gateway id="cafe" service-interface="org.springframework.integration.samples.cafe.Cafe"/>
<channel id="orders"/>
<splitter input-channel="orders" ref="orderSplitter" method="split" output-channel="drinks"/>