public void setMuleContext(MuleContext context) { this.muleContext = context; if (muleContext == null) { stats = new AllStatistics(); } else { stats = this.muleContext.getStatistics(); } }
protected void doDispose() { muleContext.getStatistics().remove(statistics); }
protected void configureStatistics() { statistics = new FlowConstructStatistics(getConstructType(), name); statistics.setEnabled(muleContext.getStatistics().isEnabled()); muleContext.getStatistics().add(statistics); }
protected void doDispose() { // Component is not in chain disposeIfDisposable(component); disposeIfDisposable(messageProcessorChain); disposeIfDisposable(messageSource); disposeIfDisposable(exceptionListener); muleContext.getStatistics().remove(stats); }
protected void registerApplicationServices() throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException, MalformedObjectNameException { FlowConstructStatistics appStats = muleContext.getStatistics().getApplicationStatistics(); if (appStats != null) { final String rawName = appStats.getName(); final String name = jmxSupport.escape(rawName); final String jmxName = String.format("%s:type=%s,name=%s", jmxSupport.getDomainName(muleContext, !containerMode), appStats.getFlowConstructType(), name); ObjectName on = jmxSupport.getObjectName(jmxName); FlowConstructServiceMBean fcMBean = new ApplicationService(appStats.getFlowConstructType(), rawName, muleContext,appStats); ClassloaderSwitchingMBeanWrapper wrapper = new ClassloaderSwitchingMBeanWrapper(fcMBean, FlowConstructServiceMBean.class, muleContext.getExecutionClassLoader()); logger.debug("Registering application statistics with name: " + on); mBeanServer.registerMBean(wrapper, on); } }
@Override protected void configureStatistics() { if (processingStrategy instanceof AsynchronousProcessingStrategy && ((AsynchronousProcessingStrategy) processingStrategy).getMaxThreads() != null) { statistics = new FlowConstructStatistics(getConstructType(), name, ((AsynchronousProcessingStrategy) processingStrategy).getMaxThreads()); } else { statistics = new FlowConstructStatistics(getConstructType(), name); } if (processingStrategy instanceof QueuedAsynchronousProcessingStrategy) { ((QueuedAsynchronousProcessingStrategy) processingStrategy).setQueueStatistics(statistics); } statistics.setEnabled(muleContext.getStatistics().isEnabled()); muleContext.getStatistics().add(statistics); }
stats.setEnabled(muleContext.getStatistics().isEnabled()); muleContext.getStatistics().add(stats); RouterStatistics routerStatistics = null;