Interface ResultInterceptor

All Known Implementing Classes:
AbstractApiConsumer, AbstractApiProducer

public interface ResultInterceptor
Intercepts API method invocation result Exchange.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    interceptResult(Object result, org.apache.camel.Exchange resultExchange)
    Do additional result exchange processing, for example, adding custom headers.
    Split a complex result into result elements.
  • Method Details

    • 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, an array or collection object with split results
    • interceptResult

      void interceptResult(Object result, org.apache.camel.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.