|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.jdbc.JdbcPollingChannelAdapter
public class JdbcPollingChannelAdapter
A polling channel adapter that creates messages from the payload returned by executing a select query. Optionally an update can be executed after the select in order to update processed rows.
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
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(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. |
|
| Method Summary | |
|---|---|
protected java.util.List<?> |
doPoll(SqlParameterSource sqlQueryParameterSource)
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information. |
Message<java.lang.Object> |
receive()
Executes the query. |
void |
setMaxRowsPerPoll(int maxRows)
The maximum number of rows to pull out of the query results per poll (if greater than zero, otherwise all rows will be packed into the outgoing message). |
void |
setRowMapper(RowMapper<?> rowMapper)
|
void |
setSelectSqlParameterSource(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)
|
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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 - used to create a SimpleJdbcTemplateselectQuery - query to execute
public JdbcPollingChannelAdapter(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 execute| Method Detail |
|---|
public void setRowMapper(RowMapper<?> rowMapper)
public void setUpdateSql(java.lang.String updateSql)
public void setUpdatePerRow(boolean updatePerRow)
public void setUpdateSqlParameterSourceFactory(SqlParameterSourceFactory sqlParameterSourceFactory)
public void setSelectSqlParameterSource(SqlParameterSource sqlQueryParameterSource)
sqlQueryParameterSource - the sql query parameter source to setpublic void setMaxRowsPerPoll(int maxRows)
maxRows - the max rows to setpublic Message<java.lang.Object> receive()
null.
receive in interface MessageSource<java.lang.Object>protected java.util.List<?> doPoll(SqlParameterSource sqlQueryParameterSource)
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupport
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||