org.jboss.soa.esb.couriers
Class CourierFactory

java.lang.Object
  extended by org.jboss.soa.esb.couriers.CourierFactory

public class CourierFactory
extends java.lang.Object


Constructor Summary
CourierFactory()
           
 
Method Summary
static void deregisterCourier(TwoWayCourier courier)
          Deregister the courier from the current set.
static void destroyLifecycleIdentityMap(java.lang.String lifecycleIdentity)
          Destroy the association for the current lifecycle identify.
static Courier getCourier(EPR toEPR)
          Obtain a courier which can perform deliveries only and prime it with the "to address" (toEPR).
static TwoWayCourier getCourier(EPR toEPR, EPR replyToEPR)
          Obtain a courier which can perform both deliveries and pickups and prime it with the "to address" (toEPR) and the "replyTo address" (replyToEPR).
static TwoWayCourier getPickupCourier(EPR replyToEPR)
          Obtain a courier which can perform pickups only and prime it with the "to address" (toEPR) and the "replyTo address" (replyToEPR).
static void initialiseLifecycleIdentityMap(java.lang.String lifecycleIdentity)
          Initialise the association for the current lifecycle identify.
static void releaseCouriers()
          Release all couriers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourierFactory

public CourierFactory()
Method Detail

getCourier

public static Courier getCourier(EPR toEPR)
                          throws CourierException,
                                 MalformedEPRException
Obtain a courier which can perform deliveries only and prime it with the "to address" (toEPR).

Parameters:
toEPR - - the 'to address', the address on where to deliver a Message.
Returns:
Throws:
CourierException - if the specific courier implementation cannot be created.
MalformedEPRException

getPickupCourier

public static TwoWayCourier getPickupCourier(EPR replyToEPR)
                                      throws CourierException,
                                             MalformedEPRException
Obtain a courier which can perform pickups only and prime it with the "to address" (toEPR) and the "replyTo address" (replyToEPR).

Parameters:
toEPR - - the 'to address', the address on where to deliver a Message.
Returns:
Throws:
CourierException - if the specific courier implementation cannot be created.
MalformedEPRException

getCourier

public static TwoWayCourier getCourier(EPR toEPR,
                                       EPR replyToEPR)
                                throws CourierException,
                                       MalformedEPRException
Obtain a courier which can perform both deliveries and pickups and prime it with the "to address" (toEPR) and the "replyTo address" (replyToEPR).

Parameters:
toEPR - - the 'to address', the address on where to deliver a Message.
Returns:
Throws:
CourierException - if the specific courier implementation cannot be created.
MalformedEPRException

initialiseLifecycleIdentityMap

public static void initialiseLifecycleIdentityMap(java.lang.String lifecycleIdentity)
Initialise the association for the current lifecycle identify.

Parameters:
lifecycleIdentity - The lifecycle identiy.

destroyLifecycleIdentityMap

public static void destroyLifecycleIdentityMap(java.lang.String lifecycleIdentity)
Destroy the association for the current lifecycle identify.

Parameters:
lifecycleIdentity - The lifecycle identiy.

deregisterCourier

public static void deregisterCourier(TwoWayCourier courier)
Deregister the courier from the current set.

Parameters:
courier - The current courier.

releaseCouriers

public static void releaseCouriers()
Release all couriers.