org.instrumentmiddleware.cima.plugin.producer.poller
Class AbstractSinglePollerParcelProducer
java.lang.Object
org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
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
|
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.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 |
isThreadStarted
protected boolean isThreadStarted
pollerThread
protected ParcelProducerPoller pollerThread
- The unique poller thread
AbstractSinglePollerParcelProducer
public AbstractSinglePollerParcelProducer(java.lang.String id,
IParcelCreator creator,
ICIMADirector director)
throws java.lang.Exception
- Throws:
java.lang.Exception
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.