Package org.rioproject.eventcollector.api

Examples of org.rioproject.eventcollector.api.EventCollectorRegistration.enableDelivery()


        Assert.assertEquals(1, eventCollectorImpl.getRegistrationSize());
        tearDownEventCollector();
        createEventCollector();
        BasicEventListener listener = new BasicEventListener();
        System.out.println("===> enableDelivery()");
        registration.enableDelivery(listener.export());
        System.out.println("===> getLease()");
        registration.getLease().cancel();
    }

    @Test(expected = UnknownEventCollectorRegistration.class)
View Full Code Here


        EventCollectorRegistration registration = eventCollector.register(Lease.FOREVER);
        verifyRegistration(registration);
        Assert.assertEquals(1, eventCollectorImpl.getRegistrationSize());
        BasicEventListener listener = new BasicEventListener();
        registration.getLease().cancel();
        registration.enableDelivery(listener.export());
    }

    @Test(expected = UnknownEventCollectorRegistration.class)
    public void testUnknownEventCollectorRegistration() throws UnknownEventCollectorRegistration, IOException {
        EventCollectorRegistration unknownRegistration = new Registration(eventCollectorImpl,
View Full Code Here

    @Test(expected = UnknownEventCollectorRegistration.class)
    public void testUnknownEventCollectorRegistration() throws UnknownEventCollectorRegistration, IOException {
        EventCollectorRegistration unknownRegistration = new Registration(eventCollectorImpl,
                                                                          UuidFactory.generate(),
                                                                          null);
        unknownRegistration.enableDelivery(null);

    }

    private void verifyRegistration(EventCollectorRegistration registration) throws IOException {
        Assert.assertNotNull(registration);
View Full Code Here

            logger.info("Wait 3 seconds to get events for next client.... ");
            Thread.sleep(1000*3);
            registration1.enableDelivery(eventListener);
            BasicEventListener listener2 = new BasicEventListener();
            registration2.enableDelivery(listener2.export());
            logger.info("Wait 3 seconds to clean up");
            Thread.sleep(1000 * 3);
            log(1, listener1);
            log(2, listener2);
            Assert.assertEquals(listener1.eventCollectionCount(), listener2.eventCollectionCount());
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.