org.ow2.clif.server.lib
Class BladeInsertAdapterImpl

java.lang.Object
  extended by org.ow2.clif.server.lib.BladeInsertAdapterImpl
All Implemented Interfaces:
java.lang.Runnable, org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, ActivityControl, BladeControl, BladeInsertResponse

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

Implementation of a Blade Insert Adapter component (kind of an asynchronous wrapper to the Blade Insert component).

Author:
Julien Buret, Nicolas Droze, Bruno Dillenseger

Field Summary
 
Fields inherited from interface org.ow2.clif.server.api.BladeControl
BLADE_CONTROL, BLADE_INSERT_CONTROL
 
Fields inherited from interface org.ow2.clif.server.api.BladeInsertResponse
BLADE_INSERT_RESPONSE
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
BladeInsertAdapterImpl()
           
 
Method Summary
 void aborted()
          Informs that the scenario stopped before completion
 void alarm(AlarmEvent alarm)
          Triggers an alarm event
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
 void changeParameter(java.lang.String parameter, java.io.Serializable value)
          asynchronously changes a parameter of the blade
 void completed()
          Informs that the scenario has successfully completed
 void do_init()
           
protected  void do_resume()
           
 void do_start()
           
protected  void do_stop(boolean initialized)
           
protected  void do_suspend()
           
 java.util.Map getCurrentParameters()
          asynchronously gets parameters of the blade
 java.lang.String getFcState()
           
 java.lang.String getId()
           
 void init(java.io.Serializable testId)
          asynchronously initialize the blade
 void join()
          Waits for the end of the activity
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 void resume()
          asynchronously resumes the blade
 void run()
          handles asynchronous calls on control operations, enforcing mutual exclusion
 void setArgument(java.lang.String argument)
          Sets blade argument.
 void setId(java.lang.String id)
          Sets the blade identifier.
 void start()
          asynchronously starts the blade
 void startFc()
           
 void stop()
          asynchronously stops the blade
 void stopFc()
           
 void suspend()
          asynchronously suspends the blade
 void unbindFc(java.lang.String clientItfName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BladeInsertAdapterImpl

public BladeInsertAdapterImpl()
Method Detail

run

public void run()
handles asynchronous calls on control operations, enforcing mutual exclusion

Specified by:
run in interface java.lang.Runnable

getFcState

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

startFc

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

stopFc

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

lookupFc

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

bindFc

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

unbindFc

public void unbindFc(java.lang.String clientItfName)
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController

listFc

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

setArgument

public void setArgument(java.lang.String argument)
                 throws ClifException
Sets blade argument.

Specified by:
setArgument in interface BladeControl
Throws:
ClifException

setId

public void setId(java.lang.String id)
Sets the blade identifier.

Specified by:
setId in interface BladeControl

getId

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

init

public void init(java.io.Serializable testId)
asynchronously initialize the blade

Specified by:
init in interface ActivityControl
Parameters:
testId - should contain a unique test identifier

do_init

public void do_init()

start

public void start()
asynchronously starts the blade

Specified by:
start in interface ActivityControl

do_start

public void do_start()

stop

public void stop()
asynchronously stops the blade

Specified by:
stop in interface ActivityControl

do_stop

protected void do_stop(boolean initialized)

suspend

public void suspend()
asynchronously suspends the blade

Specified by:
suspend in interface ActivityControl

do_suspend

protected void do_suspend()

resume

public void resume()
asynchronously resumes the blade

Specified by:
resume in interface ActivityControl

do_resume

protected void do_resume()

join

public void join()
Waits for the end of the activity

Specified by:
join in interface ActivityControl

changeParameter

public void changeParameter(java.lang.String parameter,
                            java.io.Serializable value)
                     throws ClifException
asynchronously changes a parameter of the blade

Specified by:
changeParameter in interface BladeControl
Throws:
ClifException

getCurrentParameters

public java.util.Map getCurrentParameters()
asynchronously gets parameters of the blade

Specified by:
getCurrentParameters in interface BladeControl

aborted

public void aborted()
Description copied from interface: BladeInsertResponse
Informs that the scenario stopped before completion

Specified by:
aborted in interface BladeInsertResponse

completed

public void completed()
Description copied from interface: BladeInsertResponse
Informs that the scenario has successfully completed

Specified by:
completed in interface BladeInsertResponse

alarm

public void alarm(AlarmEvent alarm)
Description copied from interface: BladeInsertResponse
Triggers an alarm event

Specified by:
alarm in interface BladeInsertResponse