Package org.apache.camel.builder
Class ProcessClause<T>
java.lang.Object
org.apache.camel.builder.ProcessClause<T>
- All Implemented Interfaces:
org.apache.camel.Processor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<B> T
Define aProcessor
which targets the typed Exchange In Body and its Headers.<B> T
Define aProcessor
which targets the typed Exchange In Body.Define aProcessor
which targets the Exchange In Body and its Headers.Define aProcessor
which targets the Exchange In Body.Define aProcessor
which targets the Exchange.Define aProcessor
which targets the Exchange In Message.void
process
(org.apache.camel.Exchange exchange)
-
Constructor Details
-
ProcessClause
-
-
Method Details
-
process
- Specified by:
process
in interfaceorg.apache.camel.Processor
- Throws:
Exception
-
exchange
Define aProcessor
which targets the Exchange. -
message
Define aProcessor
which targets the Exchange In Message.from("direct:aggregate") .process() .message(m -> m.setHeader("HasBody", m.getBody() != null));
-
body
Define aProcessor
which targets the Exchange In Body.from("direct:aggregate") .process() .body(System.out::println);
-
body
Define aProcessor
which targets the typed Exchange In Body.from("direct:aggregate") .process() .body(MyObject.class, MyObject::dumpToStdOut);
-
body
Define aProcessor
which targets the Exchange In Body and its Headers.from("direct:aggregate") .process() .body((b, h) -> h.put("ClassName", b.getClass().getName()));
-
body
Define aProcessor
which targets the typed Exchange In Body and its Headers.from("direct:aggregate") .process() .body(MyObject.class, (b, h) -> { if (h.containsKey("dump")) { b.dumpToStdOut(); } });
-