Examples of registerForAvailabilityEvent()


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

        registrations.add(er2a);
        reset(txn);

        TestEventListener05 testEventListener3a = new TestEventListener05();
        templates.add(new SimpleEntry(null, null));
        EventRegistration er3a = space05.registerForAvailabilityEvent(
                templates, txn, false,
                testEventListener3a, leaseForeverTime,
                new MarshalledObject("notUsedHere"));
        notifications = testEventListener3a.getNotifications();
        expectedResult.add(sampleEntry1);
View Full Code Here

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

        registrations.add(er3a);
        reset(txn);

        TestEventListener05 testEventListener4a = new TestEventListener05();
        templates.add(null);
        EventRegistration er4a = space05.registerForAvailabilityEvent(
                templates, txn, false,
                testEventListener4a, leaseForeverTime,
                new MarshalledObject("notUsedHere"));
        notifications = testEventListener4a.getNotifications();
        expectedResult.add(sampleEntry1);
View Full Code Here

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

        registrations.add(er4a);
        reset(txn);

        TestEventListener05 testEventListener5a = new TestEventListener05();
        templates.add(null);
        EventRegistration er5a = space05.registerForAvailabilityEvent(
                templates, txn, false,
                testEventListener5a, leaseForeverTime,
                new MarshalledObject("notUsedHere"));
        notifications = testEventListener5a.getNotifications();
        expectedResult.add(sampleEntry1);
View Full Code Here

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

        templates.add(null);
        templates.add(new SimpleEntry(null, null));
        templates.add((SimpleEntry) sampleEntry2.clone());
        templates.add((SimpleEntry) sampleEntry3.clone());
        templates.add(new SimpleEntry(null, 2));
        EventRegistration er6a = space05.registerForAvailabilityEvent(
                templates, txn, false,
                testEventListener6a, leaseForeverTime,
                new MarshalledObject("notUsedHere"));
        notifications = testEventListener6a.getNotifications();
        expectedResult.add(sampleEntry2);
View Full Code Here

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

        txn = getTransaction();
        TestEventListener05 testEventListenerExc = new TestEventListener05();
        templates.add((SimpleEntry) sampleEntry1.clone());
        templates.add("not an Entry");
        try {
            space05.registerForAvailabilityEvent(templates, txn, true,
                    testEventListenerExc, leaseForeverTime,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when a non-null element of tmpls "
                                    + "is not an instance of Entry");
View Full Code Here

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

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

        templates.clear();
        try {
            space05.registerForAvailabilityEvent(templates, txn, true,
                    testEventListenerExc, leaseForeverTime,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when tmpls is empty");
        } catch (IllegalArgumentException e) {}
View Full Code Here

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

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

        templates.add((SimpleEntry) sampleEntry1.clone());
        try {
            space05.registerForAvailabilityEvent(templates, txn, true,
                    testEventListenerExc, 0,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when leaseDuration is neither positive "
                                    + "nor Lease.ANY (0)");
View Full Code Here

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

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

        try {
            space05.registerForAvailabilityEvent(templates, txn, true,
                    testEventListenerExc, Lease.ANY - 1,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when leaseDuration is neither positive "
                                    + "nor Lease.ANY (Lease.ANY-1)");
View Full Code Here

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

                                    + "when leaseDuration is neither positive "
                                    + "nor Lease.ANY (Lease.ANY-1)");
        } catch (IllegalArgumentException e) {}

        try {
            space05.registerForAvailabilityEvent(null, txn, true,
                    testEventListenerExc, leaseForeverTime,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("NullPointerException is not thrown "
                                    + "when tmpls is null");
        } catch (NullPointerException e) {}
View Full Code Here

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

            throw new TestException("NullPointerException is not thrown "
                                    + "when tmpls is null");
        } catch (NullPointerException e) {}

        try {
            space05.registerForAvailabilityEvent(templates, txn, true,
                    null, leaseForeverTime,
                    new MarshalledObject("notUsedHere"));
            throw new TestException("NullPointerException is not thrown "
                                    + "when listener is null");
        } catch (NullPointerException 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.