Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  - `cleanall [tout]`: Cleans out the whole DRM collective, removing all agents from each node. Each node will spend the given timeout (in milliseconds) offline, making sure that each agent is killed. The longer this interval, the higher the chance that the DRM will be cleaned out. Default value is 10000 (=10 sec). This default is used if the given number is negative or cannot be parsed, or if no number is given.
  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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD