Examples of TerminateProcessException


Examples of ptolemy.actor.process.TerminateProcessException

        try {
            return (CSPDirector) _parentActor.getExecutiveDirector();
        } catch (Exception ex) {
            // If a thread has a reference to a receiver with no director it
            // is an error so terminate the process.
            throw new TerminateProcessException("CSPReceiver: trying to "
                    + " rendezvous with a receiver with no "
                    + "director => terminate.");
        }
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                if (successfulBranch == -1) {
                    // all guards false so exit CDO
                    continueCDO = false;
                } else if (!flag) {
                    throw new TerminateProcessException(getName() + ": "
                            + "branch id returned during execution of CDO.");
                }

                count++;
            }
        } catch (IllegalActionException ex) {
            throw new TerminateProcessException(getName() + ": Error: "
                    + "could not create ConditionalReceive branch");
        }

        return;
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                    // Notify any receivers that might be waiting for
                    // the rendevous to complete.
                    director.notifyAll();
                }
            } catch (InterruptedException ex) {
                throw new TerminateProcessException(
                        "CSPReceiver.get() interrupted.");
            } finally {
                if (_getWaiting != null) {
                    // If the _getWaiting flag is still true, then this
                    // process was blocked, woken up and terminated.
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                    // the rendezvous to complete.
                    director.notifyAll();
                    return;
                }
            } catch (InterruptedException ex) {
                throw new TerminateProcessException(
                        "CSPReceiver.put() interrupted.");
            } finally {
                if (_putWaiting != null) {
                    // If the put is still marked as waiting, then
                    // process was blocked, awakened and terminated.
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                return (CSPDirector) container.getExecutiveDirector();
            }
        } catch (NullPointerException ex) {
            // If a thread has a reference to a receiver with no director it
            // is an error so terminate the process.
            throw new TerminateProcessException("CSPReceiver: trying to "
                    + " rendezvous with a receiver with no "
                    + "director => terminate.");
        }
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

     *   running i.e. it was not allowed to run to completion.
     */
    private void _checkFlags() throws TerminateProcessException {
        synchronized (_getDirector()) {
            if (_modelFinished) {
                throw new TerminateProcessException(getContainer().getName()
                        + ": terminated.");
            }
        }
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                    _terminate = true;
                }
            }

            if (_terminate) {
                throw new TerminateProcessException("");
            }
        }

        return result;
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

                    _terminate = true;
                }
            }

            if (_terminate) {
                throw new TerminateProcessException("Process terminated.");
            }
        }
    }
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

            // Sleep so that graphical displays involving this
            // applet will pause after colors are changed.
            try {
                Thread.sleep(300);
            } catch (InterruptedException e) {
                throw new TerminateProcessException(this, "Terminated");
            }

            if ((br >= 0) && (br < _numInChannels)) {
                token = (StringToken) branches[br].getToken();
                _strValue = token.toString();
View Full Code Here

Examples of ptolemy.actor.process.TerminateProcessException

        // State 2
        try {
            Thread.sleep(300);
        } catch (InterruptedException e) {
            throw new TerminateProcessException(this, "Terminated");
        }

        BooleanToken bToken = (BooleanToken) requestInput.get(0);

        if (bToken.booleanValue()) {
            // State 3
            _debug(new ExecEvent(this, ExecEvent.ACCESSING));

            try {
                Thread.sleep(300);
            } catch (InterruptedException e) {
                throw new TerminateProcessException(this, "Terminated");
            }

            if (read) {
                memoryInput.get(0);
            } else {
                StringToken strToken = new StringToken(getName());
                memoryOutput.broadcast(strToken);
            }

            return;
        } else {
            // State 4
            _debug(new ExecEvent(this, ExecEvent.BLOCKED));

            try {
                Thread.sleep(300);
            } catch (InterruptedException e) {
                throw new TerminateProcessException(this, "Terminated");
            }
        }

        accessMemory(read);
    }
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.