
sets the scene with a purely local application, putting the participating classes Agent and Listener/ListenerImpl to a first use.
The following examples will depart from here, turning it into a variety of client/server structures.

package tw.net.ocs.example;
public class Example1 {
public static void main(String[] args) {
System.out.println("Running Example1: Agent+Listener HERE");
// Create an Agent, pass it a Listener
Agent agent = new Agent(new ListenerImpl());
// ... and let the Agent act
agent.act();
}
}
To run the demo, enter
java -cp ocs-examples.jar tw.net.ocs.example.Example1