Package org.apache.camel.builder
Class ProcessClause<T>
- java.lang.Object
-
- org.apache.camel.builder.ProcessClause<T>
-
- All Implemented Interfaces:
org.apache.camel.Processor
public class ProcessClause<T> extends Object implements org.apache.camel.Processor
-
-
Constructor Summary
Constructors Constructor Description ProcessClause(T parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <B> T
body(Class<B> type, BiConsumer<B,Map<String,Object>> consumer)
Define aProcessor
which targets the typed Exchange In Body and its Headers.<B> T
body(Class<B> type, Consumer<B> consumer)
Define aProcessor
which targets the typed Exchange In Body.T
body(BiConsumer<Object,Map<String,Object>> consumer)
Define aProcessor
which targets the Exchange In Body and its Headers.T
body(Consumer<Object> consumer)
Define aProcessor
which targets the Exchange In Body.T
exchange(Consumer<org.apache.camel.Exchange> consumer)
Define aProcessor
which targets the Exchange.T
message(Consumer<org.apache.camel.Message> consumer)
Define aProcessor
which targets the Exchange In Message.void
process(org.apache.camel.Exchange exchange)
-
-
-
Constructor Detail
-
ProcessClause
public ProcessClause(T parent)
-
-
Method Detail
-
process
public void process(org.apache.camel.Exchange exchange) throws Exception
- Specified by:
process
in interfaceorg.apache.camel.Processor
- Throws:
Exception
-
exchange
public T exchange(Consumer<org.apache.camel.Exchange> consumer)
Define aProcessor
which targets the Exchange.
-
message
public T message(Consumer<org.apache.camel.Message> consumer)
Define aProcessor
which targets the Exchange In Message.from("direct:aggregate") .process() .message(m -> m.setHeader("HasBody", m.getBody() != null));
-
body
public T body(Consumer<Object> consumer)
Define aProcessor
which targets the Exchange In Body.from("direct:aggregate") .process() .body(System.out::println);
-
body
public <B> T body(Class<B> type, Consumer<B> consumer)
Define aProcessor
which targets the typed Exchange In Body.from("direct:aggregate") .process() .body(MyObject.class, MyObject::dumpToStdOut);
-
body
public T body(BiConsumer<Object,Map<String,Object>> consumer)
Define aProcessor
which targets the Exchange In Body and its Headers.from("direct:aggregate") .process() .body((b, h) -> h.put("ClassName", b.getClass().getName()));
-
-