Class R2dbcMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractReactiveMessageHandler
org.springframework.integration.r2dbc.outbound.R2dbcMessageHandler
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Ordered,- ExpressionCapable,- Orderable,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- TrackableComponent,- ReactiveMessageHandler
Implementation of 
ReactiveMessageHandler which writes
 Message payload into a Relational Database, using reactive r2dbc support.- Since:
- 5.4
- Author:
- Rohan Mukesh, Artem Bilan
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionR2dbcMessageHandler(org.springframework.data.r2dbc.core.R2dbcEntityOperations r2dbcEntityOperations) Construct this instance using a fully created and initialized instance of providedR2dbcEntityOperations.
- 
Method SummaryModifier and TypeMethodDescriptionSubclasses may implement this method to provide component type information.protected reactor.core.publisher.Mono<Void>handleMessageInternal(Message<?> message) protected voidonInit()Subclasses may implement this for initialization logic.voidsetCriteriaExpression(Expression criteriaExpression) Set a SpEL expression to evaluate aCriteriafor query to execute.voidSet aR2dbcMessageHandler.Typefor query to execute.voidsetQueryTypeExpression(Expression queryTypeExpression) Set a SpEL expression to evaluate aR2dbcMessageHandler.Typefor query to execute.voidsetTableName(String tableName) Specify a table in the target database to execute the query.voidsetTableNameExpression(Expression tableNameExpression) Set a SpEL expression to evaluate a table name at runtime against request message.voidsetValuesExpression(Expression valuesExpression) Set a SpEL expression to evaluate aMapfor name-value pairs to bind as parameters into a query.Methods inherited from class org.springframework.integration.handler.AbstractReactiveMessageHandlerhandleMessageMethods inherited from class org.springframework.integration.handler.MessageHandlerSupportbuildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
R2dbcMessageHandlerpublic R2dbcMessageHandler(org.springframework.data.r2dbc.core.R2dbcEntityOperations r2dbcEntityOperations) Construct this instance using a fully created and initialized instance of providedR2dbcEntityOperations.- Parameters:
- r2dbcEntityOperations- The R2dbcEntityOperations implementation.
 
 
- 
- 
Method Details- 
setQueryTypeSet aR2dbcMessageHandler.Typefor query to execute.- Parameters:
- type- the- R2dbcMessageHandler.Typeto use.
 
- 
setQueryTypeExpressionSet a SpEL expression to evaluate aR2dbcMessageHandler.Typefor query to execute.- Parameters:
- queryTypeExpression- the expression to use.
 
- 
setTableNameSpecify a table in the target database to execute the query.- Parameters:
- tableName- the name of the table to use.
 
- 
setTableNameExpressionSet a SpEL expression to evaluate a table name at runtime against request message.- Parameters:
- tableNameExpression- the expression to use.
 
- 
setValuesExpressionSet a SpEL expression to evaluate aMapfor name-value pairs to bind as parameters into a query.- Parameters:
- valuesExpression- the expression to use.
 
- 
setCriteriaExpressionSet a SpEL expression to evaluate aCriteriafor query to execute.- Parameters:
- criteriaExpression- the expression to use.
 
- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- MessageHandlerSupport
 
- 
onInitprotected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
- onInitin class- IntegrationObjectSupport
 
- 
handleMessageInternal- Specified by:
- handleMessageInternalin class- AbstractReactiveMessageHandler
 
 
-