org.instrumentmiddleware.cima.plugin.producer.poller
Class OnDataSinglePollerParcelProducer

java.lang.Object
  extended by org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
      extended by org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
          extended by org.instrumentmiddleware.cima.plugin.producer.poller.AbstractSinglePollerParcelProducer
              extended by org.instrumentmiddleware.cima.plugin.producer.poller.OnDataSinglePollerParcelProducer
All Implemented Interfaces:
ICIMAOperationExtension, ICIMAPlugin, IPlugin, IParcelProducer, IProducer

public abstract class OnDataSinglePollerParcelProducer
extends AbstractSinglePollerParcelProducer

A parcels producer that has a single poller thread. This producer aims at producing the requested parcels when the data is available. In other words the unique poller thread has no data interval, hence it will poll repeatedly this producer. It is the responsability of this producer's developer to implement a wait mechanism in the implementation of the produceParcels method. This producer can specify how the poller thread will release(send to subscribers) the produced parcels: using a single thread or a pool of threads. This is done with the releaseMode constructor parameter. If set to "multi" the poller thread will use a pool of threads to release the parcels

Author:
Romain

Field Summary
protected  java.lang.String releaseMode
           
 
Fields inherited from class org.instrumentmiddleware.cima.plugin.producer.poller.AbstractSinglePollerParcelProducer
isThreadStarted, pollerThread
 
Fields inherited from class org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
deliveryStrategy, director, log, parcelCreator
 
Fields inherited from class org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
startOnLoad, stopped, subscriptions
 
Constructor Summary
OnDataSinglePollerParcelProducer(java.lang.String id, IParcelCreator creator, ICIMADirector director, java.lang.String releaseMode)
           
 
Method Summary
protected  ParcelProducerPoller getPollerThread()
           
 
Methods inherited from class org.instrumentmiddleware.cima.plugin.producer.poller.AbstractSinglePollerParcelProducer
processSubscribeParcel, stop
 
Methods inherited from class org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
getDeliveryStrategy, processGetOperation, processSetOperation, releaseParcel, setDeliveryStrategy, start
 
Methods inherited from class org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
doSubscribe, doSubscribe, getBodyHandler, getId, getInformation, getSequenceNumber, internalProcessParcel, processParcel, processSubscribeResponse, setStartOnLoad, setSubscriptions, startOnLoad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.instrumentmiddleware.cima.plugin.producer.IParcelProducer
produceParcels
 
Methods inherited from interface org.instrumentmiddleware.cima.plugin.producer.IProducer
getDeliveryStrategy, releaseParcel, setDeliveryStrategy
 
Methods inherited from interface org.instrumentmiddleware.cima.plugin.IPlugin
doSubscribe, getId, getInformation, getSequenceNumber, processParcel, setStartOnLoad, start, startOnLoad
 

Field Detail

releaseMode

protected java.lang.String releaseMode
Constructor Detail

OnDataSinglePollerParcelProducer

public OnDataSinglePollerParcelProducer(java.lang.String id,
                                        IParcelCreator creator,
                                        ICIMADirector director,
                                        java.lang.String releaseMode)
                                 throws java.lang.Exception
Parameters:
id -
creator -
director -
releaseMode - releaseMode if set to "multi", the poller thread will the use a pool of threads to released the produced parcels. Every other values, means that a single thread will be used by the poller thread to release the parcels.
Throws:
java.lang.Exception
Method Detail

getPollerThread

protected ParcelProducerPoller getPollerThread()
Specified by:
getPollerThread in class AbstractSinglePollerParcelProducer


Copyright © 2008. All Rights Reserved.