|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.instrumentmiddleware.cima.transport.delivery.impl.AbstractDeliveryStrategy
public abstract class AbstractDeliveryStrategy
The AbstractDeliveryStrategy provides convenience methods to deal with obtaining the requirements to implement delivery, namely the transport manager and parcel. There is also a method to do pre-run checks to test if this class has enough information to attempt delivery. Note that the transport manager is required to instantiate this class so no check is made for it during the canRun method
| Field Summary | |
|---|---|
protected java.util.concurrent.ExecutorService |
executor
the executor by which we will attempt delivery |
protected static org.apache.log4j.Logger |
log
|
protected IRegisteredParcel |
parcel
The parcel to deliver TODO: make this a ThreadLocal to remove the synchronization on run() see http://www.ibm.com/developerworks/java/library/j-threads3.html |
protected ITransportManager |
transportManager
The transport manager which will provide our transport options |
| Constructor Summary | |
|---|---|
AbstractDeliveryStrategy(ITransportManager transportManager,
java.util.concurrent.ExecutorService executor)
Initialise this delivery strategy. |
|
| Method Summary | |
|---|---|
org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel |
call()
|
boolean |
canRun()
Indication of runnable state of this strategy. |
void |
setRegisteredParcel(IRegisteredParcel parcel)
Sets the parcel to be delivered. |
| 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.transport.delivery.IDeliveryStrategy |
|---|
deliver |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
protected java.util.concurrent.ExecutorService executor
protected IRegisteredParcel parcel
protected ITransportManager transportManager
| Constructor Detail |
|---|
public AbstractDeliveryStrategy(ITransportManager transportManager,
java.util.concurrent.ExecutorService executor)
throws java.lang.Exception
transportManager -
java.lang.Exception - if the required transport manager is not valid| Method Detail |
|---|
public void setRegisteredParcel(IRegisteredParcel parcel)
setRegisteredParcel in interface IDeliveryStrategyparcel - the parcel to sendpublic boolean canRun()
public org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel call()
call in interface java.util.concurrent.Callable<org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||