
camel3.camel2.tests.data.java-generic-information.GoalProducer Maven / Gradle / Ivy
The newest version!
package camelinaction2;
import java.util.List;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.impl.DefaultProducer;
/**
* The producer can gather the list of football games
*/
public class GoalProducer extends DefaultProducer {
private final List games;
public GoalProducer(Endpoint endpoint, List games) {
super(endpoint);
this.games = games;
}
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader("action", "games");
exchange.getIn().setBody(games);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy