Package org.apache.aries.jmx

Examples of org.apache.aries.jmx.Logger


  }

  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


   
    @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

    public void testOpenAndClose() throws Exception {

        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(Constants.FRAMEWORK_UUID)).thenReturn("some-uuid");

        Logger logger = mock(Logger.class);

        Bundle mockSystemBundle = mock(Bundle.class);
        when(mockSystemBundle.getSymbolicName()).thenReturn("the.sytem.bundle");
        when(context.getBundle(0)).thenReturn(mockSystemBundle);
View Full Code Here

        BundleContext context = mock(BundleContext.class);
        when(context.getBundles()).thenReturn(new Bundle [] {});
        PackageAdmin admin = mock(PackageAdmin.class);
        StartLevel startLevel = mock(StartLevel.class);
        Logger logger = mock(Logger.class);

        BundleState bundleState = new BundleState(context, admin, startLevel, logger);

        Bundle b1 = mock(Bundle.class);
        when(b1.getBundleId()).thenReturn(new Long(9));
View Full Code Here

    public void testLifeCycleOfNotificationSupport() throws Exception {

        BundleContext context = mock(BundleContext.class);
        PackageAdmin admin = mock(PackageAdmin.class);
        StartLevel startLevel = mock(StartLevel.class);
        Logger logger = mock(Logger.class);

        BundleState bundleState = new BundleState(context, admin, startLevel, logger);

        MBeanServer server1 = mock(MBeanServer.class);
        MBeanServer server2 = mock(MBeanServer.class);
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

                (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 testOpen() throws Exception {

        BundleContext context = mock(BundleContext.class);
        when(context.getProperty(Constants.FRAMEWORK_UUID)).thenReturn("some-uuid");

        Logger logger = mock(Logger.class);

        Bundle mockSystemBundle = mock(Bundle.class);
        when(mockSystemBundle.getSymbolicName()).thenReturn("the.sytem.bundle");
        when(context.getBundle(0)).thenReturn(mockSystemBundle);
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

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.