org.objectweb.dream.aggregator
Class PullPullAggregatorWhileNotNullImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.aggregator.PullPullAggregatorWhileNotNullImpl
All Implemented Interfaces:
PullPullAggregatorWhileNotNullAttributeController, ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, Pull, AttributeController, BindingController, LifeCycleController

public class PullPullAggregatorWhileNotNullImpl
extends AbstractComponent
implements Pull, PullPullAggregatorWhileNotNullAttributeController

Message aggregator, when a message is asked in the out-pull server interface, this component pulls messages on its in-pull client interface until null is returned, and then returns an aggregated message containing every pulled messages.


Field Summary
protected  Pull inPullItf
           
protected  MessageManager messageManagerItf
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, 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.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
PullPullAggregatorWhileNotNullImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 boolean getPullEmptyMessagePolicy()
          Returns true if the aggregator must return an empty message when no message can't be aggregated.
 String[] listFc()
           
 Message pull()
           
 void setPullEmptyMessagePolicy(boolean policy)
          Sets the pullEmptyMessage policy.
 
Methods inherited from class org.objectweb.dream.AbstractComponent
beforeFirstStart, 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
 

Field Detail

inPullItf

protected Pull inPullItf

messageManagerItf

protected MessageManager messageManagerItf
Constructor Detail

PullPullAggregatorWhileNotNullImpl

public PullPullAggregatorWhileNotNullImpl()
Method Detail

pull

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

getPullEmptyMessagePolicy

public boolean getPullEmptyMessagePolicy()
Description copied from interface: PullPullAggregatorWhileNotNullAttributeController
Returns true if the aggregator must return an empty message when no message can't be aggregated. If false, the aggregator returns null.

Specified by:
getPullEmptyMessagePolicy in interface PullPullAggregatorWhileNotNullAttributeController
Returns:
the current pullEmptyMessage policy.
See Also:
PullPullAggregatorWhileNotNullAttributeController.getPullEmptyMessagePolicy()

setPullEmptyMessagePolicy

public void setPullEmptyMessagePolicy(boolean policy)
Description copied from interface: PullPullAggregatorWhileNotNullAttributeController
Sets the pullEmptyMessage policy.

Specified by:
setPullEmptyMessagePolicy in interface PullPullAggregatorWhileNotNullAttributeController
Parameters:
policy - the new pullEmptyMessage policy.
See Also:
PullPullAggregatorWhileNotNullAttributeController.setPullEmptyMessagePolicy(boolean)

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
Overrides:
bindFc in class AbstractComponent
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)


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