Examples of contents()


Examples of com.sun.jini.outrigger.JavaSpaceAdmin.contents()

        JavaSpaceAdmin admin = (JavaSpaceAdmin) ((Administrable)
                space).getAdmin();
        admin = (JavaSpaceAdmin) getConfig().prepare("test.outriggerAdminPreparer",
                                                     admin);

        final AdminIterator it = admin.contents(null, null, 1);

        if (it.next() != null) {
            throw new TestException(
                    "Space was not empty upon termination.");
        }
View Full Code Here

Examples of com.sun.jini.outrigger.JavaSpaceAdmin.contents()

            JavaSpaceAdmin admin = (JavaSpaceAdmin) ((Administrable)
                space).getAdmin();
      admin = (JavaSpaceAdmin)
        getConfig().prepare("test.outriggerAdminPreparer",
          admin);
            final AdminIterator i = admin.contents(null, null, BLOCKING_FACTOR);

            while (i.next() != null) {
                i.delete();
            }
            i.close();
View Full Code Here

Examples of net.geco.basics.Html.contents()

      @Override
      public void mousePressed(MouseEvent e) {
        Html html = new Html();
        html.open("div", "align=center"); //$NON-NLS-1$ //$NON-NLS-2$
        html.b("Geco version " + geco.version()).br().br(); //$NON-NLS-1$
        html.contents("Copyright (c) 2008-2011 Simon Denier.").br(); //$NON-NLS-1$
        html.contents(Messages.uiGet("GecoWindow.AboutLicenseText")).br(); //$NON-NLS-1$
        html.contents(Messages.uiGet("GecoWindow.AboutReadmeText")); //$NON-NLS-1$
        html.close("div"); //$NON-NLS-1$
        JOptionPane.showMessageDialog(
            GecoWindow.this,
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

         * that an entry is removed from match set after performing
         * MatchSet.next() method
         */
        JavaSpace05 space05 = (JavaSpace05) space;
        templates.add(sampleEntry1);
        MatchSet matchSet = space05.contents(templates, null, Lease.ANY,
                                             MAX_ENTRIES);
        if (matchSet.next() == null) {
            throw new TestException("Match set is exhausted. "
                                    + "But it shouldn't be.");
        }
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

        /*
         * After maxEntries entries are yielded by next invocations the match
         * set becomes empty. For this test case let maxEntries = 2
         */
        templates.add(null);    // for 3 existing entries
        matchSet = space05.contents(templates, null, Lease.ANY, 2);
        matchSet.next();
        matchSet.next();
        if (matchSet.next() != null) {
            throw new TestException("Match set is not empty after maxEntries "
                                    + "are yielded by next invocations");
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

        /*
         * The initial duration of the lease must be less than or equal to
         * leaseDuration. Let leaseDuration = instantTime.
         */
        templates.add(null);    // for 3 existing entries
        matchSet = space05.contents(templates, null, leaseForeverTime,
                                    MAX_ENTRIES);
        Lease lease = matchSet.getLease();
        if (lease != null) {
            long initialDuration = lease.getExpiration()
                    - System.currentTimeMillis();
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

        reset();

        templates.add((SimpleEntry) sampleEntry1.clone());
        templates.add("not an Entry");
        try {
            space05.contents(templates, null, Lease.ANY, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when a non-null element of tepmlates "
                                    + "is not an instance on Entry");
        } catch (IllegalArgumentException e) {}
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

                                    + "is not an instance on Entry");
        } catch (IllegalArgumentException e) {}

        templates.clear();
        try {
            space05.contents(templates, null, Lease.ANY, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when templates is empty");
        } catch (IllegalArgumentException e) {}

        templates.add((SimpleEntry) sampleEntry1.clone());
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

                                    + "when templates is empty");
        } catch (IllegalArgumentException e) {}

        templates.add((SimpleEntry) sampleEntry1.clone());
        try {
            space05.contents(templates, null, 0, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when leaseDuration is nither positive "
                                    + "nor Lease.ANY (0)");
        } catch (IllegalArgumentException e) {}
View Full Code Here

Examples of net.jini.space.JavaSpace05.contents()

                                    + "when leaseDuration is nither positive "
                                    + "nor Lease.ANY (0)");
        } catch (IllegalArgumentException e) {}

        try {
            space05.contents(templates, null, Lease.ANY - 1, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when leaseDuration is nither positive "
                                    + "nor Lease.ANY (Lease.ANY-1)");
        } catch (IllegalArgumentException e) {}
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.