org.instrumentmiddleware.cima.plugin.producer.poller
Class RegularIntervalMultiPollerParcelProducer
java.lang.Object
org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
org.instrumentmiddleware.cima.plugin.producer.poller.AbstractMultiPollerParcelProducer
org.instrumentmiddleware.cima.plugin.producer.poller.RegularIntervalMultiPollerParcelProducer
- All Implemented Interfaces:
- ICIMAOperationExtension, ICIMAPlugin, IPlugin, IParcelProducer, IProducer
public abstract class RegularIntervalMultiPollerParcelProducer
- extends AbstractMultiPollerParcelProducer
A parcels producer that has multiple poller threads(one per subscriber/session). Each poller thread will
ask this producer to produce parcels on a regular interval(might be different for each poller). The data interval for a given
subscriber is specified in the SUBSCRIBE parcel the subscriber sends to notify its interest in the data produced by this producer.
This producer can specify how the poller threads will release(send to subscriber) 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 threads will use a pool of threads to release the parcels
- Author:
- Romain
|
Method Summary |
protected ParcelProducerPoller |
getPollerThread(ISession session,
org.instrumentmiddleware.cima.parcel.DataIntervalType dataInterval)
|
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType |
processGetOperation(org.instrumentmiddleware.cima.parcel.CimaVariable[] variables,
java.util.Calendar creationTime,
ISession session,
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType response)
Gets the given variables value. |
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType |
processSetOperation(org.instrumentmiddleware.cima.parcel.CimaVariable[] variables,
java.util.Calendar creationTime,
ISession session,
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType response)
Sets the given variables value. |
| 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 |
releaseMode
protected java.lang.String releaseMode
RegularIntervalMultiPollerParcelProducer
public RegularIntervalMultiPollerParcelProducer(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 threads 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 threads to release the parcels.
- Throws:
java.lang.Exception
processGetOperation
public org.instrumentmiddleware.cima.parcel.CimaOperationResponseType processGetOperation(org.instrumentmiddleware.cima.parcel.CimaVariable[] variables,
java.util.Calendar creationTime,
ISession session,
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType response)
throws PluginException
- Description copied from interface:
ICIMAOperationExtension
- Gets the given variables value. The result is a parcel containing the value of given variables
- Specified by:
processGetOperation in interface ICIMAOperationExtension- Overrides:
processGetOperation in class AbstractProducer
- Parameters:
variables - The variables to get the value fromsession - The session this communication belongs toresponse - response the partly built response
- Returns:
- a parcel containing the value of given variables
- Throws:
PluginException - if something goes wrong while retrieving variables values
processSetOperation
public org.instrumentmiddleware.cima.parcel.CimaOperationResponseType processSetOperation(org.instrumentmiddleware.cima.parcel.CimaVariable[] variables,
java.util.Calendar creationTime,
ISession session,
org.instrumentmiddleware.cima.parcel.CimaOperationResponseType response)
throws PluginException
- Description copied from interface:
ICIMAOperationExtension
- Sets the given variables value.
- Specified by:
processSetOperation in interface ICIMAOperationExtension- Overrides:
processSetOperation in class AbstractProducer
- Parameters:
variables - The variables to be setsession - The session this communication belongs toresponse - The partly built response
- Returns:
- a parcel containing the result of set execution
- Throws:
PluginException - if something goes wrong while setting variables values
getPollerThread
protected ParcelProducerPoller getPollerThread(ISession session,
org.instrumentmiddleware.cima.parcel.DataIntervalType dataInterval)
- Specified by:
getPollerThread in class AbstractMultiPollerParcelProducer
Copyright © 2008. All Rights Reserved.