org.objectweb.dream.pump
Class PumpPeriodicSynchronizedImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.pump.AbstractPumpSynchronizedImpl
          extended by org.objectweb.dream.pump.PumpPeriodicSynchronizedImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, PumpAttributeController, PumpAttributeControllerPeriodic, AttributeController, BindingController, LifeCycleController

public class PumpPeriodicSynchronizedImpl
extends AbstractPumpSynchronizedImpl
implements PumpAttributeControllerPeriodic

Implementation of a periodic pump: 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.

See Also:
AbstractPumpSynchronizedImpl

Field Summary
protected  long period
           
 
Fields inherited from class org.objectweb.dream.pump.AbstractPumpSynchronizedImpl
inPullItf, messageManagerItf, mutexItf, outPushItf, pumpTask, pushNullPolicy, stopOnPullExceptionPolicy, stopOnPushExceptionPolicy
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
PumpPeriodicSynchronizedImpl()
           
 
Method Summary
protected  void beforeFirstStart(Component componentItf)
           
 long getPeriod()
          Returns the pump period.
 void setPeriod(long period)
          Sets the pump period.
 
Methods inherited from class org.objectweb.dream.pump.AbstractPumpSynchronizedImpl
bindFc, getPushNullPolicy, getStopOnPullExceptionPolicy, getStopOnPushExceptionPolicy, handlePullException, handlePushException, listFc, setPushNullPolicy, setStopOnPullExceptionPolicy, setStopOnPushExceptionPolicy
 
Methods inherited from class org.objectweb.dream.AbstractComponent
bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, 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, getStopOnPullExceptionPolicy, getStopOnPushExceptionPolicy, setPushNullPolicy, setStopOnPullExceptionPolicy, setStopOnPushExceptionPolicy
 

Field Detail

period

protected long period
Constructor Detail

PumpPeriodicSynchronizedImpl

public PumpPeriodicSynchronizedImpl()
Method Detail

getPeriod

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

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

setPeriod

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

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

beforeFirstStart

protected void beforeFirstStart(Component componentItf)
                         throws IllegalLifeCycleException
Overrides:
beforeFirstStart in class AbstractComponent
Throws:
IllegalLifeCycleException
See Also:
AbstractComponent.beforeFirstStart(Component)


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