org.copperengine.spring.JmxExporter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of copper-spring Show documentation
Show all versions of copper-spring Show documentation
COPPER is an open-source, powerful, light-weight, and easily configurable workflow engine. The power of COPPER is that it uses Java as a description language for workflows.
/*
* Copyright 2002-2015 SCOOP Software GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.copperengine.spring;
import java.util.Map;
import org.copperengine.core.common.AbstractJmxExporter;
import org.copperengine.management.AuditTrailMXBean;
import org.copperengine.management.AuditTrailQueryMXBean;
import org.copperengine.management.BatcherMXBean;
import org.copperengine.management.DBStorageMXBean;
import org.copperengine.management.DatabaseDialectMXBean;
import org.copperengine.management.ProcessingEngineMXBean;
import org.copperengine.management.ProcessorPoolMXBean;
import org.copperengine.management.StatisticsCollectorMXBean;
import org.copperengine.management.WorkflowRepositoryMXBean;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* Automatically exports all COPPER MXBeans, which are available in the Spring Application Context, to the JMX
* MBeanServer.
*
* @author austermann
*/
public class JmxExporter extends AbstractJmxExporter implements ApplicationContextAware {
private ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
@Override
protected Map getWorkflowRepositoryMXBeans() {
return applicationContext.getBeansOfType(WorkflowRepositoryMXBean.class);
}
@Override
protected Map getProcessingEngineMXBeans() {
return applicationContext.getBeansOfType(ProcessingEngineMXBean.class);
}
@Override
protected Map getProcessorPoolMXBeans() {
return applicationContext.getBeansOfType(ProcessorPoolMXBean.class);
}
@Override
protected Map getStatisticsCollectorMXBeans() {
return applicationContext.getBeansOfType(StatisticsCollectorMXBean.class);
}
@Override
protected Map getAuditTrailMXBeans() {
return applicationContext.getBeansOfType(AuditTrailMXBean.class);
}
@Override
protected Map getBatcherMXBeans() {
return applicationContext.getBeansOfType(BatcherMXBean.class);
}
@Override
protected Map getDatabaseDialectMXBeans() {
return applicationContext.getBeansOfType(DatabaseDialectMXBean.class);
}
@Override
protected Map getDBStorageMXBeans() {
return applicationContext.getBeansOfType(DBStorageMXBean.class);
}
@Override
protected Map getAuditTrailQueryMXBeans() {
return applicationContext.getBeansOfType(AuditTrailQueryMXBean.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy