org.apache.camel.component.ibatis
Class IBatisEndpoint

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.impl.ScheduledPollEndpoint
              extended by org.apache.camel.impl.DefaultPollingEndpoint
                  extended by org.apache.camel.component.ibatis.IBatisEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId

public class IBatisEndpoint
extends DefaultPollingEndpoint

An

Constructor Summary
IBatisEndpoint()
           
IBatisEndpoint(String uri, IBatisComponent component, String statement)
           
 
Method Summary
 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
 IBatisComponent getComponent()
          Returns the component that created this endpoint.
 int getMaxMessagesPerPoll()
           
 IBatisProcessingStrategy getProcessingStrategy()
          Gets the IbatisProcessingStrategy to to use when consuming messages from the database
 com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
          Gets the iBatis SqlMapClient
 String getStatement()
          Statement to run when polling or processing
 StatementType getStatementType()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
 boolean isUseTransactions()
          Indicates if transactions should be used when calling statements.
 void setMaxMessagesPerPoll(int maxMessagesPerPoll)
           
 void setStatement(String statement)
          Statement to run when polling or processing
 void setStatementType(StatementType statementType)
           
 void setStrategy(IBatisProcessingStrategy strategy)
           
 void setUseTransactions(boolean useTransactions)
          Sets indicator to use transactions for consuming and error handling statements.
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

IBatisEndpoint

public IBatisEndpoint()

IBatisEndpoint

public IBatisEndpoint(String uri,
                      IBatisComponent component,
                      String statement)
               throws Exception
Throws:
Exception
Method Detail

getComponent

public IBatisComponent getComponent()
Description copied from class: DefaultEndpoint
Returns the component that created this endpoint.

Overrides:
getComponent in class DefaultEndpoint
Returns:
the component that created this endpoint, or null if none set

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Returns:
true to be a single shared instance, false to create new instances.

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public IBatisConsumer createConsumer(Processor processor)
                              throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Overrides:
createConsumer in class DefaultPollingEndpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

getSqlMapClient

public com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
                                                      throws IOException
Gets the iBatis SqlMapClient

Throws:
IOException

getProcessingStrategy

public IBatisProcessingStrategy getProcessingStrategy()
                                               throws Exception
Gets the IbatisProcessingStrategy to to use when consuming messages from the database

Throws:
Exception

setStrategy

public void setStrategy(IBatisProcessingStrategy strategy)

getStatement

public String getStatement()
Statement to run when polling or processing


setStatement

public void setStatement(String statement)
Statement to run when polling or processing


isUseTransactions

public boolean isUseTransactions()
Indicates if transactions should be used when calling statements. Useful if using a comma separated list when consuming records.


setUseTransactions

public void setUseTransactions(boolean useTransactions)
Sets indicator to use transactions for consuming and error handling statements.


getStatementType

public StatementType getStatementType()

setStatementType

public void setStatementType(StatementType statementType)

getMaxMessagesPerPoll

public int getMaxMessagesPerPoll()

setMaxMessagesPerPoll

public void setMaxMessagesPerPoll(int maxMessagesPerPoll)


Apache CAMEL