org.hawk.module.config
Class HawkConfig

java.lang.Object
  extended by org.hawk.module.config.HawkConfig
All Implemented Interfaces:
java.lang.Comparable

public class HawkConfig
extends java.lang.Object
implements java.lang.Comparable

This class represents the configuration defined in hawk property file.

See Also:
HawkConfigManager

Field Summary
 long duration
          Total duration of hawk.
 int iteration
          This determines how many times the module is to be executed.
 long iterationThinkTime
          This indicates how much time hawk to sleep between iteration.
 int runnable
          A switch for the user to control running of a module.
 int sequence
          sequence of the module that defines its execution order.
 long thinkTime
          Hawk will sleep this much time after one complete cycle.
 
Constructor Summary
HawkConfig()
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String fetchConfig(java.lang.String annotation, java.lang.Class configClazz, java.lang.Object defaultValue)
           
 long getDuration()
           
 int getIteration()
           
 long getIterationThinkTime()
           
 java.lang.String getModuleName()
           
 int getRunnable()
           
 int getSequence()
           
 long getThinkTime()
           
 void setDuration(long duration)
           
 void setIteration(int iteration)
           
 void setIterationThinkTime(long iterationThinkTime)
           
 void setModuleName(java.lang.String moduleName)
           
 void setRunnable(int runnable)
           
 void setSequence(int sequence)
           
 void setThinkTime(long thinkTime)
           
 boolean shouldRun()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sequence

public int sequence
sequence of the module that defines its execution order.


iteration

public int iteration
This determines how many times the module is to be executed.


iterationThinkTime

public long iterationThinkTime
This indicates how much time hawk to sleep between iteration.


thinkTime

public long thinkTime
Hawk will sleep this much time after one complete cycle.


runnable

public int runnable
A switch for the user to control running of a module.


duration

public long duration
Total duration of hawk.

Constructor Detail

HawkConfig

public HawkConfig()
Method Detail

getDuration

public long getDuration()

setDuration

public void setDuration(long duration)

getModuleName

public java.lang.String getModuleName()

setModuleName

public void setModuleName(java.lang.String moduleName)

getRunnable

public int getRunnable()

setRunnable

public void setRunnable(int runnable)

shouldRun

public boolean shouldRun()

getIteration

public int getIteration()

setIteration

public void setIteration(int iteration)

getIterationThinkTime

public long getIterationThinkTime()

setIterationThinkTime

public void setIterationThinkTime(long iterationThinkTime)

getSequence

public int getSequence()

setSequence

public void setSequence(int sequence)

getThinkTime

public long getThinkTime()

setThinkTime

public void setThinkTime(long thinkTime)

fetchConfig

public java.lang.String fetchConfig(java.lang.String annotation,
                                    java.lang.Class configClazz,
                                    java.lang.Object defaultValue)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable