public class DistributedActorWrapper extends java.lang.Object implements RemoteDistributedActor
Constructor and Description |
---|
DistributedActorWrapper()
Construct an DistributedActorWrapper.
|
Modifier and Type | Method and Description |
---|---|
void |
fire()
Fire the wrapped actor.
|
java.net.InetAddress |
getAddress()
Return the Internet Address where the wrapper is executing.
|
void |
initialize()
Begin execution of the wrapped actor.
|
int |
iterate(int count)
Invoke a specified number of iterations of the wrapped actor.
|
boolean |
loadMoML(java.lang.String moml)
Load a moml representation of an actor.
|
boolean |
postfire()
This method should be invoked once per iteration, after the last
invocation of fire() in that iteration.
|
boolean |
prefire()
This method should be invoked once per iteration, before the first
invocation of fire() in that iteration.
|
void |
preinitialize()
This method should be invoked exactly once per execution
of a model, before any of these other methods are invoked.
|
void |
put(java.util.HashMap data)
Puts copies of the token received into the Receivers included in the
IDlist.
|
void |
setConnections(java.util.HashMap connections)
Set the "virtual connections" concerning the wrapped actor.
|
void |
setPortTypes(java.util.HashMap portTypes)
Set the port types of the wrapped actor.
|
void |
stop()
Request that execution of the wrapped actor to stop as
soon as possible.
|
void |
stopFire()
Request that execution of the current iteration of the
wrapped actor complete.
|
void |
terminate()
Terminate any currently executing model with extreme prejudice.
|
void |
wrapup()
This method is invoked exactly once per execution
of an application.
|
public DistributedActorWrapper()
public void fire() throws java.rmi.RemoteException
fire
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public java.net.InetAddress getAddress() throws java.rmi.RemoteException
getAddress
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void initialize() throws java.rmi.RemoteException
initialize
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public int iterate(int count) throws java.rmi.RemoteException
iterate
in interface DistributedActor
count
- The number of iterations to perform.java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public boolean loadMoML(java.lang.String moml) throws java.rmi.RemoteException
loadMoML
in interface DistributedActor
moml
- The moml code representing the actor to be loaded.java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public boolean postfire() throws java.rmi.RemoteException
postfire
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public boolean prefire() throws java.rmi.RemoteException
prefire
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void preinitialize() throws java.rmi.RemoteException
preinitialize
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void put(java.util.HashMap data) throws java.rmi.RemoteException, IllegalActionException
put
in interface DistributedActor
data
- contains a token and a list of IDs.java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.IllegalActionException
- If the transaction fails (e.g.
the data type is incompatible).public void setConnections(java.util.HashMap connections) throws java.rmi.RemoteException
setConnections
in interface DistributedActor
connections
- a mapping of ports, services and receiver IDs (see
before).java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void setPortTypes(java.util.HashMap portTypes) throws java.rmi.RemoteException
setPortTypes
in interface DistributedActor
portTypes
- is a Map of ports to port types.java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void stop() throws java.rmi.RemoteException
stop
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void stopFire() throws java.rmi.RemoteException
stopFire
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void terminate() throws java.rmi.RemoteException
terminate
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.public void wrapup() throws java.rmi.RemoteException
wrapup
in interface DistributedActor
java.rmi.RemoteException
- If a communication-related exception may
occur during the execution of a remote method call.