Package org.osgi.service.event

Examples of org.osgi.service.event.Event


        // Flush event list of the event tracker
        m_eventTracker.clearEvents();

        // Send donuts and check the sender instance name
        Event receivedEvent;
        for (int i = 0; i < NUMBER_OF_EAH_PROVIDERS; i++) {
            m_eahProviders[i].sellDonut();
            receivedEvent = m_eventTracker.waitForEvent();
            assertEquals(
                    "The instance name property of the received message must be the same as the sender instance name.",
                    m_eahProvidersInstances[i].getInstanceName(), receivedEvent
                    .getProperty("publisher.instance.name"));
        }
    }
View Full Code Here


    private static final String HEADER_WEB_CONTEXT_PATH = "Web-ContextPath";

    static Event DEPLOYING(Bundle webAppBundle, Bundle extenderBundle)
    {
        return new Event(TOPIC_DEPLOYING, createBaseProperties(webAppBundle, extenderBundle));
    }
View Full Code Here

     * Get the first received event and remove it from the events list.
     *
     * @return the first received event or null if no event is available
     */
    public Event getEvent() {
        Event event = null;
        synchronized (m_events) {
            if (!m_events.isEmpty()) {
                event = (Event) m_events.remove(0);
            }
        }
View Full Code Here

        return new Event(TOPIC_DEPLOYING, createBaseProperties(webAppBundle, extenderBundle));
    }

    static Event DEPLOYED(Bundle webAppBundle, Bundle extenderBundle)
    {
        return new Event(TOPIC_DEPLOYED, createBaseProperties(webAppBundle, extenderBundle));
    }
View Full Code Here

     * returned event is removed from the eaten event list.
     *
     * @return the first available event.
     */
    public Event waitForEvent() {
        Event event = null;
        synchronized (m_events) {
            while (event == null) {
                if (m_events.isEmpty()) {
                    try {
                        m_events.wait();
View Full Code Here

        return new Event(TOPIC_DEPLOYED, createBaseProperties(webAppBundle, extenderBundle));
    }

    static Event UNDEPLOYING(Bundle webAppBundle, Bundle extenderBundle)
    {
        return new Event(TOPIC_UNDEPLOYING, createBaseProperties(webAppBundle, extenderBundle));
    }
View Full Code Here

        return new Event(TOPIC_UNDEPLOYING, createBaseProperties(webAppBundle, extenderBundle));
    }

    static Event UNDEPLOYED(Bundle webAppBundle, Bundle extenderBundle)
    {
        return new Event(TOPIC_UNDEPLOYED, createBaseProperties(webAppBundle, extenderBundle));
    }
View Full Code Here

        }
        if (collisionBundles != null)
        {
            props.put(COLLISION_BUNDLES, collisionBundles);
        }
        return new Event(TOPIC_FAILED, props);
    }
View Full Code Here

        // Flush event list of the event tracker
        m_eventTracker.clearEvents();

        // Send donuts and check the sender instance name
        Event receivedEvent;
        for (int i = 0; i < NUMBER_OF_EAH_PROVIDERS; i++) {
            m_eahProviders[i].sellDonut();
            receivedEvent = m_eventTracker.waitForEvent();
            assertEquals(
                    "The instance name property of the received message must be the same as the sender instance name.",
                    m_eahProvidersInstances[i].getInstanceName(), receivedEvent
                    .getProperty("publisher.instance.name"));
        }
    }
View Full Code Here

    public Donut sellDonut() {
        Dictionary rawEvent = new Hashtable();
        Donut donut = new Donut(m_serial++, m_name, Donut.FLAVOURS[m_random
                .nextInt(Donut.FLAVOURS.length)]);
        rawEvent.put("food", donut);
        m_ea.sendEvent(new Event("food/donuts", rawEvent));
        return donut;
    }
View Full Code Here

TOP

Related Classes of org.osgi.service.event.Event

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.