Examples of UpdateListener


Examples of com.espertech.esper.client.UpdateListener

        configurePublishersForStream(streamConfig);

        // Instantiate its publisher(s)
        final LinkedHashMap<String, UpdateListener> publishers = new LinkedHashMap<String, UpdateListener>();
        for (final PublisherConfig route : streamConfig.getPublishers()) {
            final UpdateListener updateListener = instantiateUpdateListener(route);
            publishers.put(route.getType(), updateListener);
            publisherInstances.put(streamConfig.getName(), updateListener);
        }

        // Add the stream in the Esper engine
View Full Code Here

Examples of com.espertech.esper.client.UpdateListener

            else if (constructor.getParameterTypes().length == 1) {
                configConstructor = constructor;
            }
        }

        final UpdateListener listener;

        if (configConstructor != null) {
            final Class listenerConfigClass = configConstructor.getParameterTypes()[0];
            listener = (UpdateListener) configConstructor.newInstance(listenerConfigClass.cast(publisherConfig));
        }
View Full Code Here

Examples of com.espertech.esper.client.UpdateListener

    }

    @Test(groups = "fast")
    public void testInstantiateListener() throws Exception
    {
        final UpdateListener listener = PublishersCompiler.instantiateUpdateListener(publisherConfig);
        assertTrue(listener instanceof DebugListener);
    }
View Full Code Here

Examples of org.apache.tapestry.events.UpdateListener

public class UpdateListenerHubImplTest extends TestBase
{
    @Test
    public void add_listener_and_invoke() throws Exception
    {
        UpdateListener listener = newMock(UpdateListener.class);

        UpdateListenerHub hub = new UpdateListenerHubImpl();

        listener.checkForUpdates();

        replay();

        hub.addUpdateListener(listener);
View Full Code Here

Examples of org.apache.tapestry.internal.events.UpdateListener

public class UpdateListenerHubImplTest extends TestBase
{
    @Test
    public void add_listener_and_invoke() throws Exception
    {
        UpdateListener listener = newMock(UpdateListener.class);

        UpdateListenerHub hub = new UpdateListenerHubImpl();

        listener.checkForUpdates();

        replay();

        hub.addUpdateListener(listener);
View Full Code Here

Examples of org.apache.tapestry5.internal.events.UpdateListener

public class UpdateListenerHubImplTest extends TestBase
{
    @Test
    public void add_listener_and_invoke() throws Exception
    {
        UpdateListener listener = newMock(UpdateListener.class);

        UpdateListenerHub hub = new UpdateListenerHubImpl();

        listener.checkForUpdates();

        replay();

        hub.addUpdateListener(listener);
View Full Code Here

Examples of org.apache.tapestry5.services.UpdateListener

        while (i.hasNext())
        {
            WeakReference<UpdateListener> reference = i.next();

            UpdateListener listener = reference.get();

            if (listener == null)
                deadReferences.add(reference);
            else
                listener.checkForUpdates();
        }

        if (!deadReferences.isEmpty())
            listeners.removeAll(deadReferences);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.UpdateListener

        while (i.hasNext())
        {
            WeakReference<UpdateListener> reference = i.next();

            UpdateListener listener = reference.get();

            if (listener == null)
                deadReferences.add(reference);
            else
                listener.checkForUpdates();
        }

        if (!deadReferences.isEmpty())
            listeners.removeAll(deadReferences);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.UpdateListener

public class UpdateListenerHubImplTest extends TestBase
{
    @Test
    public void add_listener_and_invoke() throws Exception
    {
        UpdateListener listener = newMock(UpdateListener.class);

        UpdateListenerHub hub = new UpdateListenerHubImpl();

        listener.checkForUpdates();

        replay();

        hub.addUpdateListener(listener);
View Full Code Here

Examples of org.apache.tapestry5.services.UpdateListener

    }

    @Test
    public void weak_references_are_not_invoked_once_clears() throws Exception
    {
        UpdateListener listener = new UpdateListener()
        {
            public void checkForUpdates()
            {
                throw new RuntimeException("checkForUpdates() should not be invoked on a dead reference.");
            }
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.