org.objectweb.dream.pump
Class PumpSynchronizedImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.pump.PumpSynchronizedImpl
All Implemented Interfaces:
ActiveComponentAttributeController, AttributeController, BindingController, LifeCycleController, Loggable, PumpAttributeController
Direct Known Subclasses:
PumpPeriodicSynchronizedImpl

public class PumpSynchronizedImpl
extends AbstractComponent
implements PumpAttributeController, ActiveComponentAttributeController

Synchronized implementation of a Pull/Push pump. This component has an optional Mutexclient interface that it uses to synchronize the execution of its run method with other components.


Field Summary
protected  int initialCapacity
           
protected  int initialNumberOfThreads
           
protected  Pull inPullItf
          The server interface to which this component is bound.
protected  Mutex mutexItf
          The server interface to which this component is bound.
protected  Push outPushItf
          The server interface to which this component is bound.
protected  Task pumpTask
           
protected  boolean pushNullPolicy
           
protected  boolean usePool
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
PumpSynchronizedImpl()
           
 
Method Summary
protected  void beforeFirstStart(Component componentItf)
           
 void bindFc(String clientItfName, Object serverItf)
           
 int getInitialCapacity()
           
 int getInitialNumberOfThreads()
           
 boolean getPushNullPolicy()
          Returns the PushNullPolicy.
 boolean getUsePool()
           
 String[] listFc()
           
 void setInitialCapacity(int i)
           
 void setInitialNumberOfThreads(int i)
           
 void setPushNullPolicy(boolean pushNull)
          Sets the PushNullPolicy.
 void setUsePool(boolean usePool)
           
 void startFc()
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, lookupFc, setLogger, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outPushItf

protected Push outPushItf
The server interface to which this component is bound.


inPullItf

protected Pull inPullItf
The server interface to which this component is bound.


mutexItf

protected Mutex mutexItf
The server interface to which this component is bound.


pumpTask

protected Task pumpTask

pushNullPolicy

protected boolean pushNullPolicy

usePool

protected boolean usePool

initialNumberOfThreads

protected int initialNumberOfThreads

initialCapacity

protected int initialCapacity
Constructor Detail

PumpSynchronizedImpl

public PumpSynchronizedImpl()
Method Detail

getPushNullPolicy

public boolean getPushNullPolicy()
Description copied from interface: PumpAttributeController
Returns the PushNullPolicy.

Specified by:
getPushNullPolicy in interface PumpAttributeController
Returns:
the PushNullPolicy.
See Also:
PumpAttributeController.getPushNullPolicy()

setPushNullPolicy

public void setPushNullPolicy(boolean pushNull)
Description copied from interface: PumpAttributeController
Sets the PushNullPolicy.

Specified by:
setPushNullPolicy in interface PumpAttributeController
Parameters:
pushNull - the PushNullPolicy.
See Also:
PumpAttributeController.setPushNullPolicy(boolean)

setUsePool

public void setUsePool(boolean usePool)
Specified by:
setUsePool in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.setUsePool(boolean)

getUsePool

public boolean getUsePool()
Specified by:
getUsePool in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.getUsePool()

setInitialCapacity

public void setInitialCapacity(int i)
Specified by:
setInitialCapacity in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.setInitialCapacity(int)

getInitialCapacity

public int getInitialCapacity()
Specified by:
getInitialCapacity in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.getInitialCapacity()

setInitialNumberOfThreads

public void setInitialNumberOfThreads(int i)
Specified by:
setInitialNumberOfThreads in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.setInitialNumberOfThreads(int)

getInitialNumberOfThreads

public int getInitialNumberOfThreads()
Specified by:
getInitialNumberOfThreads in interface ActiveComponentAttributeController
See Also:
ActiveComponentAttributeController.getInitialNumberOfThreads()

startFc

public void startFc()
             throws IllegalLifeCycleException
Specified by:
startFc in interface LifeCycleController
Throws:
IllegalLifeCycleException
See Also:
LifeCycleController.startFc()

beforeFirstStart

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

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Specified by:
bindFc in interface BindingController
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)


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