Package de.novanic.eventservice.client.event.domain

Examples of de.novanic.eventservice.client.event.domain.Domain


@RunWith(JUnit4.class)
public class ActivationCommandTest extends ClientCommandTestCase
{
    @Test
    public void testExecute() {
        final Domain theTestDomain = DomainFactory.getDomain("test_domain");
        final EventFilter theEventFilter = new TypeEventFilterTestMode();
        final TestEventNotification theTestEventNotification = new TestEventNotification();

        getRemoteEventConnectorMock().activate(theTestDomain, theEventFilter, theTestEventNotification, getCommandCallback());
View Full Code Here


        return new DummyRemoteEventServiceServlet_Request(myRequestMock);
    }

    @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);
View Full Code Here

    private boolean removeDomains(Set<Domain> aDomains, AsyncCallback<Void> aCallback) {
        //remove the domains (all domain registrations)
        Set<Domain> theRemovableDomains = new HashSet<Domain>(aDomains);
        Iterator<Domain> theDomainIterator = theRemovableDomains.iterator();
        while(theDomainIterator.hasNext()) {
            Domain theDomain = theDomainIterator.next();
            if(myDomainListenerMapping.remove(theDomain) == null) {
                theDomainIterator.remove();
            }
        }
        boolean isRemoved = !theRemovableDomains.isEmpty();
View Full Code Here

     * Removes a user from all domains and removes the domains when no other users are added to the domain.
     * @param aUserInfo user
     */
    public void removeUser(UserInfo aUserInfo) {
        for(Map.Entry<Domain, ConcurrentMap<UserInfo, UserInfo>> theDomainUsersEntry: myDomainUserInfoMap.entrySet()) {
            Domain theDomain = theDomainUsersEntry.getKey();
            ConcurrentMap<UserInfo, UserInfo> theDomainUsers = theDomainUsersEntry.getValue();
            removeUser(theDomain, theDomainUsers, aUserInfo);
        }
    }
View Full Code Here

     */
    public void removeListeners(Set<Domain> aDomains, AsyncCallback<Void> aCallback) {
        Set<Domain> theDomains = new HashSet<Domain>(aDomains);
        Iterator<Domain> theDomainIterator = theDomains.iterator();
        while(theDomainIterator.hasNext()) {
            Domain theDomain = theDomainIterator.next();
            if(!(unlisten(theDomain, null))) {
                theDomainIterator.remove();
            }
        }
        if(!theDomains.isEmpty()) {
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.event.domain.Domain

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.