org.almendra.janet.ade.commands
Class NotifyCPULoadChangedCommand

java.lang.Object
  extended by org.almendra.janet.ade.commands.NotifyCPULoadChangedCommand
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ICommand

public class NotifyCPULoadChangedCommand
extends java.lang.Object
implements ICommand, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int change
           
static int CPULoadAboveThreshold
           
static int CPULoadBelowThreshold
           
static int CPULoadSignificantChange
           
protected  int currentNonJanetCPULoad
           
protected  int previousNonJanetCPULoad
           
static java.lang.String QualifiedName
           
protected  java.lang.String workstationName
           
 
Fields inherited from interface org.almendra.janet.cas.scheduling.ICommand
ApplicationMaxPriority, ApplicationMinPriority, InterruptPriority, SystemPriority
 
Constructor Summary
protected NotifyCPULoadChangedCommand()
          Creates a new NotifyCPULoadChangedCommand object.
  NotifyCPULoadChangedCommand(java.lang.String workstationName, int previousNonJanetCPULoad, int currentNonJanetCPULoad, int cpuLoadAboveOrBelow)
          Creates a new NotifyCPULoadChangedCommand object.
 
Method Summary
 java.lang.Object clone()
          Make sure the user can rely on a command to be cloneable.
 int getChange()
           
 int getCurrentNonJanetCPULoad()
           
 int getPreviousNonJanetCPULoad()
           
 int getPriority()
          Answer the priority of the command.
 java.lang.String getQualifiedName()
          Answer the fully qualified name of the command, e.g. package and class name.
 java.lang.String getWorkstationName()
           
 java.lang.String toLogString()
          Return a string printing a command onto a string used for logging.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QualifiedName

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

CPULoadAboveThreshold

public static final int CPULoadAboveThreshold
See Also:
Constant Field Values

CPULoadBelowThreshold

public static final int CPULoadBelowThreshold
See Also:
Constant Field Values

CPULoadSignificantChange

public static final int CPULoadSignificantChange
See Also:
Constant Field Values

previousNonJanetCPULoad

protected int previousNonJanetCPULoad

currentNonJanetCPULoad

protected int currentNonJanetCPULoad

workstationName

protected java.lang.String workstationName

change

protected int change
Constructor Detail

NotifyCPULoadChangedCommand

protected NotifyCPULoadChangedCommand()
Creates a new NotifyCPULoadChangedCommand object.


NotifyCPULoadChangedCommand

public NotifyCPULoadChangedCommand(java.lang.String workstationName,
                                   int previousNonJanetCPULoad,
                                   int currentNonJanetCPULoad,
                                   int cpuLoadAboveOrBelow)
Creates a new NotifyCPULoadChangedCommand object.

Method Detail

getQualifiedName

public java.lang.String getQualifiedName()
Description copied from interface: ICommand
Answer the fully qualified name of the command, e.g. package and class name.

Specified by:
getQualifiedName in interface ICommand
Returns:

getPriority

public int getPriority()
Description copied from interface: ICommand
Answer the priority of the command.

Specified by:
getPriority in interface ICommand
Returns:

toLogString

public java.lang.String toLogString()
Description copied from interface: ICommand
Return a string printing a command onto a string used for logging.

Specified by:
toLogString in interface ICommand
Returns:

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: ICommand
Make sure the user can rely on a command to be cloneable. Needed by the system to clone commands in simulated mode which is necessary so that every agent receives a command with a pointer of its own which is the case in distributed mode anyway.

Specified by:
clone in interface ICommand
Overrides:
clone in class java.lang.Object
Returns:
Throws:
java.lang.CloneNotSupportedException

getWorkstationName

public java.lang.String getWorkstationName()
Returns:
Returns the workstationName.

getCurrentNonJanetCPULoad

public int getCurrentNonJanetCPULoad()
Returns:
Returns the currentNonJanetCPULoad.

getPreviousNonJanetCPULoad

public int getPreviousNonJanetCPULoad()
Returns:
Returns the previousNonJanetCPULoad.

getChange

public int getChange()
Returns:
Returns the change.