[jboss-svn-commits] JBL Code SVN: r7594 - labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 14 12:22:07 EST 2006
Author: kurt.stam at jboss.com
Date: 2006-11-14 12:22:07 -0500 (Tue, 14 Nov 2006)
New Revision: 7594
Modified:
labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java
Log:
undoing checkin
Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java 2006-11-14 17:15:40 UTC (rev 7593)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/couriers/Courier.java 2006-11-14 17:22:07 UTC (rev 7594)
@@ -44,6 +44,29 @@
*/
public boolean deliver(Message message) throws CourierException;
/**
+ * Engage in a durable delivery contract if it isn't in place already and try to deliver
+ * an ESB message.
+ *
+ * @param message Message - the message to deliver
+ * @return boolean - the result of the delivery
+ * @throws CourierException - if problems were encountered
+ */
+ public boolean deliverNext(Message message) throws CourierException;
+ /**
+ * Waits for a certain amount of time (waitTime) at an address (EPR) to pick up a message.
+ *
+ * @param message Message - the message to deliver.
+ * @param waitTime - Timeout for before giving up in millis.
+ * @return - the (reply)Message.
+ * @throws CourierException if the courier fails (i.e. gets a flat tire).
+ * @throws CourierTimeoutException if the pickup timed out (nobody home).
+ */
+ public Message deliverAndWaitForPickup(Message message,long waitTime)
+ throws CourierException, CourierTimeoutException;
+ /**
+ * This will be replaced by stopPickup().
+ */
+ /**
* Instruct the courier to go to a certain address (EPR) and wait for a pickup. This
* is a one shot pickup.
*
@@ -53,17 +76,33 @@
* @throws CourierTimeoutException if the pickup timed out (nobody home).
*/
public Message pickup(long waitTime) throws CourierException, CourierTimeoutException;
- /**
- * Instruct the courier to go to a certain address (EPR) and wait for a pickup. This
- * is a one shot pickup.
+ /**
+ * Creates a durable pickup contract if one does not exist and tries to obtain the next message.
*
- * @param waitTime - Pickup timeout for before giving up on this pickup. Time in millis.
+ * @param waitTime - Pickup timeout before giving up on this pickup. Time in millis.
* @return - the message that was picked up.
* @throws CourierException the courier fails (i.e. gets a flat tire).
* @throws CourierTimeoutException if the pickup timed out (nobody home).
*/
- public Message pickup(long waitTime, EPR replyToEpr) throws CourierException, CourierTimeoutException;
+ public Message pickupNext(long waitTime) throws CourierException, CourierTimeoutException;
/**
+ * When you were engaged in a durable pickup, you need to notify the Courier you want to break
+ * that contract. The courier will no longer stand by to go out for pickup.
+ */
+ public void stopDurablePickup();
+ /**
+ * When you were engaged in a durable delivary, you need to notify the Courier you want to break
+ * that contract. The courier will no longer stand by for delivery.
+ */
+ public void stopDurableDelivery();
+ /**
+ * Sets the toEPR. This can be used it the toEPR is not know at construction time of the Courier.
+ *
+ * @param toEPR - EPR specifying the to address.
+ * @throws CourierException
+ */
+ public void setToEpr(EPR toEPR) throws CourierException;
+ /**
* Sets the replyToEPR. This can be used if the replyToEPR is not know at construction time of
* the Courier.
*
More information about the jboss-svn-commits
mailing list