org.almendra.janet.ade.commands
Class ExecuteWorkloadBalancingCommand

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

public class ExecuteWorkloadBalancingCommand
extends ExecuteWorkloadCommand
implements ICommand, ICommandHolder

See Also:
Serialized Form

Field Summary
protected  IWorkLoadBalancingCommand command
           
static java.lang.String QualifiedName
           
protected  IWorkLoadBalancingInterpreter suspendableInterpreter
           
 
Fields inherited from class org.almendra.janet.ade.commands.ExecuteWorkloadCommand
capabilityPath, currentEnvelope, isMustAccept
 
Fields inherited from class org.almendra.janet.ade.commands.ExecutorAnchorCommand
anchor
 
Fields inherited from interface org.almendra.janet.cas.scheduling.ICommand
ApplicationMaxPriority, ApplicationMinPriority, InterruptPriority, SystemPriority
 
Constructor Summary
ExecuteWorkloadBalancingCommand()
          Creates a new ExecuteWorkloadBalancingCommand object.
ExecuteWorkloadBalancingCommand(IWorkLoadBalancingCommand command, java.lang.String capabilityPath)
          Creates a new ExecuteWorkloadBalancingCommand object.
 
Method Summary
 java.lang.Object clone()
          Make sure the user can rely on a command to be cloneable.
 IWorkLoadBalancingCommand getBalancingCommand()
           
 ICommand getCommand()
           
 IInterpreter getInterpreter()
           
 java.lang.String getLogEventName()
           
 java.lang.String getLogTypeName()
           
 int getPriority()
          Answer the priority of the command.
 java.lang.String getQualifiedCapabilityPath()
           
 java.lang.String getQualifiedName()
          Answer the fully qualified name of the command, e.g. package and class name.
 IWorkLoadBalancingInterpreter getSuspendableInterpreter()
           
 void prepareBeforeSending()
           
 void resume()
           
 void setSuspendableInterpreter(IWorkLoadBalancingInterpreter suspendableInterpreter)
           
 void suspend()
           
 java.lang.String toLogString()
          Return a string printing a command onto a string used for logging.
 void workloadCommandArrived(ExecutorAnchor anchor, CommandEnvelope env, java.lang.String capabilityPath)
           
 
Methods inherited from class org.almendra.janet.ade.commands.ExecuteWorkloadCommand
getCapabilityPath, getCurrentEnvelope, isMustAccept, setCurrentEnvelope, setMustAccept
 
Methods inherited from class org.almendra.janet.ade.commands.ExecutorAnchorCommand
getAnchor, setAnchor
 
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

command

protected IWorkLoadBalancingCommand command

suspendableInterpreter

protected IWorkLoadBalancingInterpreter suspendableInterpreter
Constructor Detail

ExecuteWorkloadBalancingCommand

public ExecuteWorkloadBalancingCommand()
Creates a new ExecuteWorkloadBalancingCommand object.


ExecuteWorkloadBalancingCommand

public ExecuteWorkloadBalancingCommand(IWorkLoadBalancingCommand command,
                                       java.lang.String capabilityPath)
Creates a new ExecuteWorkloadBalancingCommand 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:

getBalancingCommand

public IWorkLoadBalancingCommand getBalancingCommand()
Returns:
Returns the command.

getCommand

public ICommand getCommand()
Specified by:
getCommand in interface ICommandHolder
Specified by:
getCommand in class ExecuteWorkloadCommand
Returns:
Returns the command.

getQualifiedCapabilityPath

public java.lang.String getQualifiedCapabilityPath()
Returns:
Returns the capabilityPath.

getSuspendableInterpreter

public IWorkLoadBalancingInterpreter getSuspendableInterpreter()
Returns:
Returns the suspendableInterpreter.

setSuspendableInterpreter

public void setSuspendableInterpreter(IWorkLoadBalancingInterpreter suspendableInterpreter)
Parameters:
suspendableInterpreter - The suspendableInterpreter to set.

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 ExecutorAnchorCommand
Returns:
Throws:
java.lang.CloneNotSupportedException

suspend

public void suspend()

resume

public void resume()

getLogEventName

public java.lang.String getLogEventName()
Specified by:
getLogEventName in class ExecuteWorkloadCommand
Returns:

getLogTypeName

public java.lang.String getLogTypeName()
Specified by:
getLogTypeName in class ExecuteWorkloadCommand
Returns:

getInterpreter

public IInterpreter getInterpreter()
Specified by:
getInterpreter in class ExecuteWorkloadCommand
Returns:

workloadCommandArrived

public void workloadCommandArrived(ExecutorAnchor anchor,
                                   CommandEnvelope env,
                                   java.lang.String capabilityPath)
Specified by:
workloadCommandArrived in class ExecuteWorkloadCommand

prepareBeforeSending

public void prepareBeforeSending()
Specified by:
prepareBeforeSending in class ExecuteWorkloadCommand