org.ow2.clif.scenario.isac.engine
Class IsacExtendedEngine

java.lang.Object
  extended by org.ow2.clif.scenario.isac.engine.IsacExtendedEngine
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, ActivityControl, BladeControl

public class IsacExtendedEngine
extends java.lang.Object
implements BladeControl, org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController

This is the main class of the Isac extended engine. Each instance creates a pool of threads to execute jobs (sort of scenario slices), a scheduler to dispatch jobs and apply load profiles, a clock to handle real time (despite possible suspend periods), a timer for periodically updating the load profiles, and an engine supervisor to manage the end of scenario execution.

Author:
Emmanuel Varoquaux, Bruno Dillenseger

Field Summary
 
Fields inherited from interface org.ow2.clif.server.api.BladeControl
BLADE_CONTROL, BLADE_INSERT_CONTROL
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
IsacExtendedEngine()
          The following properties can be set in clif.props : - clif.isac.threads - clif.isac.groupperiod - clif.isac.schedulerperiod - clif.isac.jobdelay Otherwise, use default values.
 
Method Summary
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 void changeParameter(java.lang.String parameter, java.io.Serializable value)
          Sets the parameter parameter of this blade with the value value.
 java.util.Map<java.lang.String,java.lang.String> getCurrentParameters()
          Returns a Map which maps the defined parameters to their values.
 java.lang.String getFcState()
           
 java.lang.String getId()
           
 void init(java.io.Serializable arg)
          Initialize the activity
 void join()
          Waits until the end of the activity
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 void resume()
          Resume the activity (if suspended)
 void setArgument(java.lang.String argument)
          Sets the scenario argument string.
 void setId(java.lang.String id)
          Sets a unique identifier string to this blade
 void start()
          Initial start of the activity
 void startFc()
           
 void stop()
          Final stop of the activity
 void stopFc()
           
 void suspend()
          Suspend the activity
 void unbindFc(java.lang.String clientItfName)
           
 void updatePopulation()
          Called by the timer to update the number of vUsers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsacExtendedEngine

public IsacExtendedEngine()
The following properties can be set in clif.props : - clif.isac.threads - clif.isac.groupperiod - clif.isac.schedulerperiod - clif.isac.jobdelay Otherwise, use default values.

Method Detail

updatePopulation

public void updatePopulation()
Called by the timer to update the number of vUsers.


init

public void init(java.io.Serializable arg)
          throws ClifException
Description copied from interface: ActivityControl
Initialize the activity

Specified by:
init in interface ActivityControl
Parameters:
arg - unused
Throws:
ClifException

start

public void start()
Description copied from interface: ActivityControl
Initial start of the activity

Specified by:
start in interface ActivityControl

stop

public void stop()
Description copied from interface: ActivityControl
Final stop of the activity

Specified by:
stop in interface ActivityControl

suspend

public void suspend()
Description copied from interface: ActivityControl
Suspend the activity

Specified by:
suspend in interface ActivityControl

resume

public void resume()
Description copied from interface: ActivityControl
Resume the activity (if suspended)

Specified by:
resume in interface ActivityControl

join

public void join()
Description copied from interface: ActivityControl
Waits until the end of the activity

Specified by:
join in interface ActivityControl

setArgument

public void setArgument(java.lang.String argument)
                 throws ClifException
Description copied from interface: BladeControl
Sets the scenario argument string.

Specified by:
setArgument in interface BladeControl
Throws:
ClifException

setId

public void setId(java.lang.String id)
Description copied from interface: BladeControl
Sets a unique identifier string to this blade

Specified by:
setId in interface BladeControl

getId

public java.lang.String getId()
Specified by:
getId in interface BladeControl
Returns:
the blade unique identifier

changeParameter

public void changeParameter(java.lang.String parameter,
                            java.io.Serializable value)
                     throws ClifException
Description copied from interface: BladeControl
Sets the parameter parameter of this blade with the value value. This method allows to change parameters independently of the activity of the blade. However, some parameters can depend on the state of the blade.

Specified by:
changeParameter in interface BladeControl
Throws:
ClifException

getCurrentParameters

public java.util.Map<java.lang.String,java.lang.String> getCurrentParameters()
Description copied from interface: BladeControl
Returns a Map which maps the defined parameters to their values.

Specified by:
getCurrentParameters in interface BladeControl

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

getFcState

public java.lang.String getFcState()
Specified by:
getFcState in interface org.objectweb.fractal.api.control.LifeCycleController

startFc

public void startFc()
             throws org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
startFc in interface org.objectweb.fractal.api.control.LifeCycleController
Throws:
org.objectweb.fractal.api.control.IllegalLifeCycleException

stopFc

public void stopFc()
            throws org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
stopFc in interface org.objectweb.fractal.api.control.LifeCycleController
Throws:
org.objectweb.fractal.api.control.IllegalLifeCycleException