Package org.rioproject.monitor

Examples of org.rioproject.monitor.ProvisionMonitor


        List<Cybernode> cybernodes = cyMon.getServices();
        List<ProvisionMonitor> pms = pmMon.getServices();

        Cybernode cybernode = cybernodes.get(0);
        ProvisionMonitor pm = pms.get(0);

       
        // 3. DEPLOY OPSTRING
        testManager.deploy(new File("src/test/resources/opstring/simple_opstring.groovy"));
       
View Full Code Here


        }
    }

    @Test
    public void testUndeploy() throws Exception {
        ProvisionMonitor monitor = pmMon.getServices().get(0);

        deployOpString(ServiceElement.ProvisionType.FIXED, 10, monitor);
        checkState("fixed", 10, true);

        deployOpString(ServiceElement.ProvisionType.DYNAMIC, 10, monitor);
View Full Code Here

        final Boolean[] trueFalse = ArrayUtils.asObjects(new boolean[] {false, true});
        final Integer[] maintainValues = ArrayUtils.asObjects(new int[] {1, 5, 10, 20});
        final Integer[] maxPerMachineValues = ArrayUtils.asObjects(new int[] {-1, 0, 1, 5, 10});

        Object[][] combinations = ArrayUtils.combinations(new Object[][] {trueFalse, maintainValues, maxPerMachineValues});
        ProvisionMonitor monitor = pmMon.getServices().get(0);
        for (Object[] combination : combinations) {
            boolean fixed = (Boolean) combination[0];
            int maintain = (Integer) combination[1];
            int maxPerMachine = (Integer) combination[2];
            if (!fixed) {
View Full Code Here

     * @throws Exception If there are any problems
     */
    @Test
    public  void scenarioB() throws Exception {
        logBanner("Running Scenario B");
        ProvisionMonitor monitor = pmMon.getServices().get(0);
        final boolean[] fixedValues = new boolean[] {false, true};
        final int maintainValue = 6;
        final int[] maxPerMachineValues = new int[] {
                0, 1, 2, 5, 10, 0, 5, 2, 1, 0};

View Full Code Here

    @Test
    public void runTest() throws Exception {
        ServiceDiscoveryManager sdm = testManager.getServiceDiscoveryManager();
        ServiceMonitor<ProvisionMonitor> pmMon = new ServiceMonitor<ProvisionMonitor>(sdm, ProvisionMonitor.class);
        pmMon.waitFor(1);
        ProvisionMonitor monitor = pmMon.getServices().get(0);

        final boolean[] fixedValues = new boolean[] {false, true};
        final int[] maintainValues = new int[]
            {-5, -2, -1, 0, 1, 2, 5, 2, 1, 0, -1, -2, -5, 10};
View Full Code Here

                                                 "Deploying "+opstringNames.toString()+"...",
                                                 500);
        SwingWorker worker = new SwingWorker() {
            public Object construct() {
                try {
                    ProvisionMonitor monitor = (ProvisionMonitor) item.service;
                    DeployAdmin dAdmin = (DeployAdmin) monitor.getAdmin();
                    for (OperationalString opString : opstrings) {
                        if (dAdmin.hasDeployed(opString.getName())) {
                            int result = JOptionPane.showConfirmDialog(frame,
                                                                       "The [" + opString.getName() + "] " +
                                                                       "is already deployed, " +
View Full Code Here

        final JDialog dialog = new WaitingDialog(frame, "Deploying "+artifact+"...", 500);

        SwingWorker worker = new SwingWorker() {
            public Object construct() {
                try {
                    ProvisionMonitor monitor = (ProvisionMonitor) item.service;
                    DeployAdmin dAdmin = (DeployAdmin) monitor.getAdmin();
                    dAdmin.deploy(artifact);
                } catch (Exception e) {
                    e.printStackTrace();
                    Throwable cause = e.getCause();
                    if(cause != null) {
View Full Code Here

TOP

Related Classes of org.rioproject.monitor.ProvisionMonitor

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.