Package de.novanic.eventservice.client.event

Examples of de.novanic.eventservice.client.event.Event


    private class ServerMessageGeneratorTimerTask extends TimerTask
    {
        public void run() {
            final String theEventMessage = "GWTEventService is greeting everybody with \"Hello\" at " + getCurrentTimeFormatted() + " (and every five seconds again)! :-)";
            //create the event
            Event theEvent = new ServerGeneratedMessageEvent(theEventMessage);
            //add the event, so clients can receive it
            addEvent(ServerGeneratedMessageEvent.SERVER_MESSAGE_DOMAIN, theEvent);
        }
View Full Code Here


            theServletOriginal.isUserRegistered();
            fail("Exception expected, because the HTTPRequest shouldn't be available!");
        } catch(Exception e) {}

        try {
            theServletOriginal.addEvent(DomainFactory.getDomain("X"), new Event() {});
        } catch(Exception e) {
            fail("No Exception expected, because the HTTPRequest shouldn't be used!");
        }
    }
View Full Code Here

    @Test
    public void testAddEvent_Init_WithoutSession() throws Exception {
        final Domain theDomain = DomainFactory.getDomain("X");
        final String theUserId = "test_user";
        final Event theEvent = new Event() {};

        EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
        theEventRegistry.registerUser(theDomain, theUserId, null);

        RemoteEventServiceServlet theRemoteEventServiceServlet = new DummyRemoteEventServlet(theDomain, theEvent);
View Full Code Here

    @Test
    public void testAddEvent_WithoutSession() throws Exception {
        final Domain theDomain = DomainFactory.getDomain("X");
        final String theUserId = "test_user";
        final Event theEvent = new Event() {};

        EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
        theEventRegistry.registerUser(theDomain, theUserId, null);

        DummyRemoteEventServlet theRemoteEventServiceServlet = new DummyRemoteEventServlet(theDomain, theEvent);
View Full Code Here

    @Test
    public void testAddEventUserSpecific_WithoutSession() throws Exception {
        final Domain theDomain = DomainFactory.getDomain("X");
        final String theUserId = "test_user";
        final Event theEvent = new Event() {};

        EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
        theEventRegistry.registerUser(theDomain, theUserId, null);

        DummyRemoteEventServlet theRemoteEventServiceServlet = new DummyRemoteEventServlet(theDomain, theEvent);
View Full Code Here

    private class DummyStreamingClientConnector extends DefaultStreamingClientConnector
    {
        private DomainEvent myDummyEvent;

        private DummyStreamingClientConnector() {
            myDummyEvent = new DefaultDomainEvent(new Event(){});
        }
View Full Code Here

            assertNull(e.getCause());
        }

        //addEvent() should work without a session, because the client-/user-id isn't required to add a domain specific event.
        try {
            theEventExecutorService.addEvent(DomainFactory.getDomain("X"), new Event() {});
        } catch(NoSessionAvailableException e) {
            fail("No Exception \"" + e.getClass().getName() + "\" expected!");
        }
    }
View Full Code Here

            assertNull(e.getCause());
        }

        //addEvent() should work without a session, because the client-/user-id isn't required to add a domain specific event.
        try {
            theEventExecutorService.addEvent(DomainFactory.getDomain("X"), new Event() {});
        } catch(NoSessionAvailableException e) {
            fail("No Exception \"" + e.getClass().getName() + "\" expected!");
        }
    }
View Full Code Here

            assertNull(e.getCause());
        }

        //addEvent should work without the client-/user-id, because the client-/user-id isn't required to add a domain specific event.
        try {
            theEventExecutorService.addEvent(DomainFactory.getDomain("X"), new Event() {});
        } catch(NoSessionAvailableException e) {
            fail("No Exception \"" + e.getClass().getName() + "\" expected!");
        }
    }
View Full Code Here

    }

    @Test
    public void testMatch_2() {
        UnlistenEventFilter theUnlistenEventFilter = new UnlistenEventFilter(new DummyListenDomainAccessor(TEST_DOMAIN, TEST_DOMAIN_2), TEST_USER_ID, UnlistenEventListener.Scope.UNLISTEN);
        assertFalse(theUnlistenEventFilter.match(new Event() {}));

        UnlistenEvent theUnlistenEvent = new DefaultUnlistenEvent(new HashSet<Domain>(Arrays.asList(TEST_DOMAIN_2)), TEST_USER_ID, false);
        assertFalse(theUnlistenEventFilter.match(theUnlistenEvent));

        theUnlistenEvent = new DefaultUnlistenEvent(new HashSet<Domain>(Arrays.asList(TEST_DOMAIN)), TEST_USER_ID, false);
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.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.