ist.palcom.hgraph
Class NodeHandler

java.lang.Object
  extended by ist.palcom.hgraph.AbstractHandler
      extended by ist.palcom.hgraph.NodeHandler
All Implemented Interfaces:
Handler

public class NodeHandler
extends AbstractHandler

NodeHandler handles the basic node commands related to children and naming


Field Summary
static java.lang.String CMD_ADDCHILD
          Command for adding a child to the node
static java.lang.String CMD_HASCHILD
          Command for cheching whether the node has a child with a certain name
static java.lang.String CMD_NEWCHILD
          Command for creating and adding a new child to the node
static java.lang.String CMD_REMOVECHILD
          Command for removing a specific child from the node
static java.lang.String CMD_SETNAME
          Command for setting the name of the node.
static java.lang.String CMD_SETPARENT
          Command for setting the parent of the node
static java.lang.String description
           
static java.lang.String name
           
 
Fields inherited from class ist.palcom.hgraph.AbstractHandler
DEFAULT_NUM_LOGS
 
Constructor Summary
NodeHandler(HgraphNode node)
           
 
Method Summary
 Signature[] getSignatures()
           
 void handle(HgraphEvent event)
          The handle method is invoked by the HgraphNode in which the handler is installed.
 
Methods inherited from class ist.palcom.hgraph.AbstractHandler
getDescription, getLast, getLogIterator, getName, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public static final java.lang.String name
See Also:
Constant Field Values

description

public static final java.lang.String description
See Also:
Constant Field Values

CMD_SETNAME

public static final java.lang.String CMD_SETNAME
Command for setting the name of the node.

See Also:
Constant Field Values

CMD_REMOVECHILD

public static final java.lang.String CMD_REMOVECHILD
Command for removing a specific child from the node

See Also:
Constant Field Values

CMD_HASCHILD

public static final java.lang.String CMD_HASCHILD
Command for cheching whether the node has a child with a certain name

See Also:
Constant Field Values

CMD_NEWCHILD

public static final java.lang.String CMD_NEWCHILD
Command for creating and adding a new child to the node

See Also:
Constant Field Values

CMD_ADDCHILD

public static final java.lang.String CMD_ADDCHILD
Command for adding a child to the node

See Also:
Constant Field Values

CMD_SETPARENT

public static final java.lang.String CMD_SETPARENT
Command for setting the parent of the node

See Also:
Constant Field Values
Constructor Detail

NodeHandler

public NodeHandler(HgraphNode node)
Method Detail

getSignatures

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

handle

public void handle(HgraphEvent event)
Description copied from interface: Handler
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

Specified by:
handle in interface Handler
Overrides:
handle in class AbstractHandler
See Also:
Handler