Examples of Isolate


Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests send-then-receive of a byte array subrange.
     */
    void testSendDataRange() 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, 47, 22));
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests the transfer of a message containing a link, where the receiver
     * thread blocks first.
     */
    void testReceiveLink() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        Link sentlink = Link.newLink(i, i);
        Receiver receiver = new Receiver(link);

        link.send(LinkMessage.newLinkMessage(sentlink));
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

    /**
     * Tests the transfer of a message containing a link, where the sender
     * thread blocks first.
     */
    void testSendLink() throws IOException {
        Isolate i = Isolate.currentIsolate();
        Link link = Link.newLink(i, i);
        Link sentlink = Link.newLink(i, i);
        Sender sender = new Sender(link,
            LinkMessage.newLinkMessage(sentlink));

View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

     * remove the MIDlet from the monitor's MIDlet list.
     *
     * @param proxy proxy of MIDlet
     */
    private void startNotificationThread(MIDletProxy proxy) {
        Isolate isolate = (Isolate)isolates.get(proxy);
        TerminationNotifier notifier = new TerminationNotifier();

        notifier.midlet = proxy;
        notifier.isolate = isolate;
        notifier.parent = this;
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

        mainArgs[1] = binFile;
        mainArgs[2] = String.valueOf(flags);
                   
        try {
            // IMPL NOTE: eliminate the hardcoded string constants
            Isolate iso =  new Isolate("com.sun.midp.main.AppImageWriter",
                    mainArgs, classpath);
            iso.setAPIAccess(true);
            iso.start();
            iso.waitForExit();

            code = iso.exitCode();
        }
        catch (IsolateStartupException ise) {
            if (Logging.REPORT_LEVEL <= Logging.ERROR) {
                Logging.report(Logging.ERROR, LogChannels.LC_AMS,
                "Cannot startup isolate: " + ise);
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

     * Set the MIDletProxy to run with the Minimum Isolate Priority
     *
     * @param mp MIDletProxy
     */
    public static void minPriority(MIDletProxy mp) {
        Isolate isolate = getIsolateFromId(mp.getIsolateId());
        if (isolate != null) {
            isolate.setPriority(Isolate.MIN_PRIORITY);
        }
    }
View Full Code Here

Examples of com.sun.cldc.isolate.Isolate

     * Set the MIDletProxy to run with the Normal Isolate Priority
     *
     * @param mp MIDletProxy
     */
    public static void normalPriority(MIDletProxy mp) {
        Isolate isolate = getIsolateFromId(mp.getIsolateId());
        if (isolate != null) {
          isolate.setPriority(Isolate.NORM_PRIORITY);
        }
    }
View Full Code Here

Examples of javax.isolate.Isolate

    public IsolateCommandThreadImpl(CommandRunner cr) throws IOException {
        this.cr = cr;
        CommandIO[] ios = cr.getIOs();
        Properties properties = System.getProperties();
        StreamBindings streamBindings = createStreamBindings(ios);
        isolate = new Isolate(streamBindings, properties,
                "org.jnode.shell.isolate.IsolateCommandLauncher", new String[0]);
    }
View Full Code Here

Examples of javax.isolate.Isolate

        if (listConsoles) {
            conMgr.printConsoles(out);
        } else if (newConsole) {
            if (isolateNewConsole) {
                try {
                    Isolate newIsolate = new Isolate(
                            ConsoleCommand.IsolatedConsole.class.getName(),
                            new String[0]);
                    newIsolate.start();
                    out.println("Started new isolated console");
                } catch (IsolateStartupException ex) {
                    out.println("Failed to start new isolated console");
                    throw ex;
                }
View Full Code Here

Examples of javax.isolate.Isolate

    /**
     * Constructor for the root isolate.
     */
    private VmIsolate(VmIsolatedStatics isolatedStatics) {
        this.id = StaticData.nextId();
        this.isolate = new Isolate(this);
        this.mainClass = null;
        this.args = null;
        this.bindings = new VmStreamBindings();
        this.state = State.STARTED;
        this.threadGroup = getRootThreadGroup();
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.