@Override public Producer createProducer() throws Exception { return new DefaultAsyncProducer(this) { @Override public boolean process(Exchange exchange, AsyncCallback callback) { if (marshal != null) { return marshal.process(exchange, callback); } else { return unmarshal.process(exchange, callback); } } @Override public String toString() { return "DataFormatProducer[" + dataFormat + "]"; } }; }
public Producer createProducer() throws Exception { return new DefaultAsyncProducer(this) { public boolean process(Exchange exchange, AsyncCallback callback) { onExchange(exchange); callback.done(true); return true; } }; }