Examples of Isolate


Examples of com.sun.cldc.isolate.Isolate

     * Tests setting a closed link.
     */
    void testClosed() {
        boolean thrown;
        Link[] la;
        Isolate is = Isolate.currentIsolate();

        la = new Link[3];
        la[0] = Link.newLink(is, is);
        la[1] = Link.newLink(is, is);
        la[2] = Link.newLink(is, is);
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests blocking getLinks(), followed by setLinks().
     */
    void testBlockedGet() {
        Isolate is = Isolate.currentIsolate();

        LinkPortal.setLinks(is, new Link[] { Link.newLink(is, is) });
        LinkPortal.setLinks(is, null);

        Getter get1 = new Getter();
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

     * Tests setting and getting of actual data.
     */
    void testActual() {
        Link[] la1;
        Link[] la2;
        Isolate is = Isolate.currentIsolate();

        la1 = new Link[3];
        la1[0] = Link.newLink(is, is);
        la1[1] = Link.newLink(is, is);
        la1[2] = Link.newLink(is, is);
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests replacement of a link array and proper cleanup.
     */
    void testReplace() {
        Isolate is = Isolate.currentIsolate();
        Link[] la = new Link[3];

        la[0] = Link.newLink(is, is);
        la[1] = Link.newLink(is, is);
        la[2] = Link.newLink(is, is);
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests whether setLinks does proper checking on the isolate's state.
     */
    void testIsolateState() throws IsolateStartupException {
        Isolate us = Isolate.currentIsolate();
        Isolate them = new Isolate("com.sun.midp.links.Empty", null);
        Link[] la = new Link[1];
        boolean thrown;

        la[0] = Link.newLink(us, us);

        thrown = false;
        try {
            LinkPortal.setLinks(them, la);
        } catch (IllegalStateException ise) {
            thrown = true;
        }
        assertTrue("not started: setLinks should throw ISE", thrown);

        them.start();
        thrown = false;
        try {
            LinkPortal.setLinks(them, la);
        } catch (IllegalStateException ise) {
            thrown = true;
        } finally {
            LinkPortal.setLinks(them, null)// clean up
        }           
        assertFalse("started: setLinks shouldn't throw ISE", thrown);

        them.exit(0);
        them.waitForExit();
        thrown = false;
        try {
            LinkPortal.setLinks(them, la);
        } catch (IllegalStateException ise) {
            thrown = true;
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests receive-then-send of a String.
     */
    void testReceiveString() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        Receiver receiver = new Receiver(link);
        String sendstr = "bar";

        link.send(LinkMessage.newStringMessage(sendstr));
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests send-then-receive of a String.
     */
    void testSendString() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        String sendstr = "foo";
        Sender sender = new Sender(link,
            LinkMessage.newStringMessage(sendstr));

View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests receive-then-send of a byte array.
     */
    void testReceiveData() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        Receiver receiver = new Receiver(link);
        byte[] sendarr = new byte[100];
        Utils.fillRandom(sendarr);

View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests send-then-receive of a byte array.
     */
    void testSendData() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        byte[] sendarr = new byte[100];
        Utils.fillRandom(sendarr);
        Sender sender = new Sender(link,
            LinkMessage.newDataMessage(sendarr));
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests receive-then-send of a byte array subrange.
     */
    void testReceiveDataRange() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        Receiver receiver = new Receiver(link);
        byte[] sendarr = new byte[100];
        Utils.fillRandom(sendarr);

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.