public class StoredProcPollingChannelAdapter extends IntegrationObjectSupport implements MessageSource<java.lang.Object>
EXPRESSION_PARSER, logger| Constructor and Description |
|---|
StoredProcPollingChannelAdapter(StoredProcExecutor storedProcExecutor)
Constructor taking
StoredProcExecutor. |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,?> |
doPoll() |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
org.springframework.messaging.Message<java.lang.Object> |
receive()
Executes the query.
|
void |
setExpectSingleResult(boolean expectSingleResult)
This parameter indicates that only one result object shall be returned from
the Stored Procedure/Function Call.
|
afterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic StoredProcPollingChannelAdapter(StoredProcExecutor storedProcExecutor)
StoredProcExecutor.storedProcExecutor - Must not be null.public org.springframework.messaging.Message<java.lang.Object> receive()
null.receive in interface MessageSource<java.lang.Object>protected java.util.Map<java.lang.String,?> doPoll()
public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportpublic void setExpectSingleResult(boolean expectSingleResult)
MessagingException is thrown.
Otherwise the complete resultMap is returned as the Message payload.
Important Note: Several databases such as H2 are not fully supported.
The H2 database, for example, does not fully support the CallableStatement
semantics 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.expectSingleResult - true if a single result is expected.