public class StoredProcOutboundGateway
extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler
Constructor and Description |
---|
StoredProcOutboundGateway(StoredProcExecutor storedProcExecutor)
Constructor taking
StoredProcExecutor . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentType() |
protected java.lang.Object |
handleRequestMessage(org.springframework.messaging.Message<?> requestMessage) |
void |
setExpectSingleResult(boolean expectSingleResult)
This parameter indicates that only one result object shall be returned from
the Stored Procedure/Function Call.
|
doInit, doInvokeAdvisedRequestHandler, handleMessageInternal, hasAdviceChain, onInit, produceReply, setAdviceChain, setBeanClassLoader, setChannelResolver, setRequiresReply, shouldCopyRequestHeaders
getOutputChannel, setOutputChannel, setOutputChannelName, setSendTimeout
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public StoredProcOutboundGateway(StoredProcExecutor storedProcExecutor)
StoredProcExecutor
.storedProcExecutor
- Must not be null.public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.handler.AbstractMessageHandler
protected java.lang.Object handleRequestMessage(org.springframework.messaging.Message<?> requestMessage)
handleRequestMessage
in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
public 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.