public abstract class MTScenario extends java.lang.Object implements BladeControl, org.objectweb.fractal.api.control.BindingController
newSession(int, String)
,
setArgument(String)
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
scenarioId |
protected java.io.Serializable |
testId |
BLADE_CONTROL, BLADE_INSERT_CONTROL
Constructor and Description |
---|
MTScenario() |
Modifier and Type | Method and Description |
---|---|
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 |
getCurrentParameters()
Returns a
Map which maps the defined parameters to their values. |
java.lang.String |
getId() |
void |
init(java.io.Serializable testId)
initializes a new test, creating and starting the given number of activity threads,
and returns as soon as every thread has been actually started
|
void |
join()
Waits until the end of the activity
|
java.lang.String[] |
listFc() |
java.lang.Object |
lookupFc(java.lang.String clientItfName) |
abstract MTScenarioSession |
newSession(int sessionId,
java.lang.String arg) |
void |
resume()
Resume the activity (if suspended)
|
void |
setArgument(java.lang.String arg)
Sets number of threads and test duration parameters
|
void |
setId(java.lang.String id)
Sets this scenario's unique identifier
|
void |
start()
releases every activity thread
|
void |
stop()
Final stop of the activity
|
void |
suspend()
Suspend the activity
|
void |
unbindFc(java.lang.String clientItfName) |
protected java.io.Serializable testId
protected java.lang.String scenarioId
public abstract MTScenarioSession newSession(int sessionId, java.lang.String arg) throws ClifException
ClifException
public java.lang.Object lookupFc(java.lang.String clientItfName)
lookupFc
in interface org.objectweb.fractal.api.control.BindingController
public void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
bindFc
in interface org.objectweb.fractal.api.control.BindingController
public void unbindFc(java.lang.String clientItfName)
unbindFc
in interface org.objectweb.fractal.api.control.BindingController
public java.lang.String[] listFc()
listFc
in interface org.objectweb.fractal.api.control.BindingController
public void init(java.io.Serializable testId) throws ClifException
init
in interface ActivityControl
testId
- unique identifier of the new testClifException
public void start()
start
in interface ActivityControl
public void stop()
ActivityControl
stop
in interface ActivityControl
public void suspend()
ActivityControl
suspend
in interface ActivityControl
public void resume()
ActivityControl
resume
in interface ActivityControl
public void join()
ActivityControl
join
in interface ActivityControl
public void setArgument(java.lang.String arg)
setArgument
in interface BladeControl
arg
- should begin with 2 integer parameters (separated with usual separators) setting
(1) the number of threads and (2) the test duration (in seconds). The trailing String will
be used as an argument when creating sessions.newSession(int, String)
public void setId(java.lang.String id)
setId
in interface BladeControl
public java.lang.String getId()
getId
in interface BladeControl
public void changeParameter(java.lang.String parameter, java.io.Serializable value) throws ClifException
BladeControl
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.changeParameter
in interface BladeControl
ClifException
public java.util.Map getCurrentParameters()
BladeControl
Map
which maps the defined parameters to their values.getCurrentParameters
in interface BladeControl