Skip navigation links

Package provided.demo

This package contains runnable demos for the project (executable JAR files) -- See the full package description for the demos' operating directions.

See: Description

Package provided.demo Description

This package contains runnable demos for the project (executable JAR files) -- See the full package description for the demos' operating directions.

Note that the JAR files are not listed in the Javadocs. Please go to the actual provided.demo package in the codebase to find them. See the directions below on how to run the demos.

MAKE SURE ALL THE REQUIRED PORTS ON YOUR COMPUTER ARE OPEN FIRST!!

Note that the JAR files do NOT contain any code for any tasks. All tasks are dynamically loaded, where the demos assume that the desired ITask implementation classes all have a public static field called FACTORY that is am ITaskFactory instance that will instantiate that ITask implementation.

Some tasks in the provided code are pre-loaded for your convenience. The demos are capable of loading and executing student-written tasks as well if the task class contains a public static FACTORY field as described above.

The demos should be capable of inter-operating with any student-written client or engine solutions and this can used for testing student solutions.

Student ITask implementations can be written separately from the student client or engine solutions and tested with the demo client and engine (Note that the demo client requires that an ITask be instantiatable by an ITaskFactory and that the ITaskFactory's make() method needs no more than a single String parameter.)

How to Run the Demos:

Starting the demos:

Start a client and an engine on the same or different computers. Note that either client or engine could be a student solution.

Connecting the client to an engine:

  1. On the client, enter the IP address of the engine computer (displayed on the engine GUI).
  2. Click the "Connect" button.
  3. Both the client and the engine will display messages from the other as well as connection status messages.

Testing connectivity:

Executing Tasks

Adding new tasks:

  1. On the client, type in the fully-qualified classname of a desired ITask implementation. The demo client assumes that the desired ITask class has a public static field called "FACTORY" that is the singleton instance of the ITaskFactory for that ITask implementation.
  2. Click the "Add to lists" button and the ITaskFactory will appear on the two drop-lists.

Running a task:

  1. Select the desired task to run from the top drop list.
  2. Type in an appropriate parameter for constructing the task.
  3. Click the "Run Task" button.
  4. Task results will appear on both the client and engine GUI's. The engine will display the raw task results. The client will display the task results as formatted by the task's ITaskResultFormatter object.

Combine tasks:

  1. Select the desired tasks from the top and bottom drop lists.
  2. Click the "Combine Tasks" button.
  3. The combined task will appear on the drop lists. Combined tasks are true binary composite tasks where the composite ("MultiTask") and the composees are all transmitted to the engine for execution as a single task. When the MultiTask runs, it indicates when the individual composees are run.

Quitting the Demos

Both the client and the engine have "Quit" buttons that will gracefully shut down their systems.

Author:
Stephen Wong
Skip navigation links