ist.palcom.hgraph
Class AbstractListener

java.lang.Object
  extended by ist.palcom.hgraph.AbstractListener
All Implemented Interfaces:
Listener
Direct Known Subclasses:
CompassListener, HgraphBrowserHgraphProxyListener, HgraphBrowserOutListener, HgraphContextListener, LiveViewListener, MirrorOutListener, SwingEngineListener, VizManagerListener

public abstract class AbstractListener
extends java.lang.Object
implements Listener

AbstractListener implements the basic functionality of the Listener interface


Field Summary
protected  IHgraphNode node
           
protected  Path returnPath
           
 
Constructor Summary
AbstractListener(java.lang.String name, java.lang.String description, Path returnPath)
           
 
Method Summary
protected  void callback(java.lang.String command, Value value)
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 Path getReturnPath()
           
 void setNode(IHgraphNode node)
          Sets the node to call back through.
abstract  void trigger(java.lang.String command, Value params, Path callerPath)
          trigger is called everywhen either an event is handled by the node or a triggerable event is called from within the node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

returnPath

protected Path returnPath

node

protected IHgraphNode node
Constructor Detail

AbstractListener

public AbstractListener(java.lang.String name,
                        java.lang.String description,
                        Path returnPath)
Method Detail

setNode

public void setNode(IHgraphNode node)
Description copied from interface: Listener
Sets the node to call back through.

Specified by:
setNode in interface Listener

callback

protected void callback(java.lang.String command,
                        Value value)

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Listener
Returns:
A description of the listener in prose. It should as a minimum describe the commands the listener is listening on and how it reacts on those commands

getName

public java.lang.String getName()
Specified by:
getName in interface Listener
Returns:
The name of the Listener

getReturnPath

public Path getReturnPath()
Specified by:
getReturnPath in interface Listener
Returns:
the path of the recipient node of the triggered events

trigger

public abstract void trigger(java.lang.String command,
                             Value params,
                             Path callerPath)
Description copied from interface: Listener
trigger is called everywhen either an event is handled by the node or a triggerable event is called from within the node

Specified by:
trigger in interface Listener