org.apache.camel.util.component
Interface ResultInterceptor

All Known Implementing Classes:
AbstractApiConsumer, AbstractApiProducer

public interface ResultInterceptor

Intercepts API method invocation result Exchange.


Method Summary
 void interceptResult(Object result, Exchange resultExchange)
          Do additional result exchange processing, for example, adding custom headers.
 Object splitResult(Object result)
          Split a complex result into result elements.
 

Method Detail

splitResult

Object splitResult(Object result)
Split a complex result into result elements.

Parameters:
result - API method invocation result
Returns:
either the same result if it cannot be split, or an array object with split results

interceptResult

void interceptResult(Object result,
                     Exchange resultExchange)
Do additional result exchange processing, for example, adding custom headers.

Parameters:
result - result of API method invocation.
resultExchange - result as a Camel exchange, may be a split result from Arrays or Collections.


Apache Camel