Examples of postEvent()


Examples of org.osgi.service.event.EventAdmin.postEvent()

                properties.put(EventConstants.SERVICE_OBJECTCLASS, objectClass);

                properties.put(EventConstants.SERVICE_PID, eventRef.getProperty(
                    EventConstants.SERVICE_PID));
               
                eventAdmin.postEvent(new Event(topic, properties));

                m_context.ungetService(ref);
            }
        }
    }
View Full Code Here

Examples of org.osgi.service.event.EventAdmin.postEvent()

                properties.put(UPnPService.ID, serviceId);
                properties.put("upnp.serviceId", serviceId);
                properties.put("upnp.deviceId", deviceId);
                properties.put("upnp.events", immutableEvents);
               
                eventAdmin.postEvent(
                    new Event("org/osgi/service/upnp/UPnPEvent", properties));

                m_context.ungetService(ref);
            }
        }
View Full Code Here

Examples of org.osgi.service.event.EventAdmin.postEvent()

        assertEquals(expectedIntents, effectiveIntents);
    }
   
    public void testServiceExposedAdminEvent() throws Exception {
        EventAdmin ea = EasyMock.createMock(EventAdmin.class);
        ea.postEvent((Event) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                Event e = (Event) EasyMock.getCurrentArguments()[0];
                assertEquals("org/osgi/service/distribution/DistributionProvider/service/exposed", e.getTopic());               
                List<String> keys = Arrays.asList(e.getPropertyNames());
View Full Code Here

Examples of org.osgi.service.event.EventAdmin.postEvent()

        EasyMock.verify(ea);
    }

    public void testServiceUnsatisfiedAdminEvent() throws Exception {
        EventAdmin ea = EasyMock.createMock(EventAdmin.class);
        ea.postEvent((Event) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                Event e = (Event) EasyMock.getCurrentArguments()[0];
                assertEquals("org/osgi/service/distribution/DistributionProvider/service/unsatisfied", e.getTopic());               
                return null;
View Full Code Here

Examples of org.papoose.event.EventAdminImpl.postEvent()

            }
        }, properties);

        try
        {
            eventAdmin.postEvent(new Event("a/b/c/d", (Dictionary) null));

            latch.await();

            assertEquals(1, count.get());
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.