public final class ApiConsumerHelper extends Object
Modifier and Type | Method and Description |
---|---|
static <E extends Enum<E> & ApiName,T> |
findMethod(AbstractApiEndpoint<E,T> endpoint,
PropertyNamesInterceptor propertyNamesInterceptor)
Utility method to find matching API Method for supplied endpoint's configuration properties.
|
static <T extends DefaultConsumer & ResultInterceptor> |
getResultsProcessed(T consumer,
Object result,
boolean splitResult)
Utility method for Consumers to process API method invocation result.
|
public static <E extends Enum<E> & ApiName,T> ApiMethod findMethod(AbstractApiEndpoint<E,T> endpoint, PropertyNamesInterceptor propertyNamesInterceptor)
E
- ApiName enumeration.T
- Component configuration class.endpoint
- endpoint for configuration properties.propertyNamesInterceptor
- names interceptor for adapting property names, usually the consumer class itself.public static <T extends DefaultConsumer & ResultInterceptor> int getResultsProcessed(T consumer, Object result, boolean splitResult) throws Exception
T
- Consumer class that extends DefaultConsumer and implements ResultInterceptor
.consumer
- Consumer that wants to process results.result
- result of API method invocation.splitResult
- true if the Consumer wants to split result using ResultInterceptor.splitResult(Object)
method.Exception
- on error.Apache Camel