org.instrumentmiddleware.cima.transport.delivery.impl
Class TooBadDeliveryStrategy
java.lang.Object
org.instrumentmiddleware.cima.transport.delivery.impl.AbstractDeliveryStrategy
org.instrumentmiddleware.cima.transport.delivery.impl.TooBadDeliveryStrategy
- All Implemented Interfaces:
- java.util.concurrent.Callable<org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel>, IDeliveryStrategy
public class TooBadDeliveryStrategy
- extends AbstractDeliveryStrategy
TooBadDeliveryStrategy (aka. OneTryDeliveryStrategy) is always available for delivery. If the underlying
ITransportProvider is unable to perform delivery, then that's too bad and the parcel is lost. If the transmission
fails for some reason, then that's too bad and the parcel is lost.
- Author:
- andrew
|
Method Summary |
org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel |
deliver()
Commence delivery. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TooBadDeliveryStrategy
public TooBadDeliveryStrategy(ITransportManager transportManager,
java.util.concurrent.ExecutorService executor)
throws java.lang.Exception
- Initialise this delivery strategy. A valid transport manager is required to correctly construct this object.
- Parameters:
transportManager -
- Throws:
java.lang.Exception - if the required transport manager is not valid- See Also:
AbstractDeliveryStrategy(ITransportManager)
deliver
public org.instrumentmiddleware.cima.parcel.ParcelDocument.Parcel deliver()
- Commence delivery.
This method should not be called directly, but should be called as a result of starting a new thread. Initially,
a check is made to see if there is enough information to attempt delivery, if not this method returns
immediately.
For each recipient, an attempt is made to deliver the parcel only if an appropriate endpoint and transport
provider are available.
If delivery to a recipient fails no further attempt is made to deliver the parcel to that recipient.
Copyright © 2008. All Rights Reserved.