|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.clif.scenario.multithread.MTScenario
public abstract class MTScenario
Abstract implementation of a multi-thread based scenario component. Method newSession() should be implemented by a derived class in order to provide actual action to be performed. Each session loops on calling its action() method, animated by its own thread. MTscenario must be given an argument line (as a single String) beginning with 3 integer parameters:
newSession(int, String)
,
setArgument(String)
Field Summary | |
---|---|
protected java.lang.String |
scenarioId
|
protected java.io.Serializable |
testId
|
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 | |
---|---|
MTScenario()
|
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 |
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 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 |
startFc()
|
void |
stop()
Final stop of the activity |
void |
stopFc()
|
void |
suspend()
Suspend the activity |
void |
unbindFc(java.lang.String clientItfName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.Serializable testId
protected java.lang.String scenarioId
Constructor Detail |
---|
public MTScenario()
Method Detail |
---|
public abstract MTScenarioSession newSession(int sessionId, java.lang.String arg) throws ClifException
ClifException
public void startFc()
startFc
in interface org.objectweb.fractal.api.control.LifeCycleController
public void stopFc()
stopFc
in interface org.objectweb.fractal.api.control.LifeCycleController
public java.lang.String getFcState()
getFcState
in interface org.objectweb.fractal.api.control.LifeCycleController
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 test
ClifException
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |