@ManagedResource public class IntegrationMBeanExporter extends MBeanExporter implements ApplicationContextAware, DestructionAwareBeanPostProcessor
既存のアプリケーションの Spring Integration コンポーネント用の MBean エクスポーター。このインスタンスを Bean 定義として、監視する必要があるコンポーネントと同じコンテキストで追加すると、すべてのメッセージチャネルとメッセージハンドラーが公開されます。
チャネルは送信と受信に関するメトリクス (カウント、レート、エラー) を報告し、ハンドラーは実行期間に関するメトリクスを報告します。チャネルは、明示的である場合は名前 (Bean id) で登録され、フレームワークによって登録されている場合は内部名の最後の部分 (例: "nullChannel" ) で登録されます。エンドポイントにアタッチされているハンドラーは、エンドポイント名 (Bean id) がある場合はそのエンドポイント名で登録され、ない場合は入力チャネルの名前で登録されます。ハンドラーオブジェクト名には、名前のソースを報告する bean キーが含まれます。名前がエンドポイント ID の場合は "endpoint"、入力チャネルの場合は "anonymous"、フォールバックとして "handler" (オブジェクト名はハンドラーの toString() のみ) です。
このコンポーネント自体は MBean であり、チャネルとハンドラーの名前とオブジェクト名に関する属性を報告します。Spring の標準 <context:mbean-export/> との競合を回避するために、自身を登録しません(したがって、これらの機能を公開する必要があるときにいつでも使用する必要があります)。
| 修飾子と型 | フィールドと説明 |
|---|---|
static StringSE | DEFAULT_DOMAIN |
AUTODETECT_ALL, AUTODETECT_ASSEMBLER, AUTODETECT_MBEAN, AUTODETECT_NONElogger, server| コンストラクターと説明 |
|---|
IntegrationMBeanExporter() |
adaptMBeanIfPossible, addExcludedBean, afterPropertiesSet, createAndConfigureMBean, createModelMBean, destroy, getObjectName, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerBeans, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeanClassLoader, setBeans, setEnsureUniqueRuntimeObjectNames, setExcludedBeans, setExposeManagedResourceClassLoader, setListeners, setNamingStrategy, setNotificationListenerMappings, setNotificationListeners, unregisterManagedResourcedoRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, setRegistrationPolicy, setServer, unregisterBeanscloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpostProcessBeforeInitializationpublic void setObjectNameStaticProperties(MapSE<StringSE,StringSE> objectNameStaticProperties)
objectNameStaticProperties - 設定する objectNameStaticPropertiespublic void setDefaultDomain(StringSE domain)
spring.application です(これは SpringSource HQ で役立ちます)。domain - 設定するドメイン名 public void setComponentNamePatterns(StringSE[] componentNamePatterns)
componentNamePatterns - パターン。public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
ApplicationContextAware の setApplicationContext BeansExceptionpublic void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAware の setBeanFactory MBeanExporter の setBeanFactory public void afterSingletonsInstantiated()
SmartInitializingSingleton の afterSingletonsInstantiated MBeanExporter の afterSingletonsInstantiated public ObjectSE postProcessAfterInitialization(ObjectSE bean, StringSE beanName) throws BeansException
BeanPostProcessor の postProcessAfterInitialization BeansExceptionpublic boolean requiresDestruction(ObjectSE bean)
DestructionAwareBeanPostProcessor の requiresDestruction public void postProcessBeforeDestruction(ObjectSE bean, StringSE beanName) throws BeansException
DestructionAwareBeanPostProcessor の postProcessBeforeDestruction BeansException@ManagedOperation public void stopActiveComponents(long howLong)
howLong - すべてのアクティビティが完了するまでに合計でミリ秒単位で待機する時間。@ManagedOperation public void stopMessageSources()
@ManagedOperation public void stopInboundMessageProducers()
OrderlyShutdownCapable 以外)を停止します。割り込みが発生する可能性があります。@ManagedOperation public void stopActiveChannels()
protected final void orderlyShutdownCapableComponentsBefore()
protected final void orderlyShutdownCapableComponentsAfter()
@ManagedMetric(metricType=COUNTER, displayName="MessageChannel Count") public int getChannelCount()
@ManagedMetric(metricType=COUNTER, displayName="MessageHandler Count") public int getHandlerCount()
@ManagedMetric(metricType=COUNTER, displayName="MessageSource Count") public int getSourceCount()
@ManagedAttribute public StringSE[] getHandlerNames()
@DeprecatedSE @ManagedMetric(metricType=GAUGE, displayName="No longer supported") public int getActiveHandlerCount()
@DeprecatedSE @ManagedMetric(metricType=GAUGE, displayName="No longer supported") public long getActiveHandlerCountLong()
@ManagedMetric(metricType=GAUGE, displayName="Queued Message Count") public int getQueuedMessageCount()
@ManagedAttribute public StringSE[] getChannelNames()
@Nullable @DeprecatedSE public AbstractMessageHandler getHandlerMetrics(StringSE name)
@Nullable public IntegrationManagement getHandler(StringSE name)
@ManagedAttribute public StringSE[] getSourceNames()
@DeprecatedSE public IntegrationInboundManagement getSourceMetrics(StringSE name)
@DeprecatedSE public IntegrationManagement getChannelMetrics(StringSE name)
public IntegrationInboundManagement getSource(StringSE name)
public IntegrationManagement getChannel(StringSE name)