Package org.osgi.service.monitor

Examples of org.osgi.service.monitor.MonitorAdmin.startJob()


        MonitoringJob[] jobs = monitorAdmin.getRunningJobs();
        Assert.assertNotNull(jobs);
        Assert.assertEquals(0, jobs.length);

        MonitoringJob job = monitorAdmin.startJob("initiator", new String[]{"com.acme.pid/sv.id1"}, 1);

        jobs = monitorAdmin.getRunningJobs();
        Assert.assertNotNull(jobs);
        Assert.assertEquals(1, jobs.length);
        Assert.assertTrue(jobs[0].isRunning());
View Full Code Here


        monitorable.setListener(common);
        monitorable.setMonitorableId("com.acme.pid");

        try {
            monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id11"}, 1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
View Full Code Here

            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
            monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id2"}, 1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
View Full Code Here

            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
            monitorAdmin.startJob(null, new String[]{"com.acme.pid/sv.id2"}, 1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
View Full Code Here

            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
            monitorAdmin.startJob("init1", new String[]{"com.acme.pid1/sv.id1"}, 1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
View Full Code Here

            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        try {
            monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id1"}, -1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        MonitoringJob job = monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id1"}, 1);
View Full Code Here

            monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id1"}, -1);
            Assert.fail();
        } catch (IllegalArgumentException e) {
        }

        MonitoringJob job = monitorAdmin.startJob("init1", new String[]{"com.acme.pid/sv.id1"}, 1);

        MonitoringJob[] jobs = monitorAdmin.getRunningJobs();
        Assert.assertEquals(1, jobs.length);

        monitorable.setNewStatusVariableValue("sv.id1", "15");
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.