Examples of ProfileManagement


Examples of io.fabric8.api.mxbean.ProfileManagement

       
        Profile prfA = ProfileBuilder.Factory.create("1.0", "prfA").getProfile();
        Profile prfB = ProfileBuilder.Factory.create("1.0", "prfB").addParent("prfA").getProfile();
        version10 = VersionBuilder.Factory.create("1.0").addProfiles(Arrays.asList(prfA, prfB)).getVersion();

        ProfileManagement impl = Mockito.mock(ProfileManagement.class);
        Mockito.when(impl.getVersions()).thenReturn(Arrays.asList("1.0"));
        Mockito.when(impl.getVersion("1.0")).thenReturn(new VersionState(version10));
        Mockito.when(impl.getProfile("1.0", "prfA")).thenReturn(new ProfileState(prfA));
        Mockito.when(impl.getProfile("1.0", "prfB")).thenReturn(new ProfileState(prfB));
       
        server = ManagementFactory.getPlatformMBeanServer();
        StandardMBean mxbean = new StandardMBean(impl, ProfileManagement.class, true);
        server.registerMBean(mxbean, ProfileManagement.OBJECT_NAME);
        proxy = JMX.newMXBeanProxy(server, ProfileManagement.OBJECT_NAME, ProfileManagement.class);
View Full Code Here

Examples of io.fabric8.api.mxbean.ProfileManagement

    }

    private void activateInternal() {
        MBeanServer server = mbeanServer.get();
        try {
            ProfileManagement profileMXBean = new ProfileManagementImpl();
            server.registerMBean(new StandardMBean(profileMXBean, ProfileManagement.class, true), ProfileManagement.OBJECT_NAME);
        } catch (JMException ex) {
            throw new IllegalStateException(ex);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.