@UriEndpoint(scheme="sql", consumerClass=SqlConsumer.class) public class SqlEndpoint extends org.apache.camel.impl.DefaultPollingEndpoint
Constructor and Description |
---|
SqlEndpoint() |
SqlEndpoint(String uri,
org.apache.camel.Component component,
org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
String query) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
protected String |
createEndpointUri() |
org.apache.camel.Producer |
createProducer() |
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate() |
int |
getMaxMessagesPerPoll() |
String |
getOnConsume() |
String |
getOnConsumeBatchComplete() |
String |
getOnConsumeFailed() |
String |
getOutputClass() |
SqlOutputType |
getOutputType() |
int |
getParametersCount() |
SqlPrepareStatementStrategy |
getPrepareStatementStrategy() |
SqlProcessingStrategy |
getProcessingStrategy() |
String |
getQuery() |
char |
getSeparator() |
boolean |
isAllowNamedParameters() |
boolean |
isAlwaysPopulateStatement() |
boolean |
isBatch() |
boolean |
isNoop() |
boolean |
isSingleton() |
protected List<?> |
queryForList(ResultSet rs,
boolean allowMapToClass) |
protected Object |
queryForObject(ResultSet rs) |
void |
setAllowNamedParameters(boolean allowNamedParameters) |
void |
setAlwaysPopulateStatement(boolean alwaysPopulateStatement) |
void |
setBatch(boolean batch)
Enables or disables batch mode
|
void |
setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) |
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
Sets the maximum number of messages to poll
|
void |
setNoop(boolean noop) |
void |
setOnConsume(String onConsume) |
void |
setOnConsumeBatchComplete(String onConsumeBatchComplete) |
void |
setOnConsumeFailed(String onConsumeFailed) |
void |
setOutputClass(String outputClass) |
void |
setOutputType(SqlOutputType outputType) |
void |
setParametersCount(int parametersCount) |
void |
setPrepareStatementStrategy(SqlPrepareStatementStrategy prepareStatementStrategy) |
void |
setProcessingStrategy(SqlProcessingStrategy processingStrategy) |
void |
setQuery(String query)
Sets the SQL query to perform
|
void |
setSeparator(char separator) |
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties
configureConsumer, createEndpointConfiguration, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
createConsumer
in class org.apache.camel.impl.DefaultPollingEndpoint
Exception
public boolean isSingleton()
public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
public String getQuery()
public void setQuery(String query)
public boolean isBatch()
public void setBatch(boolean batch)
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public SqlProcessingStrategy getProcessingStrategy()
public void setProcessingStrategy(SqlProcessingStrategy processingStrategy)
public SqlPrepareStatementStrategy getPrepareStatementStrategy()
public void setPrepareStatementStrategy(SqlPrepareStatementStrategy prepareStatementStrategy)
public String getOnConsume()
public void setOnConsume(String onConsume)
public String getOnConsumeFailed()
public void setOnConsumeFailed(String onConsumeFailed)
public String getOnConsumeBatchComplete()
public void setOnConsumeBatchComplete(String onConsumeBatchComplete)
public boolean isAllowNamedParameters()
public void setAllowNamedParameters(boolean allowNamedParameters)
public boolean isAlwaysPopulateStatement()
public void setAlwaysPopulateStatement(boolean alwaysPopulateStatement)
public char getSeparator()
public void setSeparator(char separator)
public SqlOutputType getOutputType()
public void setOutputType(SqlOutputType outputType)
public String getOutputClass()
public void setOutputClass(String outputClass)
public int getParametersCount()
public void setParametersCount(int parametersCount)
public boolean isNoop()
public void setNoop(boolean noop)
protected String createEndpointUri()
createEndpointUri
in class org.apache.camel.impl.DefaultEndpoint
protected List<?> queryForList(ResultSet rs, boolean allowMapToClass) throws SQLException
SQLException
protected Object queryForObject(ResultSet rs) throws SQLException
SQLException
Apache Camel