Updated QuoteDemo to use an 'inbound-channel-adapter' XML element since the @Poller annoation is being removed.
This commit is contained in:
@@ -18,18 +18,11 @@ package org.springframework.integration.samples.quote;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.springframework.integration.annotation.ChannelAdapter;
|
||||
import org.springframework.integration.annotation.MessageEndpoint;
|
||||
import org.springframework.integration.annotation.Poller;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
@MessageEndpoint
|
||||
public class TickerStream {
|
||||
|
||||
@ChannelAdapter("tickers")
|
||||
@Poller(interval = 300)
|
||||
public String nextTicker() {
|
||||
char[] chars = new char[3];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
||||
@@ -12,10 +12,18 @@
|
||||
|
||||
<annotation-config/>
|
||||
|
||||
<beans:bean class="org.springframework.integration.samples.quote.TickerStream"/>
|
||||
<inbound-channel-adapter ref="tickerStream" method="nextTicker" channel="tickers">
|
||||
<poller max-messages-per-poll="1">
|
||||
<interval-trigger interval="300"/>
|
||||
</poller>
|
||||
</inbound-channel-adapter>
|
||||
|
||||
<beans:bean class="org.springframework.integration.samples.quote.QuoteService"/>
|
||||
<channel id="tickers"/>
|
||||
|
||||
<stream:stdout-channel-adapter id="quotes" append-newline="true"/>
|
||||
|
||||
<beans:bean id="tickerStream" class="org.springframework.integration.samples.quote.TickerStream"/>
|
||||
|
||||
<beans:bean id="quoteService" class="org.springframework.integration.samples.quote.QuoteService"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
Reference in New Issue
Block a user