public class ReactiveMongoDbMessageSourceSpec extends MessageSourceSpec<ReactiveMongoDbMessageSourceSpec,ReactiveMongoDbMessageSource>
MessageSourceSpec implementation for a ReactiveMongoDbMessageSource.PARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
ReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory,
Expression queryExpression) |
protected |
ReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate,
Expression queryExpression) |
| Modifier and Type | Method and Description |
|---|---|
ReactiveMongoDbMessageSourceSpec |
collectionName(String collectionName)
Configure a collection name to query against.
|
ReactiveMongoDbMessageSourceSpec |
collectionNameExpression(Expression collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on each
receive() call. |
ReactiveMongoDbMessageSourceSpec |
collectionNameExpression(String collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on each
receive() call. |
ReactiveMongoDbMessageSourceSpec |
collectionNameSupplier(java.util.function.Supplier<String> collectionNameSupplier)
Configure a
Supplier to obtain a collection name on each receive() call. |
ReactiveMongoDbMessageSourceSpec |
entityClass(Class<?> entityClass)
Allow you to set the type of the entityClass that will be passed to the
ReactiveMongoOperations.find(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>) or ReactiveMongoOperations.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 on
ReactiveMongoOperations. |
ReactiveMongoDbMessageSourceSpec |
mongoConverter(MongoConverter mongoConverter)
Configure a custom
MongoConverter used to assist in deserialization
data read from MongoDb. |
messageHeaders_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected ReactiveMongoDbMessageSourceSpec(ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, Expression queryExpression)
protected ReactiveMongoDbMessageSourceSpec(ReactiveMongoOperations reactiveMongoTemplate, Expression queryExpression)
public ReactiveMongoDbMessageSourceSpec entityClass(Class<?> entityClass)
ReactiveMongoOperations.find(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>) or ReactiveMongoOperations.findOne(org.springframework.data.mongodb.core.query.Query, java.lang.Class<T>)
method.
Default is DBObject.entityClass - The entity class.ReactiveMongoDbMessageSource.setEntityClass(Class)public ReactiveMongoDbMessageSourceSpec expectSingleResult(boolean expectSingleResult)
ReactiveMongoOperations.expectSingleResult - true if a single result is expected.ReactiveMongoDbMessageSource.setExpectSingleResult(boolean)public ReactiveMongoDbMessageSourceSpec collectionName(String collectionName)
collectionName - the name of the MongoDb collectionpublic ReactiveMongoDbMessageSourceSpec collectionNameExpression(String collectionNameExpression)
receive() call.collectionNameExpression - the SpEL expression for name of the MongoDb collectionpublic ReactiveMongoDbMessageSourceSpec collectionNameSupplier(java.util.function.Supplier<String> collectionNameSupplier)
Supplier to obtain a collection name on each receive() call.collectionNameSupplier - the Supplier for name of the MongoDb collectionpublic ReactiveMongoDbMessageSourceSpec collectionNameExpression(Expression collectionNameExpression)
receive() call.collectionNameExpression - the SpEL expression for name of the MongoDb collectionReactiveMongoDbMessageSource.setCollectionNameExpression(Expression)public ReactiveMongoDbMessageSourceSpec mongoConverter(MongoConverter mongoConverter)
MongoConverter used to assist in deserialization
data read from MongoDb. Only allowed if this instance was constructed with a
ReactiveMongoDatabaseFactory.mongoConverter - The mongo converter.ReactiveMongoDbMessageSource.setMongoConverter(MongoConverter)