Class AbstractMongoDbMessageSourceSpec<S extends AbstractMongoDbMessageSourceSpec<S,H>,H extends AbstractMongoDbMessageSource<?>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageSourceSpec<S,H>
org.springframework.integration.mongodb.dsl.AbstractMongoDbMessageSourceSpec<S,H>
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<H>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
- Direct Known Subclasses:
MongoDbMessageSourceSpec
,ReactiveMongoDbMessageSourceSpec
public class AbstractMongoDbMessageSourceSpec<S extends AbstractMongoDbMessageSourceSpec<S,H>,H extends AbstractMongoDbMessageSource<?>> extends MessageSourceSpec<S,H>
A
MessageSourceSpec
extension for common MongoDB sources options.- Since:
- 5.5
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Constructor Description AbstractMongoDbMessageSourceSpec()
-
Method Summary
Modifier and Type Method Description S
collectionName(String collectionName)
Configure a collection name to query against.S
collectionNameExpression(String collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on eachreceive()
call.S
collectionNameExpression(Expression collectionNameExpression)
Configure a SpEL expression to evaluation a collection name on eachreceive()
call.S
collectionNameSupplier(Supplier<String> collectionNameSupplier)
Configure aSupplier
to obtain a collection name on eachreceive()
call.S
entityClass(Class<?> entityClass)
Allow you to set the type of the entityClass that will be passed to the the MongoDB query method.S
expectSingleResult(boolean expectSingleResult)
Allow you to manage which find* method to invoke.S
mongoConverter(MongoConverter mongoConverter)
Configure a customMongoConverter
used to assist in deserialization data read from MongoDb.S
update(String update)
Configure a MongoDB update.S
update(Update update)
Configure a MongoDB update.S
update(Expression updateExpression)
Configure a SpEL expression to evaluate a MongoDB update.S
updateSupplier(Supplier<Update> updateSupplier)
Configure aSupplier
to produce a MongoDB update on each receive call.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
-
AbstractMongoDbMessageSourceSpec
public AbstractMongoDbMessageSourceSpec()
-
-
Method Details
-
entityClass
Allow you to set the type of the entityClass that will be passed to the the MongoDB query method. Default isDBObject
.- Parameters:
entityClass
- The entity class.- Returns:
- the spec
- See Also:
AbstractMongoDbMessageSource.setEntityClass(Class)
-
expectSingleResult
Allow you to manage which find* method to invoke.- Parameters:
expectSingleResult
- true if a single result is expected.- Returns:
- the spec
- See Also:
AbstractMongoDbMessageSource.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
Configure aSupplier
to obtain a collection name on eachreceive()
call.- Parameters:
collectionNameSupplier
- theSupplier
for 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
- See Also:
AbstractMongoDbMessageSource.setCollectionNameExpression(Expression)
-
mongoConverter
Configure a customMongoConverter
used to assist in deserialization data read from MongoDb.- Parameters:
mongoConverter
- The mongo converter.- Returns:
- the spec
- See Also:
AbstractMongoDbMessageSource.setMongoConverter(MongoConverter)
-
update
Configure a MongoDB update.- Parameters:
update
- the MongoDB update.- Returns:
- the spec
-
update
Configure a MongoDB update.- Parameters:
update
- the MongoDB update.- Returns:
- the spec
-
updateSupplier
Configure aSupplier
to produce a MongoDB update on each receive call.- Parameters:
updateSupplier
- theSupplier
for MongoDB update.- Returns:
- the spec
-
update
Configure a SpEL expression to evaluate a MongoDB update.- Parameters:
updateExpression
- the expression to evaluate a MongoDB update.- Returns:
- the spec
-