Package org.apache.hivemind.service.impl

Examples of org.apache.hivemind.service.impl.EventLinkerImpl


{
    public void testNoName()
    {
        EventProducer p = new EventProducer();
        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, null, c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());

        // Exercise code paths for when the producer has already
        // been scanned.

        EventConsumer c2 = new EventConsumer();

        l.addEventListener(p, null, c2, null);

        p.fire(e);

        assertSame(e, c2.getLastEvent());
    }
View Full Code Here


    public void testNameMatch()
    {
        EventProducer p = new EventProducer();
        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, "propertyChange", c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);
View Full Code Here

                        location,
                        null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, null, c, location);

        assertEquals(0, p.getListenerCount());

        verifyControls();
    }
View Full Code Here

        el.error("EventProducer does not implement an event set named 'fred'.", location, null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, "fred", c, location);

        assertEquals(0, p.getListenerCount());

        verifyControls();
    }
View Full Code Here

                        location,
                        null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, "propertyChange", c, location);

        assertEquals(0, p.getListenerCount());

        verifyControls();
    }
View Full Code Here

                        location,
                        null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, null, c, location);

        verifyControls();
    }
View Full Code Here

{
    public void testNoName()
    {
        EventProducer p = new EventProducer();
        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, null, c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());

        // Exercise code paths for when the producer has already
        // been scanned.

        EventConsumer c2 = new EventConsumer();

        l.addEventListener(p, null, c2, null);

        p.fire(e);

        assertSame(e, c2.getLastEvent());
    }
View Full Code Here

    public void testNameMatch()
    {
        EventProducer p = new EventProducer();
        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, "propertyChange", c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);
View Full Code Here

                        location,
                        null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, null, c, location);

        assertEquals(0, p.getListenerCount());

        verifyControls();
    }
View Full Code Here

        el.error("EventProducer does not implement an event set named 'fred'.", location, null);

        replayControls();

        EventLinker l = new EventLinkerImpl(el);

        l.addEventListener(p, "fred", c, location);

        assertEquals(0, p.getListenerCount());

        verifyControls();
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.service.impl.EventLinkerImpl

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.