public abstract class AbstractApiConsumer<E extends Enum<E> & ApiName,T> extends ScheduledPollConsumer implements PropertyNamesInterceptor, PropertiesInterceptor, ResultInterceptor
| Modifier and Type | Field and Description | 
|---|---|
protected AbstractApiEndpoint<E,T> | 
endpoint  | 
protected ApiMethod | 
method  | 
| Constructor and Description | 
|---|
AbstractApiConsumer(AbstractApiEndpoint<E,T> endpoint,
                   org.apache.camel.Processor processor)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected Object | 
doInvokeMethod(Map<String,Object> args)
Invoke the API method. 
 | 
void | 
interceptProperties(Map<String,Object> properties)
Intercept method invocation arguments used to find and invoke API method. 
 | 
void | 
interceptPropertyNames(Set<String> propertyNames)
Intercept property names used to find API Method. 
 | 
void | 
interceptResult(Object result,
               org.apache.camel.Exchange resultExchange)
Do additional result exchange processing, for example, adding custom headers. 
 | 
boolean | 
isGreedy()  | 
boolean | 
isSplitResult()  | 
protected int | 
poll()
The polling method which is invoked periodically to poll this consumer 
 | 
void | 
setSplitResult(boolean splitResult)  | 
Object | 
splitResult(Object result)
Split a complex result into result elements. 
 | 
afterPoll, beforePoll, doInit, doShutdown, doStart, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, processEmptyMessage, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startSchedulercreateUoW, doneUoW, getAsyncProcessor, getEndpoint, getExceptionHandler, getProcessor, getRoute, getRouteId, handleException, handleException, setExceptionHandler, setRoute, setRouteId, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected final ApiMethod method
public AbstractApiConsumer(AbstractApiEndpoint<E,T> endpoint, org.apache.camel.Processor processor)
public boolean isGreedy()
isGreedy in class ScheduledPollConsumerprotected int poll()
            throws Exception
ScheduledPollConsumerpoll in class ScheduledPollConsumerException - can be thrown if an exception occurred during pollingpublic void interceptPropertyNames(Set<String> propertyNames)
PropertyNamesInterceptorinterceptPropertyNames in interface PropertyNamesInterceptorpropertyNames - argument names.public void interceptProperties(Map<String,Object> properties)
PropertiesInterceptorinterceptProperties in interface PropertiesInterceptorproperties - method invocation arguments.protected Object doInvokeMethod(Map<String,Object> args)
args - method arguments from endpoint parameters.public Object splitResult(Object result)
ResultInterceptorsplitResult in interface ResultInterceptorresult - API method invocation resultpublic void interceptResult(Object result, org.apache.camel.Exchange resultExchange)
ResultInterceptorinterceptResult in interface ResultInterceptorresult - result of API method invocation.resultExchange - result as a Camel exchange, may be a split result from Arrays or Collections.public final boolean isSplitResult()
public final void setSplitResult(boolean splitResult)
Apache Camel