Class JMXMediationFlowObserver
java.lang.Object
org.wso2.carbon.das.messageflow.data.publisher.observer.jmx.JMXMediationFlowObserver
- All Implemented Interfaces:
StatisticCollectionViewMXBean,MessageFlowObserver,TenantInformation
public class JMXMediationFlowObserver
extends Object
implements StatisticCollectionViewMXBean, MessageFlowObserver, TenantInformation
Publish statistics data for JMX monitoring.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Clean up this observer and prepare for shutdowngetApiJmxStatistics(String apiName) Returns statistics related to a API.getEndpointJmxStatistics(String endpointName) Returns statistics related to a Endpoint.getInboundEndpointJmxStatistics(String inboundEndpointName) Returns statistics related to a Inbound Endpoint.getProxyServiceJmxStatistics(String proxyName) Returns statistics related to a Proxy Service.getSequenceJmxStatistics(String sequenceName) Returns statistics related to a Sequence.intGet the tenant id for the observervoidReset all JMX statistics.voidReset JMX API statistic collection.voidReset JMX Endpoint statistic collection.voidReset JMX Inbound Endpoint statistic collection.voidReset JMX Proxy statistic collection.voidReset JMX Sequence statistic collection.voidsetTenantId(int i) Set the tenantId for the observervoidupdateStatistics(org.apache.synapse.aspects.flow.statistics.publishing.PublishingFlow snapshot) Receive a statistics update from the statistics store/provider.
-
Field Details
-
MBEAN_CATEGORY
- See Also:
-
MBEAN_ID
- See Also:
-
-
Constructor Details
-
JMXMediationFlowObserver
public JMXMediationFlowObserver(int tenantId)
-
-
Method Details
-
resetAPIStatistics
public void resetAPIStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset JMX API statistic collection.- Specified by:
resetAPIStatisticsin interfaceStatisticCollectionViewMXBean
-
resetProxyStatistics
public void resetProxyStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset JMX Proxy statistic collection.- Specified by:
resetProxyStatisticsin interfaceStatisticCollectionViewMXBean
-
resetSequenceStatistics
public void resetSequenceStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset JMX Sequence statistic collection.- Specified by:
resetSequenceStatisticsin interfaceStatisticCollectionViewMXBean
-
resetInboundEndpointStatistics
public void resetInboundEndpointStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset JMX Inbound Endpoint statistic collection.- Specified by:
resetInboundEndpointStatisticsin interfaceStatisticCollectionViewMXBean
-
resetEndpointStatistics
public void resetEndpointStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset JMX Endpoint statistic collection.- Specified by:
resetEndpointStatisticsin interfaceStatisticCollectionViewMXBean
-
resetAllStatistics
public void resetAllStatistics()Description copied from interface:StatisticCollectionViewMXBeanReset all JMX statistics.- Specified by:
resetAllStatisticsin interfaceStatisticCollectionViewMXBean
-
getProxyServiceJmxStatistics
Description copied from interface:StatisticCollectionViewMXBeanReturns statistics related to a Proxy Service.- Specified by:
getProxyServiceJmxStatisticsin interfaceStatisticCollectionViewMXBean- Parameters:
proxyName- Name of the proxy service.- Returns:
- Composite Data Object that contains Proxy Statistics.
-
getSequenceJmxStatistics
Description copied from interface:StatisticCollectionViewMXBeanReturns statistics related to a Sequence.- Specified by:
getSequenceJmxStatisticsin interfaceStatisticCollectionViewMXBean- Parameters:
sequenceName- Name of the Sequence.- Returns:
- Composite Data Object that contains Sequence Statistics.
-
getApiJmxStatistics
Description copied from interface:StatisticCollectionViewMXBeanReturns statistics related to a API.- Specified by:
getApiJmxStatisticsin interfaceStatisticCollectionViewMXBean- Parameters:
apiName- Name of the API.- Returns:
- Composite Data Object that contains API Statistics.
-
getInboundEndpointJmxStatistics
Description copied from interface:StatisticCollectionViewMXBeanReturns statistics related to a Inbound Endpoint.- Specified by:
getInboundEndpointJmxStatisticsin interfaceStatisticCollectionViewMXBean- Parameters:
inboundEndpointName- Name of the Inbound Endpoint.- Returns:
- Composite Data Object that contains Inbound Endpoint Statistics.
-
getEndpointJmxStatistics
Description copied from interface:StatisticCollectionViewMXBeanReturns statistics related to a Endpoint.- Specified by:
getEndpointJmxStatisticsin interfaceStatisticCollectionViewMXBean- Parameters:
endpointName- Name of the Endpoint.- Returns:
- Composite Data Object that contains Endpoint Statistics.
-
destroy
public void destroy()Description copied from interface:MessageFlowObserverClean up this observer and prepare for shutdown- Specified by:
destroyin interfaceMessageFlowObserver
-
updateStatistics
public void updateStatistics(org.apache.synapse.aspects.flow.statistics.publishing.PublishingFlow snapshot) Description copied from interface:MessageFlowObserverReceive a statistics update from the statistics store/provider. The cumulative records received from this method will be 'null' for the very first update sent by the data store. This is because for the very first update there are no cumulative data in the store. The implementations of this method should not attempt to modify the provided StatisticsRecord instances. If such modifications are necessary the StatisticsRecord objects should be first copied using the copy constructor. Also implementations of the updateStatistics method should finish quickly. Long running tasks should be executed using separate threads to prevent the notifier thread getting blocked.- Specified by:
updateStatisticsin interfaceMessageFlowObserver- Parameters:
snapshot- Current latest update containing resource specific data, category specific data, cumulative data and error logs
-
getTenantId
public int getTenantId()Description copied from interface:TenantInformationGet the tenant id for the observer- Specified by:
getTenantIdin interfaceTenantInformation- Returns:
- tenantId
-
setTenantId
public void setTenantId(int i) Description copied from interface:TenantInformationSet the tenantId for the observer- Specified by:
setTenantIdin interfaceTenantInformation- Parameters:
i- tenantId of the observer
-