クラス 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, Ngoc Nhan
ネストされたクラスの概要
インターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
フィールドクラス AbstractExpressionEvaluator から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明protected StringSEprotected Queryprotected @Nullable Updateprotected QuerygetByIdInQuery(CollectionSE<?> entities) ClassSE<?> @Nullable ExpressionidForEntity(ObjectSE entity) booleanprotected booleanprotected 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を指定します。クラス AbstractMessageSource から継承されたメソッド
buildMessage, destroy, doReceive, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeクラス AbstractExpressionEvaluator から継承されたメソッド
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionService, setSimpleEvaluationContextクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース IntegrationManagement から継承されたメソッド
getThisAs, isObserved, registerObservationRegistryインターフェース MessageSource から継承されたメソッド
getIntegrationPatternTypeインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentType
フィールドの詳細
queryExpression
コンストラクターの詳細
AbstractMongoDbMessageSource
方法の詳細
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