Usage
-----

* Ensure your environment is set up properly so that jaco is included in the path

  e.g.:
  > setenv PATH ~/JacORB/bin:$PATH (csh)

  > export PATH=~/JacORB/bin:$PATH (sh)

* Start the Naming Service

  refer to the documentation how to configure the naming service
  properly so that it can be accessed via ORB.resolve_initial_references("NameService")

* Start the Notification Service

  you have to configure your jacorb_properties file so that the Notification Service can
  be accessed via a call to resolve_initial_references("NotificationService").
  There are two simple ways to accomplish this.

  - write the IOR to a file

	start the NotificationService with the option -writeIOR <filename>

	e.g.:
	> cd $JACORB_HOME/bin
	> ntfy -writeIOR /tmp/notification.ior

	add a ORBInitRef entry to your jacorb_properties that points to the same file:

	e.g.:
	ORBInitRef.NotificationService=file:/tmp/notification.ior

  - start the Notification Service on a fixed port

	e.g.:
	> cd $JACORB_HOME/bin
	> ntfy -port 9102 -printCorbaloc

	the option -port <portno> tries to start the notification
	service on the specified port. The option -printCorbaloc
	prints the resulting corbaloc reference to the console.

	This should print a string similiar to
	corbaloc::<your-host>:<your-port>/NotificationService

	where <your-host> is the IP address or hostname of your
	computer and <your-port> is
	the port you specified with the -port option.

	put this string into your jacorb_properties file

	e.g.:
	ORBInitRef.NotificationService=corbaloc::192.168.1.1:9102/NotificationService

* Start the Whiteboard Factory

  > cd $JACORB_HOME/demo/notification/whiteboard
  > jaco org.jacorb.demo.notification.whiteboard.WhiteBoardFactory

  The whiteboard factory uses ORB.resolve_initial_references("NotificationService") to
  access the NotificationService (see above).
  Alternatively you can specify the Reference to the Notification Service as a parameter

  e.g.:
  > cd $JACORB_HOME/demo/notification/whiteboard
  > jaco org.jacorb.demo.notification.whiteboard.WhiteBoardFactory corbaloc::192.168.1.1:32861/NotificationService

  The Whiteboard Factory registers itself with the Naming Service.

* Start Workgroup

  > cd $JACORB_HOME/demo/notification/whiteboard
  > jaco org.jacorb.demo.notification.whiteboard.Workgroup

  the workgroup accesses the Whiteboard Factory via the NamingService.
  You can draw in the Window by pushing the mouse button, dragging the
  mouse and releasing the button again.
  If you select the Delete Button you can overpaint parts of your
  drawing with black colour again. If you press Clear
  the whole Drawing Area will be erased.
  If you want to join a Remote Whiteboard select Menu->Select. You'll
  see the list of available whiteboards.
  As no Whiteboard will be available yet, just type in some Name and
  select Join. The Whiteboard will be created.

  Now start one (or more) Workgroup and join the Whiteboard you've created.
  What you draw in one Window will be sent to the other Window and displayed there too.

Implementation Notes
--------------------

For each Workgroup that joins a Whiteboard a new
Consumer-/SupplierAdmin Pair is created and returned to the
Workgroup. An unique Identifier is created and supplied to each
Workgroup.

The Workgroup publishes two Kinds of Events:

* LineEvent. This Event contains Informations over a single Line: you
  have startpoint (x0, y0), endpoint (x1, y1), colour (r, g, b),
  brushsize.

* ClearEvent. This Event contains no Data.

The Events are wrapped in a StructuredEvent. The Workgroup Id is put
in the Filterable Headers of the StructuredEvent. This is necessary
because the Whiteboard preconfigures the ConsumerAdmin used by each
Workgroup not to forward Events which derived from the connected
Workgroup.

(e.g. $.header.variable_header(WORKGROUP_ID) != 1)

The Workgroup creates a StructuredProxyPushConsumer and uses it to send Events as they occur.

Besides that, the Workgroup creates two StructuredProxyPushSuppliers
and connects them to its DrawHandler
and ClearHandler. The PushSuppliers are configured with a Filter to
just supply LineEvents or ClearEvents
respectively. This Way the DrawHandler just receives LineEvents and
the ClearHandler just receives ClearEvents.
On Repetition of an Event both Handlers act accordingly.
