ist.palcom.hgraph
Class FuncFunc

java.lang.Object
  extended by ist.palcom.hgraph.FuncFunc

public class FuncFunc
extends java.lang.Object

Functionality for H-Graph nodes. This class provides functionality for holding and maintaining a set of handlers, invokators and listeners. It further facilitates functionality for passing Hgraph Events through the H-Graph


Constructor Summary
FuncFunc(IHgraphNode node)
           
 
Method Summary
 void addHandler(Handler handler, Path callerPath)
          Adds a handler to the node.
 void addInvokator(Invokator invokator, Path callerPath)
          Adds an invokator to the node
 void addListener(Listener listener, Path callerPath)
          Adds a listener to the node
 GenericInvokator getGenericInvokator()
           
 Handler[] getHandlers()
           
 Invokator[] getInvokators()
           
 Listener[] getListeners()
           
 int invoke(Invokator invokator, HgraphEvent event)
          Invokes (a) handler(s) across the h-graph.
 void removeHandler(Handler handler, Path callerPath)
          Removes a handler from the node
 void removeHandler(java.lang.String name, Path callerPath)
           
 void removeInvokator(Invokator invokator, Path callerPath)
          Removes an invokator from the node
 void removeInvokator(java.lang.String name, Path callerPath)
           
 void removeListener(Listener listener, Path callerPath)
          Removes a listener from the node
 void removeListener(java.lang.String name, Path callerPath)
           
 void trigger(java.lang.String command, Value params, Path callerPath)
          Triggers the listeners installed in the local node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FuncFunc

public FuncFunc(IHgraphNode node)
Method Detail

removeListener

public void removeListener(java.lang.String name,
                           Path callerPath)

removeHandler

public void removeHandler(java.lang.String name,
                          Path callerPath)

removeInvokator

public void removeInvokator(java.lang.String name,
                            Path callerPath)

addInvokator

public void addInvokator(Invokator invokator,
                         Path callerPath)
Adds an invokator to the node

Parameters:
invokator -

addListener

public void addListener(Listener listener,
                        Path callerPath)
Adds a listener to the node

See Also:
Listener

removeListener

public void removeListener(Listener listener,
                           Path callerPath)
Removes a listener from the node

Parameters:
listener -
See Also:
Listener

removeInvokator

public void removeInvokator(Invokator invokator,
                            Path callerPath)
Removes an invokator from the node

Parameters:
invokator -
See Also:
Invokator

getGenericInvokator

public GenericInvokator getGenericInvokator()

invoke

public int invoke(Invokator invokator,
                  HgraphEvent event)
Invokes (a) handler(s) across the h-graph. It is the intension, that only locally predefined path dependencies are allowed to invoke. This is difficult to uphold, but is approximated by reqiring the Path parameter to be installed in the local node. The recipient path in the event parameter may be absolute or it may be relative. Relatve paths are designated using ".." and "." following standard convensions

Parameters:
event - The event to invoke the graph with. It holds the recipient path, the command and the parameters
Returns:
an int indicating the status of the method
See Also:
HgraphEvent

trigger

public void trigger(java.lang.String command,
                    Value params,
                    Path callerPath)
Triggers the listeners installed in the local node. They are able to call back through the hgraph


addHandler

public void addHandler(Handler handler,
                       Path callerPath)
Adds a handler to the node.

Parameters:
handler -
See Also:
Handler

removeHandler

public void removeHandler(Handler handler,
                          Path callerPath)
Removes a handler from the node

Parameters:
handler - the Handler to remove.

getHandlers

public Handler[] getHandlers()

getInvokators

public Invokator[] getInvokators()

getListeners

public Listener[] getListeners()