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:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<ReactiveMongoDbMessageSource>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class ReactiveMongoDbMessageSourceSpec extends org.springframework.integration.dsl.MessageSourceSpec<ReactiveMongoDbMessageSourceSpec,ReactiveMongoDbMessageSource>
A
MessageSourceSpec implementation for a ReactiveMongoDbMessageSource.- Since:
- 5.3
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedReactiveMongoDbMessageSourceSpec(org.springframework.data.mongodb.core.ReactiveMongoOperations reactiveMongoTemplate, org.springframework.expression.Expression queryExpression)protectedReactiveMongoDbMessageSourceSpec(org.springframework.data.mongodb.ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, org.springframework.expression.Expression queryExpression) -
Method Summary
Modifier and Type Method Description ReactiveMongoDbMessageSourceSpeccollectionName(java.lang.String collectionName)Configure a collection name to query against.ReactiveMongoDbMessageSourceSpeccollectionNameExpression(java.lang.String collectionNameExpression)Configure a SpEL expression to evaluation a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpeccollectionNameExpression(org.springframework.expression.Expression collectionNameExpression)Configure a SpEL expression to evaluation a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpeccollectionNameSupplier(java.util.function.Supplier<java.lang.String> collectionNameSupplier)Configure aSupplierto obtain a collection name on eachreceive()call.ReactiveMongoDbMessageSourceSpecentityClass(java.lang.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(org.springframework.data.mongodb.core.convert.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, stop
-
Constructor Details
-
ReactiveMongoDbMessageSourceSpec
protected ReactiveMongoDbMessageSourceSpec(org.springframework.data.mongodb.ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, org.springframework.expression.Expression queryExpression) -
ReactiveMongoDbMessageSourceSpec
protected ReactiveMongoDbMessageSourceSpec(org.springframework.data.mongodb.core.ReactiveMongoOperations reactiveMongoTemplate, org.springframework.expression.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
public ReactiveMongoDbMessageSourceSpec collectionNameExpression(java.lang.String 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(java.util.function.Supplier<java.lang.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(org.springframework.expression.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
public ReactiveMongoDbMessageSourceSpec mongoConverter(org.springframework.data.mongodb.core.convert.MongoConverter 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)
-