Package ptolemy.distributed.common

Examples of ptolemy.distributed.common.DistributedActor


        if (VERBOSE) {
            System.out.println(service.serviceID + " starts running...");
        }

        DistributedActor distributedActor;
        int command;

        while ((command = synchronizer.getCommand(this)) != EXIT) {
            if (VERBOSE) {
                System.out.println(service.serviceID + " -> Command: "
                        + command);
            }

            distributedActor = (DistributedActor) service.service;

            try {
                switch (command) {
                case INITIALIZE:
                    distributedActor.initialize();
                    break;

                case FIRE:
                    distributedActor.fire();
                    break;

                case ITERATE:
                    distributedActor.iterate(iterationCount);
                    break;
                }
            } catch (RemoteException e) {
                KernelException.stackTraceToString(e);
            }
View Full Code Here


            ServiceItem server = (ServiceItem) services.next();
            LinkedList ids = (LinkedList) servicesReceiversListMap.get(server);
            HashMap hashMap = new HashMap();
            hashMap.put(token, ids);

            DistributedActor distributedActor = (DistributedActor) server.service;

            try {
                distributedActor.put(hashMap);
            } catch (RemoteException e) {
                KernelException.stackTraceToString(e);
            }
        }
    }
View Full Code Here

                }
            }

            ServiceItem server = ((ClientThread) actorsThreadsMap.get(actor))
                    .getService();
            DistributedActor distributedActor = (DistributedActor) server.service;

            try {
                if (VERBOSE) {
                    System.out.println("Setting connections to: "
                            + actor.getFullName() + " in: "
                            + server.serviceID.toString());
                    System.out.println("Setting port Types: "
                            + actor.getFullName() + " in: "
                            + server.serviceID.toString());
                }

                distributedActor.setConnections(portsReceiversMap);
                distributedActor.setPortTypes(portTypes);
            } catch (RemoteException e) {
                KernelException.stackTraceToString(e);
            }
        }
    }
View Full Code Here

                .hasNext();) {
            ComponentEntity actor = (ComponentEntity) keysIterator.next();
            ServiceItem server = ((ClientThread) actorsThreadsMap.get(actor))
                    .getService();

            DistributedActor distributedActor = (DistributedActor) server.service;

            try {
                if (VERBOSE) {
                    System.out.println("Loading class: "
                            + actor.getClass().getName() + " in: "
                            + server.serviceID.toString());
                }

                distributedActor.loadMoML(actor.exportMoML());

                // Is this needed?
                distributedActor.initialize();
            } catch (RemoteException e) {
                KernelException.stackTraceToString(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of ptolemy.distributed.common.DistributedActor

Copyright © 2018 www.massapicom. 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.