Search in sources :

Example 1 with ServiceState

use of org.apache.aries.jmx.framework.ServiceState in project aries by apache.

the class Activator method start.

public void start(BundleContext context) throws Exception {
    ctx = context;
    logger = new Logger(ctx);
    Filter filter = getFilter(context, PACKAGE_ADMIN, START_LEVEL, PERMISSION_ADMIN, CONFIG_ADMIN, USER_ADMIN, PROVISIONING_SERVICE);
    tracker = new ServiceTracker(context, filter, this);
    tracker.open();
    stateConfig = StateConfig.register(context);
    registerMBean(ServiceStateMBean.class.getName(), new Factory<ServiceStateMBean>() {

        public ServiceStateMBean create() {
            return new ServiceState(ctx, stateConfig, logger);
        }
    }, ServiceStateMBean.OBJECTNAME, _serviceStateMbean);
}
Also used : ServiceState(org.apache.aries.jmx.framework.ServiceState) Filter(org.osgi.framework.Filter) ServiceTracker(org.osgi.util.tracker.ServiceTracker) ServiceStateMBean(org.osgi.jmx.framework.ServiceStateMBean) Logger(org.apache.aries.jmx.Logger)

Aggregations

Logger (org.apache.aries.jmx.Logger)1 ServiceState (org.apache.aries.jmx.framework.ServiceState)1 Filter (org.osgi.framework.Filter)1 ServiceStateMBean (org.osgi.jmx.framework.ServiceStateMBean)1 ServiceTracker (org.osgi.util.tracker.ServiceTracker)1