de.janrufmonitor.framework.command
Interface ICommand

All Known Subinterfaces:
IConsoleCommand
All Known Implementing Classes:
AbstractCommand, AbstractConfigurableCommand, AbstractConsoleCommand

public interface ICommand

This interface must be implemented by a command component. A command is an executable unit within the framework.

Author:
Thilo Brandt

Method Summary
 void execute()
          This method executes the command.
 String getID()
          Gets e unique ID of this command.
 String getLabel()
          Gets the label of the command.
 Map getParameters()
          Gets the parameters which can be evaluated during execution time.
 boolean isExecutable()
          Checks wether the command is executable or not.
 boolean isExecuting()
          Checks wether the command is currently executing or not.
 void setParameters(Map p)
          Sets the parameters which can be evaluated during execution time.
 

Method Detail

execute

void execute()
             throws Exception
This method executes the command.

Throws:
Exception

isExecutable

boolean isExecutable()
Checks wether the command is executable or not.

Returns:
true if command is executable, false if not

isExecuting

boolean isExecuting()
Checks wether the command is currently executing or not.

Returns:
true if command is currently executing, false if not.

getID

String getID()
Gets e unique ID of this command.

Returns:
a unique ID

getLabel

String getLabel()
Gets the label of the command.

Returns:
a valid label

setParameters

void setParameters(Map p)
Sets the parameters which can be evaluated during execution time. The map contains key value pairs of parameters.

Parameters:
p - a parameter map

getParameters

Map getParameters()
Gets the parameters which can be evaluated during execution time.

Returns:
a valid parameter map.


Copyright © 2010 by Thilo Brandt. All Rights Reserved.