public class JdbcPollingChannelAdapter extends AbstractMessageSource<java.lang.Object>
IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
JdbcPollingChannelAdapter(javax.sql.DataSource dataSource,
java.lang.String selectQuery)
Constructor taking
DataSource from which the DB Connection can be
obtained and the select query to execute to retrieve new rows. |
JdbcPollingChannelAdapter(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.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 java.util.List<?> |
doPoll(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource) |
protected java.lang.Object |
doReceive()
Execute the select query and the update query if provided.
|
java.lang.String |
getComponentType() |
protected void |
onInit() |
void |
setMaxRows(int maxRows)
The maximum number of rows to query.
|
void |
setMaxRowsPerPoll(int maxRows)
Deprecated.
since 5.1 in favor of
setMaxRows(int) |
void |
setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper) |
void |
setSelectSqlParameterSource(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)
A source of parameters for the select query used for polling.
|
void |
setUpdatePerRow(boolean updatePerRow) |
void |
setUpdateSql(java.lang.String updateSql) |
void |
setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory) |
buildMessage, destroy, getComponentName, getManagedName, getManagedType, getMessageCount, getMessageCountLong, getOverrides, isCountsEnabled, isLoggingEnabled, receive, registerMetricsCaptor, reset, setBeanName, setCountsEnabled, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServicepublic JdbcPollingChannelAdapter(javax.sql.DataSource dataSource,
java.lang.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(org.springframework.jdbc.core.JdbcOperations jdbcOperations,
java.lang.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 void setRowMapper(org.springframework.jdbc.core.RowMapper<?> rowMapper)
public void setUpdateSql(java.lang.String updateSql)
public void setUpdatePerRow(boolean updatePerRow)
public void setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setSelectSqlParameterSource(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)
sqlQueryParameterSource - the sql query parameter source to set@Deprecated public void setMaxRowsPerPoll(int maxRows)
setMaxRows(int)maxRows - the max rows to setpublic void setMaxRows(int maxRows)
maxRows - the max rows to setprotected void onInit()
onInit in class AbstractExpressionEvaluatorpublic java.lang.String getComponentType()
protected java.lang.Object doReceive()
doReceive in class AbstractMessageSource<java.lang.Object>protected java.util.List<?> doPoll(org.springframework.jdbc.core.namedparam.SqlParameterSource sqlQueryParameterSource)