org.apache.camel.component.ibatis.strategy
Class DefaultIBatisProcessingStategy

java.lang.Object
  extended by org.apache.camel.component.ibatis.strategy.DefaultIBatisProcessingStategy
All Implemented Interfaces:
IBatisProcessingStrategy

public class DefaultIBatisProcessingStategy
extends Object
implements IBatisProcessingStrategy

Default strategy for consuming messages for a route


Constructor Summary
DefaultIBatisProcessingStategy()
           
 
Method Summary
 void commit(IBatisEndpoint endpoint, org.apache.camel.Exchange exchange, Object data, String consumeStatements)
          Commit callback if there are a statements to be run after processing.
 int getIsolation()
          Returns the transaction isolation level set on the processing strategy.
 List<Object> poll(IBatisConsumer consumer, IBatisEndpoint endpoint)
          Called when record is being queried.
 void setIsolation(int isolation)
          Sets the transaction isolation level on the processing strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIBatisProcessingStategy

public DefaultIBatisProcessingStategy()
Method Detail

commit

public void commit(IBatisEndpoint endpoint,
                   org.apache.camel.Exchange exchange,
                   Object data,
                   String consumeStatements)
            throws Exception
Description copied from interface: IBatisProcessingStrategy
Commit callback if there are a statements to be run after processing.

Specified by:
commit in interface IBatisProcessingStrategy
Parameters:
endpoint - the endpoint
exchange - The exchange after it has been processed
data - The original data delivered to the route
consumeStatements - Name of the statement(s) to run, will use SQL update. Use comma to provide multiple statements to run.
Throws:
Exception - can be thrown in case of error

poll

public List<Object> poll(IBatisConsumer consumer,
                         IBatisEndpoint endpoint)
                  throws Exception
Description copied from interface: IBatisProcessingStrategy
Called when record is being queried.

Specified by:
poll in interface IBatisProcessingStrategy
Parameters:
consumer - the consumer
endpoint - the endpoint
Returns:
Results of the query as a List
Throws:
Exception - can be thrown in case of error

getIsolation

public int getIsolation()
Description copied from interface: IBatisProcessingStrategy
Returns the transaction isolation level set on the processing strategy.

Specified by:
getIsolation in interface IBatisProcessingStrategy
Returns:
the transaction isolation level.

setIsolation

public void setIsolation(int isolation)
Description copied from interface: IBatisProcessingStrategy
Sets the transaction isolation level on the processing strategy.

Specified by:
setIsolation in interface IBatisProcessingStrategy
Parameters:
isolation - the transaction isolation level.


Apache Camel