Class StoredProcPollingChannelAdapter
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<Object>
org.springframework.integration.jdbc.StoredProcPollingChannelAdapter
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- MessageSource<Object>,- IntegrationPattern,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement
A polling channel adapter that creates messages from the payload returned by
 executing a stored procedure or Sql function. Optionally an update can be executed
 after the execution of the Stored Procedure or Function in order to update
 processed rows.
- Since:
- 2.1
- Author:
- Gunnar Hillert, Artem Bilan, Gary Russell
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionStoredProcPollingChannelAdapter(StoredProcExecutor storedProcExecutor) Constructor takingStoredProcExecutor.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectExecute the select query and the update query if provided.voidsetExpectSingleResult(boolean expectSingleResult) This parameter indicates that only one result object shall be returned from the Stored Procedure/Function Call.Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSourcebuildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAs, isObserved, registerObservationRegistryMethods inherited from interface org.springframework.integration.core.MessageSourcegetIntegrationPatternType
- 
Constructor Details- 
StoredProcPollingChannelAdapterConstructor takingStoredProcExecutor.- Parameters:
- storedProcExecutor- Must not be null.
 
 
- 
- 
Method Details- 
setExpectSingleResultpublic void setExpectSingleResult(boolean expectSingleResult) This parameter indicates that only one result object shall be returned from the Stored Procedure/Function Call. If set to true, a resultMap that contains only 1 element, will have that 1 element extracted and returned as payload. If the resultMap contains more than 1 element and expectSingleResult is true, then aMessagingExceptionis thrown. Otherwise the complete resultMap is returned as theMessagepayload. Important Note: Several databases such as H2 are not fully supported. The H2 database, for example, does not fully support theCallableStatementsemantics and when executing function calls against H2, a result list is returned rather than a single value. Therefore, even if you set expectSingleResult = true, you may end up with a collection being returned.- Parameters:
- expectSingleResult- true if a single result is expected.
 
- 
doReceiveExecute the select query and the update query if provided. Returns the rows returned by the select query. If a RowMapper has been provided, the mapped results are returned.- Specified by:
- doReceivein class- AbstractMessageSource<Object>
- Returns:
- The value returned.
 
- 
getComponentType
 
-