ist.palcom.hgraph
Class HgraphEvent

java.lang.Object
  extended by ist.palcom.collections.Link
      extended by ist.palcom.palcomthreads.Event
          extended by ist.palcom.hgraph.HgraphEvent

public class HgraphEvent
extends Event

HgraphEvents are used for message passing in h-graphs. They consist of a sender path, a recipient path, a message command string and possibly a parameter value


Constructor Summary
HgraphEvent(Path toPath, java.lang.String command)
          Creates a HgraphEvent from a recipient path and a command string
HgraphEvent(Path toPath, java.lang.String command, java.lang.String returnComand)
          Creates a HgraphEvent from a recipient path, a command string and a return command
HgraphEvent(Path toPath, java.lang.String command, java.lang.String returnCommand, Value value)
          Creates a HgraphEvent from a recipient path, a command string, a return comand and a value
HgraphEvent(Path toPath, java.lang.String command, Value value)
          Creates a HgraphEvent from a recipient path, a command string and a value
 
Method Summary
 java.lang.String getCommand()
           
 Path getFromPath()
           
 java.lang.String getReturnCommand()
           
 Path getToPath()
           
 Value getValue()
           
 void setFromPath(Path fromPath)
          Sets the sender path.
 void setToPath(Path toPath)
          Sets the recipient path.
 void setValue(Value value)
          Sets the value parameter of the event.
 
Methods inherited from class ist.palcom.collections.Link
getNext, getPrev
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HgraphEvent

public HgraphEvent(Path toPath,
                   java.lang.String command,
                   Value value)
Creates a HgraphEvent from a recipient path, a command string and a value

Parameters:
toPath -
command -
value -

HgraphEvent

public HgraphEvent(Path toPath,
                   java.lang.String command,
                   java.lang.String returnCommand,
                   Value value)
Creates a HgraphEvent from a recipient path, a command string, a return comand and a value

Parameters:
toPath -
command -
value -

HgraphEvent

public HgraphEvent(Path toPath,
                   java.lang.String command)
Creates a HgraphEvent from a recipient path and a command string

Parameters:
toPath -
command -

HgraphEvent

public HgraphEvent(Path toPath,
                   java.lang.String command,
                   java.lang.String returnComand)
Creates a HgraphEvent from a recipient path, a command string and a return command

Parameters:
toPath -
command -
Method Detail

getCommand

public java.lang.String getCommand()
Returns:
The command of the event

getReturnCommand

public java.lang.String getReturnCommand()
Returns:
The return command of the event. Null if none exists

getFromPath

public Path getFromPath()
Returns:
The path of the sender

getToPath

public Path getToPath()
Returns:
The path of the recpient

setFromPath

public void setFromPath(Path fromPath)
Sets the sender path. This is done as a node is invoked with this event

Parameters:
fromPath -

setToPath

public void setToPath(Path toPath)
Sets the recipient path.

Parameters:
toPath -

getValue

public Value getValue()
Returns:
The value parameter of the event. It may be null

setValue

public void setValue(Value value)
Sets the value parameter of the event. It may be null

Parameters:
value -