Class ReactiveMongoDbMessageSourceSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageSourceSpec<ReactiveMongoDbMessageSourceSpec,ReactiveMongoDbMessageSource>
org.springframework.integration.mongodb.dsl.ReactiveMongoDbMessageSourceSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<ReactiveMongoDbMessageSource>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
public class ReactiveMongoDbMessageSourceSpec extends MessageSourceSpec<ReactiveMongoDbMessageSourceSpec,ReactiveMongoDbMessageSource>
A
MessageSourceSpec
implementation for a ReactiveMongoDbMessageSource
.- Since:
- 5.3
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate, Expression queryExpression)
protected
ReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, Expression queryExpression)
-
Method Summary
Modifier and Type Method Description ReactiveMongoDbMessageSourceSpec
collectionName(String collectionName)
Configure a collection name to query against.ReactiveMongoDbMessageSourceSpec
collectionNameExpression(String collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on eachreceive()
call.ReactiveMongoDbMessageSourceSpec
collectionNameExpression(Expression collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on eachreceive()
call.ReactiveMongoDbMessageSourceSpec
collectionNameSupplier(Supplier<String> collectionNameSupplier)
Configure aSupplier
to obtain a collection name on eachreceive()
call.ReactiveMongoDbMessageSourceSpec
entityClass(Class<?> entityClass)
Allow you to set the type of the entityClass that will be passed to theReactiveMongoOperations.find(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>)
orReactiveMongoOperations.findOne(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>)
method.ReactiveMongoDbMessageSourceSpec
expectSingleResult(boolean expectSingleResult)
Allow you to manage which find* method to invoke onReactiveMongoOperations
.ReactiveMongoDbMessageSourceSpec
mongoConverter(MongoConverter mongoConverter)
Configure a customMongoConverter
used to assist in deserialization data read from MongoDb.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
ReactiveMongoDbMessageSourceSpec
protected ReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, Expression queryExpression) -
ReactiveMongoDbMessageSourceSpec
protected ReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate, Expression queryExpression)
-
-
Method Details
-
entityClass
Allow you to set the type of the entityClass that will be passed to theReactiveMongoOperations.find(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>)
orReactiveMongoOperations.findOne(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>)
method. Default isDBObject
.- Parameters:
entityClass
- The entity class.- Returns:
- the spec
- See Also:
ReactiveMongoDbMessageSource.setEntityClass(Class)
-
expectSingleResult
Allow you to manage which find* method to invoke onReactiveMongoOperations
.- Parameters:
expectSingleResult
- true if a single result is expected.- Returns:
- the spec
- See Also:
ReactiveMongoDbMessageSource.setExpectSingleResult(boolean)
-
collectionName
Configure a collection name to query against.- Parameters:
collectionName
- the name of the MongoDb collection- Returns:
- the spec
-
collectionNameExpression
Configure a SpEL expression to evaluation a collection name on eachreceive()
call.- Parameters:
collectionNameExpression
- the SpEL expression for name of the MongoDb collection- Returns:
- the spec
-
collectionNameSupplier
public ReactiveMongoDbMessageSourceSpec collectionNameSupplier(Supplier<String> collectionNameSupplier)Configure aSupplier
to obtain a collection name on eachreceive()
call.- Parameters:
collectionNameSupplier
- theSupplier
for name of the MongoDb collection- Returns:
- the spec
-
collectionNameExpression
public ReactiveMongoDbMessageSourceSpec collectionNameExpression(Expression collectionNameExpression)Configure a SpEL expression to evaluation a collection name on eachreceive()
call.- Parameters:
collectionNameExpression
- the SpEL expression for name of the MongoDb collection- Returns:
- the spec
- See Also:
ReactiveMongoDbMessageSource.setCollectionNameExpression(Expression)
-
mongoConverter
Configure a customMongoConverter
used to assist in deserialization data read from MongoDb. Only allowed if this instance was constructed with aReactiveMongoDatabaseFactory
.- Parameters:
mongoConverter
- The mongo converter.- Returns:
- the spec
- See Also:
ReactiveMongoDbMessageSource.setMongoConverter(MongoConverter)
-