Package org.apache.hivemind.service.impl

Examples of org.apache.hivemind.service.impl.ThreadEventNotifierImpl.fireThreadCleanup()


        s.put("biff", "bamf");

        assertEquals("bamf", s.get("biff"));

        notifier.fireThreadCleanup();

        assertNull(s.get("biff"));
    }

    private class TestRunner implements Runnable
View Full Code Here


        if (_testRunnerFailure != null)
            throw _testRunnerFailure;

        assertEquals(local.get("session"), "Main Session");

        notifier.fireThreadCleanup();

        assertNull(local.get("session"));
    }
}
View Full Code Here

    {
        ThreadEventNotifier n = new ThreadEventNotifierImpl();
        Listener l = new Listener();

        n.addThreadCleanupListener(l);
        n.fireThreadCleanup();

        assertEquals(true, l._cleanup);
    }

    public void testRemove()
View Full Code Here

        n.addThreadCleanupListener(l1);
        n.addThreadCleanupListener(l2);
        n.removeThreadCleanupListener(l1);

        n.fireThreadCleanup();

        assertEquals(false, l1._cleanup);
        assertEquals(true, l2._cleanup);
    }
View Full Code Here

        Listener l = new Listener();

        n.addThreadCleanupListener(l);

        n.fireThreadCleanup();

        assertEquals(true, l._cleanup);

        l._cleanup = false;
View Full Code Here

        assertEquals(true, l._cleanup);

        l._cleanup = false;

        n.fireThreadCleanup();

        // Don't expect a notification, because the notifier's list is gone

        assertEquals(false, l._cleanup);
    }
View Full Code Here

        ThreadEventNotifier n = new ThreadEventNotifierImpl(log);

        n.addThreadCleanupListener(l);

        n.fireThreadCleanup();

        verifyControls();
    }
}
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.