public class SupervisorImpl extends java.util.Observable implements TestControl, SupervisorInfo, org.objectweb.fractal.api.control.BindingController
AlarmEvent
,
BladeObservation
Modifier and Type | Field and Description |
---|---|
protected java.io.Serializable |
currentTestId
The current test ID
|
TEST_CONTROL
SUPERVISOR_INFO
Constructor and Description |
---|
SupervisorImpl() |
Modifier and Type | Method and Description |
---|---|
void |
alarm(java.lang.String bladeId,
AlarmEvent alarm)
Forwards the alarm event to observers
|
void |
bindFc(java.lang.String clientItfName,
java.lang.Object serverItf) |
void |
changeParameter(java.lang.String bladeId,
java.lang.String name,
java.io.Serializable value)
Changes a blade parameter value.
|
void |
collect(java.lang.String[] selBladesId,
CollectListener listener)
Collects latest test data for selected blades
|
java.lang.String[] |
getBladesIds()
Get the identifiers of all blades that are currently
under control (i.e.
|
java.util.Map<java.lang.String,java.io.Serializable> |
getCurrentParameters(java.lang.String bladeId)
Gets a Map of blade parameters and their associated values.
|
java.lang.String |
getCurrentTestId()
Retrieves current test identifier.
|
java.util.Map<java.lang.String,ClifDeployDefinition> |
getDefinitions()
Gets current test plan definition
|
BladeState |
getGlobalState(java.lang.String[] selBladesId)
Get global state for some blades.
|
java.lang.String[] |
getStatLabels(java.lang.String bladeId)
Gets labels describing statistics delivered by a blade
|
long[] |
getStats(java.lang.String bladeId)
Retrieve the execution statistics of a blade.
|
void |
init(java.io.Serializable testId)
Initializes a new test for every blade in the deployed test plan.
|
void |
join()
Waits for the end of activity of all blades of currently deployed test plan.
|
void |
join(java.lang.String[] selBladesId)
Waits for the end of execution of a selection of blades
from currently deployed test plan.
|
java.lang.String[] |
listFc() |
java.lang.Object |
lookupFc(java.lang.String clientItfName) |
void |
resume()
Resumes all blades of currently deployed test plan.
|
void |
resume(java.lang.String[] selBladesId)
Resumes a selection of blades from currently deployed test plan.
|
void |
setBladeState(java.lang.String id,
BladeState state)
Inform that the state of a blade has changed.
|
void |
setDefinitions(java.util.Map<java.lang.String,ClifDeployDefinition> definitions)
Sets the test plan definition.
|
void |
start()
Starts all blades of the currently deployed test plan.
|
void |
start(java.lang.String[] selBladesId)
Starts a selection of blades of currently deployed test plan.
|
void |
stop()
Stops all blades of currently deployed test plan.
|
void |
stop(java.lang.String[] selBladesId)
Stops a selection of blades from currently deployed test plan.
|
void |
suspend()
Suspends all blades of currently deployed test plan.
|
void |
suspend(java.lang.String[] selBladesId)
Suspends a selection of blades from currently deployed test plan.
|
void |
unbindFc(java.lang.String clientItfName) |
void |
waitEndOfRun(java.lang.String[] selBladesId)
Wait until blades are stopped, completed or aborted.
|
boolean |
waitForState(java.lang.String[] selBladesId,
BladeState state)
Waits until blades are all in a given state.
|
void |
waitStationaryState(java.lang.String[] selBladesId)
Waits until blades are all in a stationary state.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObserver, deleteObservers
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 java.lang.String[] getBladesIds()
getBladesIds
in interface TestControl
public long[] getStats(java.lang.String bladeId)
getStats
in interface TestControl
bladeId
- The blade identifier to get the statistics fromgetStatLabels(String)
public java.lang.String[] getStatLabels(java.lang.String bladeId)
getStatLabels
in interface TestControl
bladeId
- the blade identifiergetStats(String)
public java.util.Map<java.lang.String,java.io.Serializable> getCurrentParameters(java.lang.String bladeId)
getCurrentParameters
in interface TestControl
bladeId
- the blade identifierpublic void changeParameter(java.lang.String bladeId, java.lang.String name, java.io.Serializable value) throws ClifException
changeParameter
in interface TestControl
bladeId
- the blade identifiername
- the parameter namevalue
- the new parameter valueClifException
public void collect(java.lang.String[] selBladesId, CollectListener listener)
collect
in interface TestControl
selBladesId
- selected blades identifiers as a String[]listener
- the listener receives progress
information and it is given the opportunity to
cancel the collection. Ignored if null.public void init(java.io.Serializable testId) throws ClifException
setDefinitions(Map)
must be called before to test
the currently deployed test plan definition.init
in interface ActivityControl
testId
- the new test's nameClifException
public void start()
start
in interface ActivityControl
public void start(java.lang.String[] selBladesId)
start
in interface TestControl
selBladesId
- identifiers of blades to be started,
or null for starting all blades.public void stop()
stop
in interface ActivityControl
public void stop(java.lang.String[] selBladesId)
stop
in interface TestControl
selBladesId
- array of target blades identifiers,
or null for designating all bladespublic void suspend()
suspend
in interface ActivityControl
public void suspend(java.lang.String[] selBladesId)
suspend
in interface TestControl
selBladesId
- array of target blades identifiers,
or null for designating all bladespublic void resume()
resume
in interface ActivityControl
public void resume(java.lang.String[] selBladesId)
resume
in interface TestControl
selBladesId
- array of target blades identifiers,
or null for designating all bladespublic void join()
join
in interface ActivityControl
public void join(java.lang.String[] selBladesId)
join
in interface TestControl
selBladesId
- array of target blades identifiers,
or null for designating all bladespublic void alarm(java.lang.String bladeId, AlarmEvent alarm)
alarm
in interface SupervisorInfo
bladeId
- blade identifier of the event sourcealarm
- alarm eventpublic void setBladeState(java.lang.String id, BladeState state)
setBladeState
in interface SupervisorInfo
id
- the globally unique blade identifierstate
- The new state of the bladepublic void waitStationaryState(java.lang.String[] selBladesId) throws java.lang.InterruptedException
waitStationaryState
in interface SupervisorInfo
selBladesId
- array of identifiers of target blades,
or null for designating all blades of currently deployed test plan.java.lang.InterruptedException
public boolean waitForState(java.lang.String[] selBladesId, BladeState state) throws java.lang.InterruptedException
waitForState
in interface SupervisorInfo
selBladesId
- array of identifiers of target blades,
or null for designating all blades of currently deployed test plan.state
- the requested blade statejava.lang.InterruptedException
public BladeState getGlobalState(java.lang.String[] selBladesId)
getGlobalState
in interface SupervisorInfo
selBladesId
- identifiers of target blades,
or null for designating all bladespublic void waitEndOfRun(java.lang.String[] selBladesId) throws java.lang.InterruptedException
waitEndOfRun
in interface SupervisorInfo
selBladesId
- identifiers of target blades,
or null for designating all bladesjava.lang.InterruptedException
public void setDefinitions(java.util.Map<java.lang.String,ClifDeployDefinition> definitions)
init(Serializable)
.setDefinitions
in interface SupervisorInfo
public java.util.Map<java.lang.String,ClifDeployDefinition> getDefinitions()
getDefinitions
in interface SupervisorInfo
public java.lang.String getCurrentTestId()
getCurrentTestId
in interface TestControl