@UriEndpoint(scheme="ibatis", title="iBatis", syntax="ibatis:statement", consumerClass=IBatisConsumer.class, label="database,sql") public class IBatisEndpoint extends DefaultPollingEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
IBatisEndpoint() |
IBatisEndpoint(String uri,
IBatisComponent component,
String statement) |
Modifier and Type | Method and Description |
---|---|
IBatisConsumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
IBatisComponent |
getComponent()
Returns the component that created this endpoint.
|
String |
getIsolation() |
int |
getMaxMessagesPerPoll() |
String |
getOnConsume() |
IBatisProcessingStrategy |
getProcessingStrategy() |
com.ibatis.sqlmap.client.SqlMapClient |
getSqlMapClient() |
String |
getStatement() |
StatementType |
getStatementType() |
boolean |
isRouteEmptyResultSet() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
boolean |
isUseIterator() |
boolean |
isUseTransactions() |
void |
setIsolation(String isolation)
Transaction isolation level
|
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
This option is intended to split results returned by the database pool into the batches and deliver them in multiple exchanges.
|
void |
setOnConsume(String onConsume)
Statement to run after data has been processed in the route
|
void |
setRouteEmptyResultSet(boolean routeEmptyResultSet)
Whether allow empty resultset to be routed to the next hop
|
void |
setStatement(String statement)
The statement name in the iBatis XML mapping file which maps to the query, insert, update or delete operation you wish to evaluate.
|
void |
setStatementType(StatementType statementType)
Mandatory to specify for the producer to control which kind of operation to invoke.
|
void |
setStrategy(IBatisProcessingStrategy strategy)
Allows to plugin a custom
IBatisProcessingStrategy to use by the consumer. |
void |
setUseIterator(boolean useIterator)
Process resultset individually or as a list
|
void |
setUseTransactions(boolean useTransactions)
Whether to use transactions.
|
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public IBatisEndpoint()
public IBatisEndpoint(String uri, IBatisComponent component, String statement) throws Exception
Exception
public IBatisComponent getComponent()
DefaultEndpoint
getComponent
in class DefaultEndpoint
public boolean isSingleton()
IsSingleton
public Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic IBatisConsumer createConsumer(Processor processor) throws Exception
Endpoint
createConsumer
in interface Endpoint
createConsumer
in class DefaultPollingEndpoint
processor
- the given processorException
- can be thrownpublic com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient() throws IOException
IOException
public IBatisProcessingStrategy getProcessingStrategy() throws Exception
Exception
public void setStrategy(IBatisProcessingStrategy strategy)
IBatisProcessingStrategy
to use by the consumer.public String getStatement()
public void setStatement(String statement)
public boolean isUseTransactions()
public void setUseTransactions(boolean useTransactions)
public StatementType getStatementType()
public void setStatementType(StatementType statementType)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public void setIsolation(String isolation) throws Exception
Exception
public String getOnConsume()
public void setOnConsume(String onConsume)
public boolean isUseIterator()
public void setUseIterator(boolean useIterator)
public boolean isRouteEmptyResultSet()
public void setRouteEmptyResultSet(boolean routeEmptyResultSet)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ScheduledPollEndpoint
Exception
ServiceSupport.doStop()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.