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 protectedReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate, Expression queryExpression)protectedReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, Expression queryExpression) -
Method Summary
Modifier and Type Method Description ReactiveMongoDbMessageSourceSpeccollectionName(String collectionName)Configure a collection name to query against.ReactiveMongoDbMessageSourceSpeccollectionNameExpression(String collectionNameExpression)Configure a SpEL expression to evaluation a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpeccollectionNameExpression(Expression collectionNameExpression)Configure a SpEL expression to evaluation a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpeccollectionNameSupplier(Supplier<String> collectionNameSupplier)Configure aSupplierto obtain a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpecentityClass(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.ReactiveMongoDbMessageSourceSpecexpectSingleResult(boolean expectSingleResult)Allow you to manage which find* method to invoke onReactiveMongoOperations.ReactiveMongoDbMessageSourceSpecmongoConverter(MongoConverter mongoConverter)Configure a customMongoConverterused 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, stopMethods 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 aSupplierto obtain a collection name on eachreceive()call.- Parameters:
collectionNameSupplier- theSupplierfor 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 customMongoConverterused 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)
-