gumbo.util.route
Class DebugEventMonitor

java.lang.Object
  |
  +--gumbo.util.route.DebugEventMonitor
Direct Known Subclasses:
DebugActionGroupAdapter, DebugActionSingleAdapter, DebugButtonTrigger, DebugClickAdapter, DebugControlAdapter, DebugInputFacade, DebugKeyboardSensor, DebugMouseSensor, DebugPickAdapter, DebugPickClickAdapter, DebugPickClientId, DebugPickMapper, DebugPickSensor, DebugSelectFacade

public abstract class DebugEventMonitor
extends java.lang.Object

Abstract base class for a host object event monitor. This monitor (the slave) prints out a message when an event node in a target host object (the master) sends or receives an event.

To enable event reporting, include the follwoing VM arguments. Note that only one debug connection is allowed to a given event node at a time.
-Ddebug.enabled=true -Ddebug.tags=name

Implementors must include a delegate event node for each one in the monitored target object, which prints a debug message. For example
private BooleanField.EventIn _overIn = new BooleanField.EventIn() { protected void process() { Debug.println(getName(), getName() + ": overIn=" + get()); } };

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
DebugEventMonitor(java.lang.String name)
          Creates an instance.
 
Method Summary
 DebugEventMonitor connectTarget(java.lang.Object host)
          Called by the system and clients to connect this monitor to the target host whether or not monitoring is enabled (connection established unconditionally).
 DebugEventMonitor connectTargetMaybe(java.lang.Object host)
          Called by the system and clients to connect this monitor to the target host, but only if debug is enabled and this monitor's name tag is set (connection established conditionally).
 java.lang.String getName()
          Gets the name and debug tag for this monitor.
protected abstract  void implConnectTarget(java.lang.Object host)
          Called by the system to connect this monitor to the target host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugEventMonitor

public DebugEventMonitor(java.lang.String name)
Creates an instance. Use connect???() to connect this monitor to a target host object.

Parameters:
name - Name and debug tag. Never null.
Method Detail

getName

public java.lang.String getName()
Gets the name and debug tag for this monitor.

Returns:
Name and debug tag. never null.

connectTarget

public final DebugEventMonitor connectTarget(java.lang.Object host)
Called by the system and clients to connect this monitor to the target host whether or not monitoring is enabled (connection established unconditionally).

Parameters:
host - Reference to the debug target (master). Never null.
Returns:
This object. Never null.

connectTargetMaybe

public final DebugEventMonitor connectTargetMaybe(java.lang.Object host)
Called by the system and clients to connect this monitor to the target host, but only if debug is enabled and this monitor's name tag is set (connection established conditionally).

Parameters:
host - Reference to the debug target (master). Never null.
Returns:
This object. Never null.

implConnectTarget

protected abstract void implConnectTarget(java.lang.Object host)
Called by the system to connect this monitor to the target host. Implementors can assume that conditional connection has been resolved.

Parameters:
host - Reference to the debug target (master). Never null.