Class StoredProcMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.jdbc.StoredProcMessageHandler
- All Implemented Interfaces:
org.reactivestreams.Subscriber<Message<?>>
,Aware
,BeanFactoryAware
,BeanNameAware
,DisposableBean
,InitializingBean
,ApplicationContextAware
,Ordered
,ExpressionCapable
,Orderable
,IntegrationPattern
,NamedComponent
,IntegrationManagement
,TrackableComponent
,MessageHandler
,reactor.core.CoreSubscriber<Message<?>>
A message handler that executes Stored Procedures for update purposes.
Stored procedure parameter values are by default automatically extracted from
the Payload if the payload's bean properties match the parameters of the Stored
Procedure.
This may be sufficient for basic use cases. For more sophisticated options
consider passing in one or more
ProcedureParameter
.
If you need to handle the return parameters of the called stored procedure
explicitly, please consider using a StoredProcOutboundGateway
instead.
Also, if you need to execute SQL Functions, please also use the
StoredProcOutboundGateway
. As functions are typically used to look up
values, only, the Stored Procedure message handler purposefully does not support
SQL function calls. If you believe there are valid use-cases for that, please file a
feature request at https://jira.springsource.org.- Since:
- 2.1
- Author:
- Gunnar Hillert, Gary Russell, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides
-
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionStoredProcMessageHandler
(StoredProcExecutor storedProcExecutor) Constructor passing in theStoredProcExecutor
. -
Method Summary
Modifier and TypeMethodDescriptionSubclasses may implement this method to provide component type information.protected void
handleMessageInternal
(Message<?> message) Executes the Stored procedure, delegates to executeStoredProcedure(...).Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConvention
Methods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface reactor.core.CoreSubscriber
currentContext
Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAs
Methods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
StoredProcMessageHandler
Constructor passing in theStoredProcExecutor
.- Parameters:
storedProcExecutor
- Must not be null.
-
-
Method Details
-
getComponentType
Description copied from class:IntegrationObjectSupport
Subclasses may implement this method to provide component type information.- Specified by:
getComponentType
in interfaceNamedComponent
- Overrides:
getComponentType
in classMessageHandlerSupport
-
handleMessageInternal
Executes the Stored procedure, delegates to executeStoredProcedure(...). Any return values from the Stored procedure are ignored. Return values are logged at debug level, though.- Specified by:
handleMessageInternal
in classAbstractMessageHandler
-