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

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
All Implemented Interfaces:
ICIMAOperationExtension, ICIMAPlugin, IPlugin, IParcelProducer, IProducer
Direct Known Subclasses:
OnDataSinglePollerParcelProducer, RegularIntervalSinglePollerParcelProducer

public abstract class AbstractSinglePollerParcelProducer
extends AbstractProducer
implements IParcelProducer

A parcel producer that has only one poller thread. The unique poller thread is not attached to any Session object. In other words the poller thread asks this producer to produce parcels that will be delivered to all subscribers

Author:
Romain

Field Summary
protected  boolean isThreadStarted
           
protected  ParcelProducerPoller pollerThread
          The unique poller thread
 
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
AbstractSinglePollerParcelProducer(java.lang.String id, IParcelCreator creator, ICIMADirector director)
           
 
Method Summary
protected abstract  ParcelProducerPoller getPollerThread()
           
 org.instrumentmiddleware.cima.parcel.ResponseType processSubscribeParcel(org.instrumentmiddleware.cima.parcel.BodyType body, java.util.Calendar creationTime, ISession session, org.instrumentmiddleware.cima.parcel.ResponseType response)
          Process a subscribe parcel.
 void stop()
          Stop this plugin.
 
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

isThreadStarted

protected boolean isThreadStarted

pollerThread

protected ParcelProducerPoller pollerThread
The unique poller thread

Constructor Detail

AbstractSinglePollerParcelProducer

public AbstractSinglePollerParcelProducer(java.lang.String id,
                                          IParcelCreator creator,
                                          ICIMADirector director)
                                   throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

processSubscribeParcel

public org.instrumentmiddleware.cima.parcel.ResponseType processSubscribeParcel(org.instrumentmiddleware.cima.parcel.BodyType body,
                                                                                java.util.Calendar creationTime,
                                                                                ISession session,
                                                                                org.instrumentmiddleware.cima.parcel.ResponseType response)
                                                                         throws PluginException
Description copied from class: AbstractProducer
Process a subscribe parcel. This method appends the endpoint of the remote entity to the session to allow delivery of parcels produced by this producer. The IDeliveryStrategy needs this information to deliver the parcel.

Overrides:
processSubscribeParcel in class AbstractProducer
Throws:
PluginException
See Also:
org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin.internalProcessParcel(BodyType, ISession, ResponseType)

stop

public void stop()
          throws PluginException
Description copied from interface: IPlugin
Stop this plugin. This allows a plugin to perform some cleanup and is called when CIMA expects no further interaction with this plugin

Specified by:
stop in interface IPlugin
Overrides:
stop in class AbstractProducer
Throws:
PluginException
See Also:
org.instrumentmiddleware.cima.plugin.Plugin#stop()

getPollerThread

protected abstract ParcelProducerPoller getPollerThread()


Copyright © 2008. All Rights Reserved.