クラス MongoDbMessageSource
java.lang.ObjectSE
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
org.springframework.integration.mongodb.inbound.AbstractMongoDbMessageSource<ObjectSE>
org.springframework.integration.mongodb.inbound.MongoDbMessageSource
- 実装されたすべてのインターフェース:
Aware
、BeanFactoryAware
、BeanNameAware
、DisposableBean
、InitializingBean
、ApplicationContextAware
、MessageSource<ObjectSE>
、IntegrationPattern
、NamedComponent
、IntegrationInboundManagement
、IntegrationManagement
Query
の実行の結果であるペイロードを含む Message
を返す MessageSource
のインスタンス。expectSingleResult が false(デフォルト)の場合、MongoDb Query
は、List
SE を返す MongoOperations.find(Query, Class)
メソッドを使用して実行されます。返された List
SE は、{AbstractMessageSource.receive()
メソッドによって返される Message
のペイロードとして使用されます。空の List
SE は null として扱われるため、{AbstractMessageSource.receive()
メソッドによって Message
が返されることはありません。expectSingleResult が true の場合、代わりに MongoOperations.findOne(Query, Class)
が使用され、メッセージペイロードはクエリから返される単一のオブジェクトになります。
- 導入:
- 2.2
- 作成者:
- Amol Nayak, Oleg Zhurakousky, Yaron Yamin, Artem Bilan, Gary Russell
ネストされたクラスのサマリー
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverrides
フィールドサマリー
クラス org.springframework.integration.mongodb.inbound.AbstractMongoDbMessageSource から継承されたフィールド
queryExpression
クラス org.springframework.integration.util.AbstractExpressionEvaluator から継承されたフィールド
EXPRESSION_PARSER, logger
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
コンストラクターのサマリー
コンストラクターコンストラクター説明MongoDbMessageSource
(MongoOperations mongoTemplate, Expression queryExpression) 提供されたMongoOperations
および SpEL 式を使用してインスタンスを作成します。これは、Mongo の「クエリ」文字列に解決されます(https://www.mongodb.org/display/DOCS/Querying) を参照)。MongoDbMessageSource
(MongoDatabaseFactory mongoDbFactory, Expression queryExpression) 提供されたMongoDatabaseFactory
および SpEL 式を使用してインスタンスを作成します。これは、MongoDb の「クエリ」文字列に解決されます(https://www.mongodb.org/display/DOCS/Querying) を参照)。メソッドのサマリー
クラス org.springframework.integration.mongodb.inbound.AbstractMongoDbMessageSource から継承されたメソッド
evaluateCollectionNameExpression, evaluateQueryExpression, evaluateUpdateExpression, getApplicationContext, getByIdInQuery, getCollectionNameExpression, getEntityClass, getMongoConverter, getUpdateExpression, idForEntity, isExpectSingleResult, isInitialized, setApplicationContext, setCollectionNameExpression, setEntityClass, setExpectSingleResult, setInitialized, setMongoConverter, setUpdateExpression
クラス org.springframework.integration.endpoint.AbstractMessageSource から継承されたメソッド
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType
クラス org.springframework.integration.util.AbstractExpressionEvaluator から継承されたメソッド
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
getThisAs, isObserved, registerObservationRegistry
インターフェース org.springframework.integration.core.MessageSource から継承されたメソッド
getIntegrationPatternType
コンストラクターの詳細
MongoDbMessageSource
提供されたMongoDatabaseFactory
および SpEL 式を使用してインスタンスを作成します。これは MongoDb の "query" 文字列に解決されます(https://www.mongodb.org/display/DOCS/Querying) を参照してください。"queryExpression" はAbstractMessageSource.receive()
メソッドを呼び出すたびに評価されます。- パラメーター:
mongoDbFactory
- mongodb ファクトリ。queryExpression
- クエリ式。
MongoDbMessageSource
Mongo ' クエリ ' 文字列に解決される必要がある提供されたMongoOperations
および SpEL 式を使用してインスタンスを作成します(https://www.mongodb.org/display/DOCS/Querying) を参照してください。MongoOperations
が完全に初期化され、使用できる状態にあることを前提としています。'queryExpression' は、AbstractMessageSource.receive()
メソッド。- パラメーター:
mongoTemplate
- mongo テンプレート。queryExpression
- クエリ式。
メソッドの詳細
getComponentType
onInit
protected void onInit()- オーバーライド:
- クラス
AbstractMongoDbMessageSource<ObjectSE>
のonInit
doReceive
Query
を実行し、その結果をメッセージペイロードとして返します。ペイロードは、AbstractMongoDbMessageSource.getEntityClass()
で識別された型のオブジェクトの要素をList
SE とするか、AbstractMongoDbMessageSource.isExpectSingleResult()
属性の値(デフォルトは 'false' )に基づいてAbstractMongoDbMessageSource.getEntityClass()
で識別された型の単一の要素をMessage
とし、List
SE 型のペイロードを返すかのいずれかです。クエリで使用されるコレクション名は、MongoHeaders.COLLECTION_NAME
ヘッダーで指定されます。- 次で指定:
- クラス
AbstractMessageSource<ObjectSE>
のdoReceive
- 戻り値:
- 返された値。