Actor Foundry

The Actor Foundry (yangtze.cs.uiuc.edu ) is a Java Language implementation of the Actors Model.

Here is a simple example of Actor Foundry code, that creates an actor and sends it two messages:

package osl.examples.xampi; import osl.manager.*; import osl.util.*;

public class Xampi extends Actor {

public void boot() throws RemoteCodeE''''''xception { Actor''''''Name a2 = create("osl.examples.xampi.Xampi"); send(a2, "relayPrint", "Hi there"); send(a2, "relayPrint", "Lo there"); }

public void relayPrint(String item) { send(stdout, "println", "Xampi relays "+item); Debug.out.println("Xampi prints "+item); } }


See original on c2.com