Package org.osgi.service.cm

Examples of org.osgi.service.cm.Configuration.update()


        // Reconfigure
        props = new Properties();
        props.put("controller", "true");

        try {
            configuration.update(props);
            grace();
        } catch (IOException e) {
            fail(e.getMessage());
        }
View Full Code Here


        p.put("long", (long) 42);
        p.put("string", "absdir");
        p.put("strAProp", new String[]{"a"});
        p.put("intAProp", new int[]{1, 2});

        conf.update(p);
        grace();

        String pid = conf.getPid();
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
        assertNotNull("Check instance creation", ref);
View Full Code Here

        p.put("long", "42");
        p.put("string", "absdir");
        p.put("strAProp", "{a}");
        p.put("intAProp", "{1,2}");

        conf.update(p);
        grace();

        String pid = conf.getPid();
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
View Full Code Here

        p.put("long", (long) 42);
        p.put("string", "absdir");
        p.put("strAProp", new String[]{"a"});
        p.put("intAProp", new int[]{1, 2});

        conf.update(p);
        grace();

        String pid = conf.getPid();
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
View Full Code Here

        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);

        assertNotNull("Check instance creation", ref);

        p.put("int", 4);
        conf.update(p);
        grace();

        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
        Integer test = (Integer) ref.getProperty("int");
        assertEquals("Check instance modification", 4, test.intValue());
View Full Code Here

        p.put("long", "42");
        p.put("string", "absdir");
        p.put("strAProp", "{a}");
        p.put("intAProp", "{1,2}");

        conf.update(p);
        grace();

        String pid = conf.getPid();

        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
View Full Code Here

        String pid = conf.getPid();

        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
        assertNotNull("Check instance creation", ref);
        p.put("int", new Integer("4"));
        conf.update(p);
        grace();

        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
        Integer test = (Integer) ref.getProperty("int");
        assertEquals("Check instance modification", 4, test.intValue());
View Full Code Here

            Dictionary prc = configuration.getProperties();
            if (prc == null) {
                prc = new Properties();
            }
            prc.put("message", "message2");
            configuration.update(prc);
            System.err.println("updated ? ");
            grace();
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            if (props == null) {
                props = new Properties();
            }
            props.put("managed.service.pid", msp);
            props.put("message", "message");
            conf.update(props);
            grace();
        } catch (Exception e) {
            fail(e.getMessage());
        }
View Full Code Here

            Dictionary prc = configuration.getProperties();
            if (prc == null) {
                prc = new Properties();
            }
            prc.put("message", "message2");
            configuration.update(prc);
            grace();
        } catch (Exception e) {
            fail(e.getMessage());
        }
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.