org.apache.camel.component.mybatis
Class MyBatisEndpoint

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.mybatis.MyBatisEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId

public class MyBatisEndpoint
extends DefaultPollingEndpoint

Version:

Constructor Summary
MyBatisEndpoint()
           
MyBatisEndpoint(String endpointUri, Component component, String statement)
           
 
Method Summary
 Consumer 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
 MyBatisComponent getComponent()
          Returns the component that created this endpoint.
 int getMaxMessagesPerPoll()
           
 MyBatisProcessingStrategy getProcessingStrategy()
           
 org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()
           
 String getStatement()
           
 StatementType getStatementType()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
 void setMaxMessagesPerPoll(int maxMessagesPerPoll)
           
 void setProcessingStrategy(MyBatisProcessingStrategy processingStrategy)
           
 void setStatement(String statement)
           
 void setStatementType(StatementType statementType)
           
 
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, sanitizeUri, 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

MyBatisEndpoint

public MyBatisEndpoint()

MyBatisEndpoint

public MyBatisEndpoint(String endpointUri,
                       Component component,
                       String statement)
Method Detail

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 Consumer 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

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.

getComponent

public MyBatisComponent 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

getSqlSessionFactory

public org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()
                                                                 throws IOException
Throws:
IOException

getStatement

public String getStatement()

setStatement

public void setStatement(String statement)

getStatementType

public StatementType getStatementType()

setStatementType

public void setStatementType(StatementType statementType)

getProcessingStrategy

public MyBatisProcessingStrategy getProcessingStrategy()

setProcessingStrategy

public void setProcessingStrategy(MyBatisProcessingStrategy processingStrategy)

getMaxMessagesPerPoll

public int getMaxMessagesPerPoll()

setMaxMessagesPerPoll

public void setMaxMessagesPerPoll(int maxMessagesPerPoll)


Apache CAMEL