org.objectweb.dream.pump
Class SynchronizedPeriodicPumpImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.pump.SynchronizedPumpImpl
          extended byorg.objectweb.dream.pump.SynchronizedPeriodicPumpImpl
All Implemented Interfaces:
AttributeController, BindingController, LifeCycleController, Loggable, PeriodicPumpAttributeController, PumpAttributeController

public class SynchronizedPeriodicPumpImpl
extends SynchronizedPumpImpl
implements PeriodicPumpAttributeController

Extention of the basic pump that use a period T (in ms). More precisely, every T ms, a message is pulled on the input and is then pushed on the output. If these two actions (pull then push) are longer than T ms, an other message is pulled immediately.


Field Summary
protected  long period
           
static String PERIOD_INIT_PARAM_NAME
          The initialization parameter that can be passed to this component to specify the pump's period.
 
Fields inherited from class org.objectweb.dream.pump.SynchronizedPumpImpl
inPullItf, mutexItf, outPushItf, pumpTask, pushNullPolicy
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
SynchronizedPeriodicPumpImpl()
          Default constructor
 
Method Summary
 long getPeriod()
          Returns the pump period.
 void setPeriod(long period)
          Sets the pump period.
 
Methods inherited from class org.objectweb.dream.pump.SynchronizedPumpImpl
bindFc, getPushNullPolicy, initComponent, listFc, setPushNullPolicy
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, lookupFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.dream.pump.PumpAttributeController
getPushNullPolicy, setPushNullPolicy
 

Field Detail

PERIOD_INIT_PARAM_NAME

public static final String PERIOD_INIT_PARAM_NAME
The initialization parameter that can be passed to this component to specify the pump's period.

See Also:
Constant Field Values

period

protected long period
Constructor Detail

SynchronizedPeriodicPumpImpl

public SynchronizedPeriodicPumpImpl()
Default constructor

Method Detail

getPeriod

public long getPeriod()
Description copied from interface: PeriodicPumpAttributeController
Returns the pump period.

Specified by:
getPeriod in interface PeriodicPumpAttributeController
Returns:
the pump period.
See Also:
PeriodicPumpAttributeController.getPeriod()

setPeriod

public void setPeriod(long period)
Description copied from interface: PeriodicPumpAttributeController
Sets the pump period.

Specified by:
setPeriod in interface PeriodicPumpAttributeController
Parameters:
period - the pump period.
See Also:
PeriodicPumpAttributeController.setPeriod(long)


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.