Package org.apache.aries.jmx

Examples of org.apache.aries.jmx.Logger


   
    @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


   
    @Test
    public void testNotificationsForServiceEvents() throws Exception {
       
        BundleContext context = mock(BundleContext.class);
        Logger logger = mock(Logger.class);
       
        ServiceState serviceState = new ServiceState(context, logger);
       
        ServiceReference reference = mock(ServiceReference.class);
        Bundle b1 = mock(Bundle.class);
View Full Code Here

   
    @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

  
    @Test
    public void testOpen() throws Exception {
       
        BundleContext context = mock(BundleContext.class);
        Logger logger = mock(Logger.class);
       
        ServiceStateMBeanHandler handler = new ServiceStateMBeanHandler(context, logger);
        handler.open();
       
        assertNotNull(handler.getMbean());
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);
        ProvisioningService provService = mock(ProvisioningService.class);
       
        ProvisioningServiceMBeanHandler handler = new ProvisioningServiceMBeanHandler(agentContext);
        StandardMBean mbean = handler.constructInjectMBean(provService);
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

                (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

        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

    public void testNotificationsForBundleEvents() throws Exception {
       
        BundleContext context = mock(BundleContext.class);
        PackageAdmin admin = mock(PackageAdmin.class);
        StartLevel startLevel = mock(StartLevel.class);
        Logger logger = mock(Logger.class);
       
        //holder for Notifications captured
        final List<Notification> received = new LinkedList<Notification>();
       
        BundleState bundleState = new BundleState(context, admin, startLevel, logger);
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.