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
Constructors -
Method Summary
Modifier and TypeMethodDescription<B> TDefine aProcessorwhich targets the typed Exchange In Body and its Headers.<B> TDefine aProcessorwhich targets the typed Exchange In Body.Define aProcessorwhich targets the Exchange In Body and its Headers.Define aProcessorwhich targets the Exchange In Body.Define aProcessorwhich targets the Exchange.Define aProcessorwhich targets the Exchange In Message.voidprocess(org.apache.camel.Exchange exchange)
-
Constructor Details
-
ProcessClause
-
-
Method Details
-
process
- Specified by:
processin interfaceorg.apache.camel.Processor- Throws:
Exception
-
exchange
Define aProcessorwhich targets the Exchange. -
message
Define aProcessorwhich targets the Exchange In Message.from("direct:aggregate") .process() .message(m -> m.setHeader("HasBody", m.getBody() != null)); -
body
Define aProcessorwhich targets the Exchange In Body.from("direct:aggregate") .process() .body(System.out::println); -
body
Define aProcessorwhich targets the typed Exchange In Body.from("direct:aggregate") .process() .body(MyObject.class, MyObject::dumpToStdOut); -
body
Define aProcessorwhich targets the Exchange In Body and its Headers.from("direct:aggregate") .process() .body((b, h) -> h.put("ClassName", b.getClass().getName())); -
body
Define aProcessorwhich targets the typed Exchange In Body and its Headers.from("direct:aggregate") .process() .body(MyObject.class, (b, h) -> { if (h.containsKey("dump")) { b.dumpToStdOut(); } });
-