[jboss-svn-commits] JBL Code SVN: r7502 - labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Nov 9 13:05:44 EST 2006
Author: estebanschifman
Date: 2006-11-09 13:05:42 -0500 (Thu, 09 Nov 2006)
New Revision: 7502
Modified:
labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourier.java
Log:
Setters for TwoWayCourier
Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourier.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourier.java 2006-11-09 17:33:30 UTC (rev 7501)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/internal/soa/esb/couriers/TwoWayCourier.java 2006-11-09 18:05:42 UTC (rev 7502)
@@ -31,16 +31,32 @@
public class TwoWayCourier implements Courier
{
- public TwoWayCourier(EPR output, EPR input) throws CourierException
+ public TwoWayCourier(EPR toEpr, EPR replyToEpr) throws CourierException
{
- if (null!=output)
- _outgoing = getDeliverCourier(output);
- if (null!=input)
- _incoming = getPickupCourier(input);
+ setToEpr (toEpr);
+ setReplyToEpr (replyToEpr);
} //________________________________
+ public void setToEpr(EPR epr) throws CourierException
+ {
+ DeliverCourier old = _outgoing;
+ _outgoing = getDeliverCourier(epr);
+ if (null!=old)
+ old.cleanup();
+ } //________________________________
+
+ public void setReplyToEpr(EPR epr) throws CourierException
+ {
+ PickUpCourier old = _incoming;
+ _incoming = getPickupCourier(epr);
+ if (null!=old)
+ old.cleanup();
+ } //________________________________
+
protected DeliverCourier getDeliverCourier(EPR epr) throws CourierException
{
+ if (null==epr)
+ return null;
if (epr instanceof JMSEpr)
return new JmsCourier((JMSEpr)epr);
throw new CourierException ("Couriers for "+epr.getClass().getSimpleName()+" not supported yet");
@@ -48,6 +64,8 @@
protected PickUpCourier getPickupCourier(EPR epr) throws CourierException
{
+ if (null==epr)
+ return null;
if (epr instanceof JMSEpr)
return new JmsCourier((JMSEpr)epr,true);
throw new CourierException ("Couriers for "+epr.getClass().getSimpleName()+" not supported yet");
More information about the jboss-svn-commits
mailing list