// START SNIPPET: payload
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
// route for a single line
from("atmosphere-websocket:///hola").to("log:info").process(new Processor() {
public void process(final Exchange exchange) throws Exception {
createResponse(exchange, false);
}
}).to("atmosphere-websocket:///hola");
// route for a broadcast line
from("atmosphere-websocket:///hola2").to("log:info").process(new Processor() {
public void process(final Exchange exchange) throws Exception {
createResponse(exchange, false);
}
}).to("atmosphere-websocket:///hola2?sendToAll=true");
// route for a single stream line
from("atmosphere-websocket:///hola3?useStreaming=true").to("log:info").process(new Processor() {
public void process(final Exchange exchange) throws Exception {
createResponse(exchange, true);
}
}).to("atmosphere-websocket:///hola3");