Examples of BaseStreamStanzaDictionary


Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

    }

    public void testLookupCoreHandlerClientNS() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("iq", NamespaceURIs.JABBER_CLIENT).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        return new StanzaHandlerLookup();
    }

    public void testLookupCoreHandlerServerNS() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("iq", NamespaceURIs.JABBER_SERVER).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

    }

    public void testLookupCoreHandlerWrongNamespace() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("iq", "arbitraryNamespace").build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertTrue("iq handler with arbitrary namespace not found", handler instanceof IQHandler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        assertTrue("iq handler with arbitrary namespace not found", handler instanceof IQHandler);
    }

    public void testLookupPresenceHandler() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("presence", NamespaceURIs.JABBER_CLIENT).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        assertTrue("iq handler found", handler instanceof PresenceHandler);
    }

    public void testLookupMessageHandler() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("message", NamespaceURIs.JABBER_CLIENT).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        assertTrue("iq handler found", handler instanceof MessageHandler);
    }

    public void testLookupSpecializedIQHandler() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        NamespaceHandlerDictionary testDictionary = new NamespaceHandlerDictionary("test:namespace:OK");
        testDictionary.register(new TestIQHandler("testOK", "test:namespace:OK"));
        stanzaHandlerLookup.addDictionary(testDictionary);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        sessionStateHolder = new SessionStateHolder();
        Entity serverEnitity = new EntityImpl(null, "vysper-server.org", null);
        StanzaReceiverRelay receiverRelay = new StanzaReceiverRelay();
        DefaultServerRuntimeContext serverRuntimeContext = new DefaultServerRuntimeContext(serverEnitity, receiverRelay);
        receiverRelay.setServerRuntimeContext(serverRuntimeContext);
        serverRuntimeContext.addDictionary(new BaseStreamStanzaDictionary());
        sessionStateHolder = new SessionStateHolder();
        sessionContext = new TestSessionContext(serverRuntimeContext, sessionStateHolder);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        protocolWorker = new ProtocolWorker();
        StanzaReceiverRelay receiverRelay = new StanzaReceiverRelay();
        serverRuntimeContext = new DefaultServerRuntimeContext(serverEnitity, receiverRelay);
        receiverRelay.setServerRuntimeContext(serverRuntimeContext);
        serverRuntimeContext.addDictionary(new BaseStreamStanzaDictionary());
        sessionStateHolder = new SessionStateHolder();
        sessionContext = new TestSessionContext(serverRuntimeContext, sessionStateHolder);
        sessionContext.setSessionState(getDefaultState());
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

    }

    public void testLookupCoreHandlerClientNS() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("iq", NamespaceURIs.JABBER_CLIENT).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary

        return new StanzaHandlerLookup(null);
    }

    public void testLookupCoreHandlerServerNS() {
        StanzaHandlerLookup stanzaHandlerLookup = initStanzaHandlerLookup();
        stanzaHandlerLookup.addDictionary(new BaseStreamStanzaDictionary());

        Stanza stanza = new StanzaBuilder("iq", NamespaceURIs.JABBER_SERVER).build();
        StanzaHandler handler = stanzaHandlerLookup.getHandler(stanza);

        assertNotNull("handler found", handler);
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.