クラス AbstractMongoDbMessageSource<T>
java.lang.ObjectSE
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
org.springframework.integration.mongodb.inbound.AbstractMongoDbMessageSource<T>
- 型パラメーター:
T- ペイロード型。
- 実装されているすべてのインターフェース:
Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、ApplicationContextAware、MessageSource<T>、IntegrationPattern、NamedComponent、IntegrationInboundManagement、IntegrationManagement
- 既知の直属サブクラス
MongoDbMessageSource,ReactiveMongoDbMessageSource
public abstract class AbstractMongoDbMessageSource<T> extends AbstractMessageSource<T> implements ApplicationContextAware
一般的な MongoDB ソースオプションとサポートメソッドの
AbstractMessageSource 拡張。- 導入:
- 5.5
- 作成者:
- Artem Bilan
ネストされたクラスの要約
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected ExpressionqueryExpressionクラス org.springframework.integration.util.AbstractExpressionEvaluator から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEコンストラクターの概要
コンストラクター 修飾子 コンストラクター 説明 protectedAbstractMongoDbMessageSource(Expression queryExpression)メソッドのサマリー
修飾子と型 メソッド 説明 protected StringSEevaluateCollectionNameExpression()protected QueryevaluateQueryExpression()protected UpdateevaluateUpdateExpression()ApplicationContextgetApplicationContext()protected QuerygetByIdInQuery(CollectionSE<?> entities)ExpressiongetCollectionNameExpression()ClassSE<?>getEntityClass()MongoConvertergetMongoConverter()ExpressiongetUpdateExpression()protected org.springframework.data.util.Pair<StringSE,ObjectSE>idForEntity(ObjectSE entity)booleanisExpectSingleResult()protected booleanisInitialized()protected voidonInit()voidsetApplicationContext(ApplicationContext applicationContext)voidsetCollectionNameExpression(Expression collectionNameExpression)Queryで使用されるコレクション名に解決される SpELExpressionを設定します。voidsetEntityClass(ClassSE<?> entityClass)MongoDb テンプレートの検索操作に渡される entityClass の型を設定します。voidsetExpectSingleResult(boolean expectSingleResult)呼び出す find * メソッドを管理します。protected voidsetInitialized(boolean initialized)voidsetMongoConverter(MongoConverter mongoConverter)MongoDb から読み取られたデータの逆直列化を支援するために使用されるカスタムMongoConverterを提供します。voidsetUpdateExpression(Expression updateExpression)コレクションからポーリングされたレコードに対して、オプションのupdateを指定します。クラス org.springframework.integration.endpoint.AbstractMessageSource から継承されたメソッド
buildMessage, destroy, doReceive, 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インターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getComponentType
フィールドの詳細
コンストラクターの詳細
メソッドの詳細
setEntityClass
MongoDb テンプレートの検索操作に渡される entityClass の型を設定します。デフォルトはDBObjectです。- パラメーター:
entityClass- エンティティクラス。
setExpectSingleResult
public void setExpectSingleResult(boolean expectSingleResult)呼び出す find * メソッドを管理します。デフォルトは "false" です。これは、AbstractMessageSource.receive()メソッドがfind()メソッドを使用することを意味します。'true' に設定すると、AbstractMessageSource.receive()はfindOne(Query, Class)を使用し、返されるMessageのペイロードは、リストではなくentityClassで識別される型の返されるターゲットオブジェクトになります。- パラメーター:
expectSingleResult- 単一の結果が期待される場合は true。
setCollectionNameExpression
Queryで使用されるコレクション名に解決される SpELExpressionを設定します。結果のコレクション名は、MongoHeaders.COLLECTION_NAMEヘッダーに含まれます。- パラメーター:
collectionNameExpression- コレクション名の式。
setMongoConverter
MongoDb から読み取られたデータの逆直列化を支援するために使用されるカスタムMongoConverterを提供します。- パラメーター:
mongoConverter- mongo コンバーター。
setUpdateExpression
コレクションからポーリングされたレコードに対して、オプションのupdateを指定します。- パラメーター:
updateExpression-UpdateDefinitionの SpEL 式。- 導入:
- 5.5
setApplicationContext
- 次で指定:
- インターフェース
ApplicationContextAwareのsetApplicationContext - 例外:
BeansException
getCollectionNameExpression
getMongoConverter
getEntityClass
isExpectSingleResult
public boolean isExpectSingleResult()getUpdateExpression
getApplicationContext
setInitialized
protected void setInitialized(boolean initialized)isInitialized
protected boolean isInitialized()onInit
protected void onInit()- オーバーライド:
- クラス
AbstractExpressionEvaluatorのonInit
evaluateQueryExpression
evaluateCollectionNameExpression
getByIdInQuery
idForEntity
evaluateUpdateExpression