Examples of MemoryStorageProviderRegistry


Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry

     */
    public static void main(String[] args) throws AccountCreationException, EntityFormatException {

        // choose the storage you want to use
        //StorageProviderRegistry providerRegistry = new JcrStorageProviderRegistry();
        StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();

        final AccountManagement accountManagement = (AccountManagement) providerRegistry
                .retrieve(AccountManagement.class);

        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user1@vysper.org"))) {
            accountManagement.addUser("user1@vysper.org", "password1");
        }
View Full Code Here

Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry

    private void initializeXmppServer() {
        try {
            if (xmppServer == null) {
                xmppServer = new XMPPServer("apache.camel");

                StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
                AccountManagement accountManagement = (AccountManagement) providerRegistry.retrieve(AccountManagement.class);

                Entity user = EntityImpl.parseUnchecked("camel_consumer@apache.camel");
                accountManagement.addUser(user, "secret");

                Entity user2 = EntityImpl.parseUnchecked("camel_producer@apache.camel");
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.