Examples of retrieve()


Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry.retrieve()

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

        StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();

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

        accountManagement.addUser("test@vysper.org", "password");
        accountManagement.addUser("test2@vysper.org", "password");

        XMPPServer server = new XMPPServer("vysper.org");
View Full Code Here

Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry.retrieve()

        // 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");
        }
        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user2@vysper.org"))) {
View Full Code Here

Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry.retrieve()

    }

    private void startServer(int port) throws Exception {
        StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
       
        AccountManagement accountManagement = (AccountManagement) providerRegistry.retrieve(AccountManagement.class);
        accountManagement.addUser(TEST_USERNAME1, TEST_PASSWORD1);
        accountManagement.addUser(TEST_USERNAME2, TEST_PASSWORD2);

        server = new XMPPServer(SERVER_DOMAIN);
       
View Full Code Here

Examples of org.apache.vysper.storage.inmemory.MemoryStorageProviderRegistry.retrieve()

   
    @Before
    public void startServer() throws Exception {
        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.xmpp.modules.roster.persistence.RosterManager.retrieve()

            registry.setResourceState(resourceId, ResourceState.makeInterested(currentState));
        }

        Roster roster = null;
        try {
            roster = rosterManager.retrieve(from.getBareJID());
            if (roster == null) return handleCannotRetrieveRoster(stanza, sessionContext);
        } catch (RosterException e) {
            return handleCannotRetrieveRoster(stanza, sessionContext);
        }
View Full Code Here

Examples of org.atomojo.www.util.URLRetriever.retrieve()

                     for (int i=0; i<downloads.length; i++) {
                        File jarfile = File.createTempFile("jar-T"+System.currentTimeMillis()+"-", ".jar");
                        urls[i] = jarfile.toURL();
                        URLRetriever retriever = new URLRetriever(downloads[i]);
                        try {
                           retriever.retrieve(jarfile, autoConf.getUsername(), autoConf.getPassword());
                        } catch (IOException ex) {
                           getLogger().info("Cannot download "+downloads[i]+" due to: "+ex.getMessage());
                           continue;
                        }
                     }
View Full Code Here

Examples of org.chaidb.db.helper.cache.storage.BTreePathStorage.retrieve()

                if ((ids = (BTreePathStorage) idStorageList.get(name)) == null) {
                    ids = initIdStorage(DbEnvironment.getDataHome() + name + File.separator + "datalog");
                    idStorageList.put(name, ids);
                }

                rName = ids.retrieve(trueId);
                logger.debug("treeId:" + treeId + " name:" + rName);

                return DbEnvironment.getDataHome() + name + File.separator + rName;
            } else {
                if (idStorage == null) {
View Full Code Here

Examples of org.datanucleus.state.StateManager.retrieve()

            StateManager sm = findStateManager(obj);
            if (sm == null)
            {
                throw new NucleusUserException(LOCALISER.msg("010007", getApiAdapter().getIdForObject(obj)));
            }
            sm.retrieve(fgOnly);
        }
        finally
        {
            clr.unsetPrimary();
        }
View Full Code Here

Examples of org.directmemory.memory.OffHeapMemoryBuffer.retrieve()

    logger.info("entries=" + howMany);
    String test = "this is a nicely crafted test";
    for (int i = 0; i < howMany; i++) {
      final byte[] payload = (test + " - " + i).getBytes();
      Pointer p = mem.store(payload);
      final byte[] check = mem.retrieve(p);
      assertNotNull(check);
      assertEquals(test + " - " + i, new String(check));
      long crc1 = OffHeapMemoryBuffer.crc32(payload);
      long crc2 = OffHeapMemoryBuffer.crc32(check);
      assertEquals(crc1, crc2);
View Full Code Here

Examples of org.dspace.content.Bitstream.retrieve()

            return false;
        else
        {
            String resource = "depositlicense_"+
                              String.valueOf(licenseBs.getSequenceID())+".txt";
            addRightsStream(licenseBs.retrieve(), resource, "text/plain",
                           DSPACE_DEPOSIT_LICENSE_MDTYPE, amdSec);
            return true;
        }
    }
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.