drm.core
Class NodeCommand

java.lang.Object
  |
  +--drm.core.NodeCommand
All Implemented Interfaces:
java.io.Serializable

public class NodeCommand
extends java.lang.Object
implements java.io.Serializable

Contains a command to be executed on a Node. The commands database in the DRM collective contains objects of this type. It implements equals and hashCode to allow correct command management.

See Also:
Serialized Form

Field Summary
static byte CLEANALL
           
 
Constructor Summary
NodeCommand(java.lang.String command)
          Creates a command object by parsing the given string.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the object is a NodeCommand and describes the same command invocation event.
 int hashCode()
          hash consistent with equals
 java.lang.String toString()
          Returns a string representation of the same format expected by the constructor.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLEANALL

public static final byte CLEANALL
Constructor Detail

NodeCommand

public NodeCommand(java.lang.String command)
Creates a command object by parsing the given string. Currently known commands are the following:
Throws:
java.lang.IllegalArgumentException - if the given command cannot be parsed for any reason.
Method Detail

equals

public boolean equals(java.lang.Object o)
Returns true if the object is a NodeCommand and describes the same command invocation event. That is, if the object describes the same command invoked by the same entity at the same time.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
hash consistent with equals
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of the same format expected by the constructor.
Overrides:
toString in class java.lang.Object