|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.instrumentmiddleware.cima.plugin.impl.AbstractPlugin
org.instrumentmiddleware.cima.plugin.producer.impl.AbstractProducer
public abstract class AbstractProducer
It is recommended that all producer plugins subclass this plugin to maintain semantic consistency for CIMA operation.
Methods of interest to subclasses are the #run() method and the #releaseParcel(Parcel) method.
org.instrumentmiddleware.cima.plugin.IProducer| Field Summary | |
|---|---|
protected java.lang.Class<?> |
deliveryStrategy
The delivery strategy to use to deliver the parcels TODO: seems a bit clunky to have the director and the delivery strategy in here |
protected ICIMADirector |
director
The director to release parcels to TODO: seems a bit clunky to have the director and the delivery strategy in here |
protected static org.apache.log4j.Logger |
log
|
protected IParcelCreator |
parcelCreator
The creator of the parcels |
| Fields inherited from class org.instrumentmiddleware.cima.plugin.impl.AbstractPlugin |
|---|
startOnLoad, stopped, subscriptions |
| Constructor Summary | |
|---|---|
AbstractProducer(java.lang.String id,
IParcelCreator creator,
ICIMADirector director)
Instantiate the producer The id, creator and director are checked for non-null-ness, and the id is checked for non-emptiness. |
|
| Method Summary | |
|---|---|
java.lang.Class<?> |
getDeliveryStrategy()
Returns the delivery strategy |
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. |
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 |
releaseParcel(org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel parcel)
Release the parcel to CIMA for delivery. |
void |
setDeliveryStrategy(java.lang.Class<?> strategy)
Sets the delivery strategy. |
void |
start()
Start this plugin. |
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 |
| Methods inherited from interface org.instrumentmiddleware.cima.plugin.IPlugin |
|---|
doSubscribe, getId, getInformation, getSequenceNumber, processParcel, setStartOnLoad, startOnLoad |
| Methods inherited from interface org.instrumentmiddleware.cima.plugin.IPlugin |
|---|
doSubscribe, getId, getInformation, getSequenceNumber, processParcel, setStartOnLoad, startOnLoad |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected IParcelCreator parcelCreator
protected ICIMADirector director
protected java.lang.Class<?> deliveryStrategy
| Constructor Detail |
|---|
public AbstractProducer(java.lang.String id,
IParcelCreator creator,
ICIMADirector director)
throws java.lang.Exception
id - the plugin idcreator - the parcel creatordirector - the director to release parcels to
java.lang.Exception - if any arguments are null or empty| Method Detail |
|---|
public void setDeliveryStrategy(java.lang.Class<?> strategy)
setDeliveryStrategy in interface IProducerstrategy - the strategypublic java.lang.Class<?> getDeliveryStrategy()
getDeliveryStrategy in interface IProducer
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
PluginExceptionorg.instrumentmiddleware.cima.plugin.impl.AbstractPlugin.internalProcessParcel(BodyType, ISession,
ResponseType)public final void releaseParcel(org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel parcel)
releaseParcel in interface IProducerparcel - the parcel to sendorg.instrumentmiddleware.cima.plugin.IProducer.releaseParcel(Parcel)
public void start()
throws PluginException
IPlugin
start in interface IPluginstart in class AbstractPluginPluginExceptionorg.instrumentmiddleware.cima.plugin.Plugin#start()
public void stop()
throws PluginException
IPlugin
stop in interface IPluginstop in class AbstractPluginPluginExceptionorg.instrumentmiddleware.cima.plugin.Plugin#stop()
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
ICIMAOperationExtension
processGetOperation in interface ICIMAOperationExtensionvariables - The variables to get the value fromsession - The session this communication belongs toresponse - response the partly built response
PluginException - if something goes wrong while retrieving variables values
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
ICIMAOperationExtension
processSetOperation in interface ICIMAOperationExtensionvariables - The variables to be setsession - The session this communication belongs toresponse - The partly built response
PluginException - if something goes wrong while setting variables values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||