Package org.apache.aries.jmx

Examples of org.apache.aries.jmx.Logger


    @Test
    public void testLifeCycleOfNotificationSupport() throws Exception {

        BundleContext context = mock(BundleContext.class);
        Logger logger = mock(Logger.class);

        ServiceState serviceState = new ServiceState(context, logger);

        MBeanServer server1 = mock(MBeanServer.class);
        MBeanServer server2 = mock(MBeanServer.class);
View Full Code Here


        PermissionAdminMBean paMBean = new PermissionAdmin((org.osgi.service.permissionadmin.PermissionAdmin) targetService);
        StandardMBean mbean = null;
        try {
            mbean = new StandardMBean(paMBean, PermissionAdminMBean.class);
        } catch (NotCompliantMBeanException e) {
            Logger logger = agentContext.getLogger();
            logger.log(LogService.LOG_ERROR, "Not compliant MBean", e);
        }
        return mbean;
    }
View Full Code Here

   
    @Test
    public void testConstructInjectMBean() {
       
        BundleContext bundleContext = mock(BundleContext.class);
        Logger agentLogger = mock(Logger.class);  
        JMXAgentContext agentContext = new JMXAgentContext(bundleContext, null, agentLogger);
        ProvisioningService provService = mock(ProvisioningService.class);
       
        ProvisioningServiceMBeanHandler handler = new ProvisioningServiceMBeanHandler(agentContext);
        StandardMBean mbean = handler.constructInjectMBean(provService);
View Full Code Here

  }

  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);
View Full Code Here

        PermissionAdminMBean paMBean = new PermissionAdmin((org.osgi.service.permissionadmin.PermissionAdmin) targetService);
        StandardMBean mbean = null;
        try {
            mbean = new StandardMBean(paMBean, PermissionAdminMBean.class);
        } catch (NotCompliantMBeanException e) {
            Logger logger = agentContext.getLogger();
            logger.log(LogService.LOG_ERROR, "Not compliant MBean", e);
        }
        return mbean;
    }
View Full Code Here

        UserAdminMBean uaMBean = new UserAdmin((org.osgi.service.useradmin.UserAdmin) targetService);
        StandardMBean mbean = null;
        try {
            mbean = new StandardMBean(uaMBean, UserAdminMBean.class);
        } catch (NotCompliantMBeanException e) {
            Logger logger = agentContext.getLogger();
            logger.log(LogService.LOG_ERROR, "Not compliant MBean", e);
        }
        return mbean;
    }
View Full Code Here

                (org.osgi.service.provisioning.ProvisioningService) targetService);
        StandardMBean mbean = null;
        try {
            mbean = new StandardMBean(psMBean, ProvisioningServiceMBean.class);
        } catch (NotCompliantMBeanException e) {
            Logger logger = agentContext.getLogger();
            logger.log(LogService.LOG_ERROR, "Failed to instantiate MBean for "
                    + ProvisioningServiceMBean.class.getName(), e);
        }
        return mbean;
    }
View Full Code Here

                (org.osgi.service.cm.ConfigurationAdmin) targetService);
        StandardMBean mbean = null;
        try {
            mbean = new StandardMBean(caMBean, ConfigurationAdminMBean.class);
        } catch (NotCompliantMBeanException e) {
            Logger logger = agentContext.getLogger();
            logger.log(LogService.LOG_ERROR, "Failed to instantiate MBean for "
                    + ConfigurationAdminMBean.class.getName(), e);
        }
        return mbean;
    }
View Full Code Here

   
    @Test
    public void testConstructInjectMBean() {
       
        BundleContext bundleContext = mock(BundleContext.class);
        Logger agentLogger = mock(Logger.class);  
        JMXAgentContext agentContext = new JMXAgentContext(bundleContext, null, agentLogger);
        ConfigurationAdmin cAdmin = mock(ConfigurationAdmin.class);
       
        ConfigurationAdminMBeanHandler handler = new ConfigurationAdminMBeanHandler(agentContext);
        StandardMBean mbean = handler.constructInjectMBean(cAdmin);
View Full Code Here

   
    @Test
    public void testOpenAndClose() throws Exception {
       
        BundleContext context = mock(BundleContext.class);
        Logger logger = mock(Logger.class);
       
        ServiceReference packageAdminRef = mock(ServiceReference.class);
        PackageAdmin packageAdmin = mock(PackageAdmin.class);
        when(context.getServiceReference(PackageAdmin.class.getName())).thenReturn(packageAdminRef);
        when(context.getService(packageAdminRef)).thenReturn(packageAdmin);
View Full Code Here

TOP

Related Classes of org.apache.aries.jmx.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.