[jboss-svn-commits] JBL Code SVN: r13963 - labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 2 09:34:35 EDT 2007


Author: mark.little at jboss.com
Date: 2007-08-02 09:34:35 -0400 (Thu, 02 Aug 2007)
New Revision: 13963

Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ServiceInvoker.java
Log:
removed send in favour of doc updates.

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ServiceInvoker.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ServiceInvoker.java	2007-08-02 13:32:14 UTC (rev 13962)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ServiceInvoker.java	2007-08-02 13:34:35 UTC (rev 13963)
@@ -28,6 +28,7 @@
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
 import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.Call;
 import org.jboss.soa.esb.addressing.EPR;
 import org.jboss.soa.esb.addressing.MalformedEPRException;
 import org.jboss.soa.esb.addressing.util.DefaultReplyTo;
@@ -119,40 +120,7 @@
         }
     }
     
-    public ServiceInvoker (String serviceCategory, String serviceName, long timeout) throws RegistryException, MessageDeliverException
-    {
-	this(serviceCategory, serviceName);
-	
-	_timeout = timeout;
-    }
-    
     /**
-     * Deliver the message to the target service identified in the header (To field). If there is a
-     * ReplyTo field set, then the message will be delivered and a response is expected. Otherwise
-     * the message is sent as an asynchronous one-way and no response is returned. Responses to this
-     * invocation may be sent at a different time using correlated one-way invocations.
-     * 
-     * @param message the message to be delivered.
-     * @return if synchronous request/response is used, then this will be a response message, otherwise null.
-     * @throws MessageDeliverException
-     * @throws RegistryException
-     */
-    
-    public Message deliver (Message message) throws MessageDeliverException, RegistryException
-    {
-    	if (message == null)
-    	    throw new IllegalArgumentException();
-    	
-    	if (message.getHeader().getCall().getReplyTo() != null)
-    	    return deliverSync(message, _timeout);
-    	else
-    	{
-    	    deliverAsync(message);
-    	    
-    	    return null;
-    	}
-    }
-    /**
      * Method to deliver *one* message, which allocates resources before sending the message and
      * deallocates resources after the invocation. 
      * 
@@ -164,7 +132,7 @@
     public Message deliverOne (Message message) throws MessageDeliverException, RegistryException
     {
         try {
-            deliver(message);
+            deliverAsync(message);
         } finally {
             //cleanup allocated resources.
             close();
@@ -194,6 +162,9 @@
      * @throws MessageDeliverException Failed to deliver message, after trying all available EPRs.
      */
     public Message deliverSync(Message message, long timeoutMillis) throws MessageDeliverException, RegistryException {
+    	if (message == null)
+    	    throw new IllegalArgumentException();
+    	
         syncPickupDeliveryTimeout.set(timeoutMillis);
         return post(message, true);
     }
@@ -205,6 +176,9 @@
      * @throws MessageDeliverException Failed to deliver message, after trying all available EPRs.
      */
     public void deliverAsync(Message message) throws MessageDeliverException {
+    	if (message == null)
+    	    throw new IllegalArgumentException();
+    	
         // Not interested in a reply
         post(message, false);
     }
@@ -302,6 +276,8 @@
                 }
                 if (courier.deliver(message)) {
                     if (replyToEPR != null) {
+                    	// do we need to do this for synchronous calls? Vagueries of Couriers?
+                    	
                         courier.setReplyToEpr(replyToEPR);
                         return courier.pickup(syncPickupDeliveryTimeout.get());
                     } else {
@@ -371,5 +347,4 @@
         }
     }
     
-    private long _timeout;
 }




More information about the jboss-svn-commits mailing list