org.objectweb.dream.queue
Class BasicPushPullQueueImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.queue.AbstractPushQueueImpl
          extended byorg.objectweb.dream.queue.BasicPushPullQueueImpl
All Implemented Interfaces:
AttributeController, BindingController, LifeCycleController, Loggable, Pull, Push, PushPullQueueAttributeController, PushQueueAttributeController, QueueAttributeController

public class BasicPushPullQueueImpl
extends AbstractPushQueueImpl
implements Pull, PushPullQueueAttributeController

Basic implementation of a Push/Pull buffer. By default the pull method is in blocking mode, but this could be changed using the component's attribute controller PushPullQueueAttributeController.


Field Summary
protected  boolean blockingPull
           
 
Fields inherited from class org.objectweb.dream.queue.AbstractPushQueueImpl
maxCapacity, messageManagerItf, overflowPolicy, waitingList
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.Pull
IN_PULL_ITF_NAME, OUT_PULL_ITF_NAME
 
Fields inherited from interface org.objectweb.dream.queue.PushQueueAttributeController
BLOCK_OVERFLOW_POLICY, DROP_OVERFLOW_POLICY, EXCEPTION_OVERFLOW_POLICY
 
Fields inherited from interface org.objectweb.dream.Push
IN_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
BasicPushPullQueueImpl()
           
 
Method Summary
 boolean getBlockingPull()
          Returns the blocking pull policy.
 String[] listFc()
           
 Message pull(Map context)
           
 void setBlockingPull(boolean blockingPull)
          Sets the blocking pull policy.
 
Methods inherited from class org.objectweb.dream.queue.AbstractPushQueueImpl
bindFc, getCurrentSize, getMaxCapacity, getOverflowPolicy, handleOverflow, push, setMaxCapacity, setOverflowPolicy
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, 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.queue.PushQueueAttributeController
getOverflowPolicy, setOverflowPolicy
 
Methods inherited from interface org.objectweb.dream.queue.QueueAttributeController
getCurrentSize, getMaxCapacity, setMaxCapacity
 

Field Detail

blockingPull

protected boolean blockingPull
Constructor Detail

BasicPushPullQueueImpl

public BasicPushPullQueueImpl()
Method Detail

pull

public Message pull(Map context)
             throws PullException
Specified by:
pull in interface Pull
Throws:
PullException
See Also:
Pull.pull(java.util.Map)

setBlockingPull

public void setBlockingPull(boolean blockingPull)
Description copied from interface: PushPullQueueAttributeController
Sets the blocking pull policy.

Specified by:
setBlockingPull in interface PushPullQueueAttributeController
Parameters:
blockingPull - the blocking pull policy.
See Also:
PushPullQueueAttributeController.setBlockingPull(boolean)

getBlockingPull

public boolean getBlockingPull()
Description copied from interface: PushPullQueueAttributeController
Returns the blocking pull policy.

Specified by:
getBlockingPull in interface PushPullQueueAttributeController
Returns:
the blocking pull policy.
See Also:
PushPullQueueAttributeController.getBlockingPull()

listFc

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


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