org.jboss.soa.esb.couriers
Interface TwoWayCourier

All Superinterfaces:
Courier

public interface TwoWayCourier
extends Courier


Method Summary
 Message pickup(long waitTime)
          Instruct the courier to wait for a pickup in the replyToEpr
 Message pickup(long waitTime, EPR epr)
          Instruct the courier to wait for a pickup in the specified EPR
 void setReplyToEpr(EPR replyToEPR)
          Sets the replyToEPR.
 void setToEpr(EPR toEPR)
          Sets the toEPR.
 
Methods inherited from interface org.jboss.soa.esb.couriers.Courier
deliver
 

Method Detail

pickup

Message pickup(long waitTime)
               throws CourierException,
                      CourierTimeoutException
Instruct the courier to wait for a pickup in the replyToEpr

Parameters:
waitTime - - Pickup timeout for before giving up on this pickup. Time in millis.
Returns:
- the message that was picked up.
Throws:
CourierException - the courier fails (i.e. gets a flat tire).
CourierTimeoutException - if the pickup timed out (nobody home).

pickup

Message pickup(long waitTime,
               EPR epr)
               throws CourierException,
                      CourierTimeoutException
Instruct the courier to wait for a pickup in the specified EPR

Parameters:
waitTime - - Pickup timeout for before giving up on this pickup. Time in millis.
epr - - Pickup address
Returns:
- the message that was picked up.
Throws:
CourierException - the courier fails (i.e. gets a flat tire).
CourierTimeoutException - if the pickup timed out (nobody home).

setToEpr

void setToEpr(EPR toEPR)
              throws CourierException
Sets the toEPR. This can be used if the toEPR is not know at construction time of the Courier.

Parameters:
toEPR - - EPR specifying the 'to' address.
Throws:
CourierException

setReplyToEpr

void setReplyToEpr(EPR replyToEPR)
                   throws CourierException
Sets the replyToEPR. This can be used if the replyToEPR is not know at construction time of the Courier.

Parameters:
replyToEPR - - EPR specifying the reply to address.
Throws:
CourierException