public class JdbcPollingChannelAdapter extends AbstractMessageSource<Object>
IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
JdbcPollingChannelAdapter(DataSource dataSource,
String selectQuery)
Constructor taking
DataSource from which the DB Connection can be
obtained and the select query to execute to retrieve new rows. |
JdbcPollingChannelAdapter(JdbcOperations jdbcOperations,
String selectQuery)
Constructor taking
JdbcOperations instance to use for query
execution and the select query to execute to retrieve new rows. |
| Modifier and Type | Method and Description |
|---|---|
protected List<?> |
doPoll(SqlParameterSource sqlQueryParameterSource) |
protected Object |
doReceive()
Execute the select query and the update query if provided.
|
String |
getComponentType() |
protected void |
onInit() |
void |
setMaxRows(int maxRows)
The maximum number of rows to query.
|
void |
setRowMapper(RowMapper<?> rowMapper) |
void |
setSelectQuery(String selectQuery)
Set the select query.
|
void |
setSelectSqlParameterSource(SqlParameterSource sqlQueryParameterSource)
A source of parameters for the select query used for polling.
|
void |
setUpdatePerRow(boolean updatePerRow) |
void |
setUpdateSql(String updateSql) |
void |
setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIntegrationPatternTypegetThisAspublic JdbcPollingChannelAdapter(DataSource dataSource, String selectQuery)
DataSource from which the DB Connection can be
obtained and the select query to execute to retrieve new rows.dataSource - Must not be nullselectQuery - query to executepublic JdbcPollingChannelAdapter(JdbcOperations jdbcOperations, String selectQuery)
JdbcOperations instance to use for query
execution and the select query to execute to retrieve new rows.jdbcOperations - instance to use for query executionselectQuery - query to executepublic final void setSelectQuery(String selectQuery)
selectQuery - the query.public void setUpdateSql(String updateSql)
public void setUpdatePerRow(boolean updatePerRow)
public void setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setSelectSqlParameterSource(@Nullable SqlParameterSource sqlQueryParameterSource)
sqlQueryParameterSource - the sql query parameter source to setpublic void setMaxRows(int maxRows)
maxRows - the max rows to setprotected void onInit()
onInit in class AbstractExpressionEvaluatorpublic String getComponentType()
protected Object doReceive()
doReceive in class AbstractMessageSource<Object>protected List<?> doPoll(@Nullable SqlParameterSource sqlQueryParameterSource)