Package org.apache.vysper.xmpp.delivery

Examples of org.apache.vysper.xmpp.delivery.StanzaRelayBroker


        AccountManagement accountManagement = (AccountManagement) storageProviderRegistry.retrieve(AccountManagement.class);
        DeliveringInboundStanzaRelay internalStanzaRelay = new DeliveringInboundStanzaRelay(serverEntity, resourceRegistry, accountManagement);
        RecordingStanzaRelay externalStanzaRelay = new RecordingStanzaRelay();

        StanzaRelayBroker stanzaRelayBroker = new StanzaRelayBroker();
        stanzaRelayBroker.setInternalRelay(internalStanzaRelay);
        stanzaRelayBroker.setExternalRelay(externalStanzaRelay);

        ServerFeatures serverFeatures = new ServerFeatures();
        serverFeatures.setAuthenticationMethods(saslMechanisms);

        serverRuntimeContext = new DefaultServerRuntimeContext(serverEntity, stanzaRelayBroker, serverFeatures, dictionaries, resourceRegistry);
        serverRuntimeContext.setStorageProviderRegistry(storageProviderRegistry);
        serverRuntimeContext.setTlsContextFactory(tlsContextFactory);

        serverRuntimeContext.addModule(new ServiceDiscoveryModule());
        serverRuntimeContext.addModule(new RosterModule());

        stanzaRelayBroker.setServerRuntimeContext(serverRuntimeContext);
        internalStanzaRelay.setServerRuntimeContext(serverRuntimeContext);

        if (endpoints.size() == 0) throw new IllegalStateException("server must have at least one endpoint");
        for (Endpoint endpoint : endpoints) {
            endpoint.setServerRuntimeContext(serverRuntimeContext);
View Full Code Here


    private StanzaSessionFactory sessionFactory;

    @Override
    protected void setUp() throws Exception {
        StanzaRelayBroker relay = new StanzaRelayBroker();
       
        List<NamespaceHandlerDictionary> dictionaries = new ArrayList<NamespaceHandlerDictionary>();
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.starttls.StartTLSStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.sasl.SASLStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.bind.BindResourceDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.session.SessionStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.compatibility.jabber_iq_auth.JabberIQAuthDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.roster.RosterDictionary());
       
        DefaultServerRuntimeContext serverContext = new DefaultServerRuntimeContext(
                new EntityImpl(null, "test", null),
                relay,
                new ServerFeatures(),
                dictionaries,
                new ResourceRegistry());

        relay.setServerRuntimeContext(serverContext);

        sessionFactory = new StanzaSessionFactory();
        sessionFactory.setServerRuntimeContext(serverContext);
    }
View Full Code Here

    private StanzaSessionFactory sessionFactory;

    @Override
    protected void setUp() throws Exception {
        StanzaRelayBroker relay = new StanzaRelayBroker();

        List<NamespaceHandlerDictionary> dictionaries = new ArrayList<NamespaceHandlerDictionary>();
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.starttls.StartTLSStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.sasl.SASLStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.bind.BindResourceDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.session.SessionStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.compatibility.jabber_iq_auth.JabberIQAuthDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.roster.RosterDictionary());

        DefaultServerRuntimeContext serverContext = new DefaultServerRuntimeContext(new EntityImpl(null, "test", null),
                relay, new ServerFeatures(), dictionaries, new ResourceRegistry());

        relay.setServerRuntimeContext(serverContext);

        sessionFactory = new StanzaSessionFactory();
        sessionFactory.setServerRuntimeContext(serverContext);
    }
View Full Code Here

                .retrieve(AccountManagement.class);
        DeliveringInboundStanzaRelay internalStanzaRelay = new DeliveringInboundStanzaRelay(serverEntity,
                resourceRegistry, accountManagement);
        RecordingStanzaRelay externalStanzaRelay = new RecordingStanzaRelay();

        StanzaRelayBroker stanzaRelayBroker = new StanzaRelayBroker();
        stanzaRelayBroker.setInternalRelay(internalStanzaRelay);
        stanzaRelayBroker.setExternalRelay(externalStanzaRelay);

        ServerFeatures serverFeatures = new ServerFeatures();
        serverFeatures.setAuthenticationMethods(saslMechanisms);

        serverRuntimeContext = new DefaultServerRuntimeContext(serverEntity, stanzaRelayBroker, serverFeatures,
                dictionaries, resourceRegistry);
        serverRuntimeContext.setStorageProviderRegistry(storageProviderRegistry);
        serverRuntimeContext.setTlsContextFactory(tlsContextFactory);

        serverRuntimeContext.addModule(new ServiceDiscoveryModule());
        serverRuntimeContext.addModule(new RosterModule());

        stanzaRelayBroker.setServerRuntimeContext(serverRuntimeContext);
        internalStanzaRelay.setServerRuntimeContext(serverRuntimeContext);

        if (endpoints.size() == 0)
            throw new IllegalStateException("server must have at least one endpoint");
        for (Endpoint endpoint : endpoints) {
View Full Code Here

        OfflineStanzaReceiver offlineReceiver = (OfflineStanzaReceiver) storageProviderRegistry.retrieve(OfflineStorageProvider.class);
        DeliveringInternalInboundStanzaRelay internalStanzaRelay = new DeliveringInternalInboundStanzaRelay(serverEntity,
                resourceRegistry, accountManagement,offlineReceiver);
        DeliveringExternalInboundStanzaRelay externalStanzaRelay = new DeliveringExternalInboundStanzaRelay();

        StanzaRelayBroker stanzaRelayBroker = new StanzaRelayBroker();
        stanzaRelayBroker.setInternalRelay(internalStanzaRelay);
        stanzaRelayBroker.setExternalRelay(externalStanzaRelay);

        ServerFeatures serverFeatures = new ServerFeatures();
        serverFeatures.setAuthenticationMethods(saslMechanisms);

        serverRuntimeContext = new DefaultServerRuntimeContext(serverEntity, stanzaRelayBroker, serverFeatures,
                dictionaries, resourceRegistry);
        serverRuntimeContext.setStorageProviderRegistry(storageProviderRegistry);
        serverRuntimeContext.setTlsContextFactory(tlsContextFactory);

        serverRuntimeContext.addModule(new ServiceDiscoveryModule());
        serverRuntimeContext.addModule(new RosterModule());

        stanzaRelayBroker.setServerRuntimeContext(serverRuntimeContext);
        internalStanzaRelay.setServerRuntimeContext(serverRuntimeContext);
        externalStanzaRelay.setServerRuntimeContext(serverRuntimeContext);

        if (endpoints.size() == 0)
            throw new IllegalStateException("server must have at least one endpoint");
View Full Code Here

    private StanzaSessionFactory sessionFactory;

    @Override
    protected void setUp() throws Exception {
        StanzaRelayBroker relay = new StanzaRelayBroker();

        List<HandlerDictionary> dictionaries = new ArrayList<HandlerDictionary>();
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.base.BaseStreamStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.starttls.StartTLSStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.sasl.SASLStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.bind.BindResourceDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.session.SessionStanzaDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.core.compatibility.jabber_iq_auth.JabberIQAuthDictionary());
        dictionaries.add(new org.apache.vysper.xmpp.modules.roster.RosterDictionary());

        DefaultServerRuntimeContext serverContext = new DefaultServerRuntimeContext(new EntityImpl(null, "test", null),
                relay, new ServerFeatures(), dictionaries, new ResourceRegistry());

        relay.setServerRuntimeContext(serverContext);

        sessionFactory = new StanzaSessionFactory();
        sessionFactory.setServerRuntimeContext(serverContext);
    }
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.delivery.StanzaRelayBroker

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.