ist.palcom.hgraph
Interface Handler

All Known Implementing Classes:
AbstractHandler, CompassCallbackHandler, CompassHandler, FuncHandler, HgraphBrowserHgraphProxyHandler, HgraphBrowserInHandler, HgraphBrowserOutHandler, HgraphManagerQueryHandler, HgraphManagerReturnHandler, HgraphProxyHandler, LiveViewHandler, MirrorInHandler, MirrorOutHandler, NodeHandler, NodeHgraphProxyHandler, PrintHandler, SwingEngineHandler, ValueHandler, VizManagerCallbackHandler

public interface Handler

A Handler is the Hgraph functional equivalent to a provided method. Handlers are invoked through the structure of the Hgraph. They are invoked with a single parameter, an Hgraph event, holding the sender and recipient paths, a command string for the handler to act upon and possibly a value. This value may be simple or complex Handlers can handle multiple different commands


Method Summary
 java.lang.String getDescription()
           
 Value[] getLast(int numEvents)
           
 java.util.Iterator getLogIterator()
           
 java.lang.String getName()
           
 Signature[] getSignatures()
           
 void handle(HgraphEvent event)
          The handle method is invoked by the HgraphNode in which the handler is installed.
 

Method Detail

handle

void handle(HgraphEvent event)
The handle method is invoked by the HgraphNode in which the handler is installed. This happens once the node receives an event for which it is the designatee. The handler may freely switch on the command string of the event and act accordingly


getName

java.lang.String getName()
Returns:
The name of the handler.

getDescription

java.lang.String getDescription()
Returns:
A description of the purpose of the handler in prose. It should as a minimum describe the commands the handler is able to handle and the effects of it handling those

getSignatures

Signature[] getSignatures()
Returns:
The signatures of the commands handled by the handler

getLast

Value[] getLast(int numEvents)

getLogIterator

java.util.Iterator getLogIterator()