public class IBatisConsumer extends ScheduledBatchPollingConsumer
IBatisProcessingStrategypendingExchanges, shutdownRunningTasklogshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
IBatisConsumer(IBatisEndpoint endpoint,
Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
IBatisEndpoint |
getEndpoint()
Gets the endpoint associated with an object.
|
String |
getOnConsume()
Gets the statement(s) to run after successful processing.
|
boolean |
isRouteEmptyResultSet()
Indicates whether empty resultset should be allowed to be sent to the next hop or not
|
boolean |
isUseIterator()
Indicates how resultset should be delivered to the route
|
protected int |
poll()
Polls the database
|
int |
processBatch(Queue<Object> exchanges)
Processes the list of
Exchange objects in a batch. |
void |
setOnConsume(String onConsume)
Sets the statement to run after successful processing.
|
void |
setRouteEmptyResultSet(boolean routeEmptyResultSet)
Sets whether empty resultset should be allowed to be sent to the next hop.
|
void |
setUseIterator(boolean useIterator)
Sets how resultset should be delivered to route.
|
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPollafterPoll, beforePoll, doShutdown, doStart, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startSchedulercreateUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toStringdoResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic IBatisConsumer(IBatisEndpoint endpoint, Processor processor) throws Exception
Exceptionpublic IBatisEndpoint getEndpoint()
EndpointAwareProducer
or for consuming from for components like Consumer or RoutegetEndpoint in interface EndpointAwaregetEndpoint in class DefaultConsumerprotected int poll()
throws Exception
poll in class ScheduledPollConsumerException - can be thrown if an exception occurred during pollingpublic int processBatch(Queue<Object> exchanges) throws Exception
BatchConsumerExchange objects in a batch.
Each message exchange will be processed individually but the batch
consumer will add properties with the current index and total in the batch.
The items in the Queue may actually be Holder objects that store other
data alongside the Exchange.exchanges - list of items in this batchException - if an internal processing error has occurred.public String getOnConsume()
public void setOnConsume(String onConsume)
public boolean isUseIterator()
public void setUseIterator(boolean useIterator)
public boolean isRouteEmptyResultSet()
public void setRouteEmptyResultSet(boolean routeEmptyResultSet)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.