Title: [774] trunk/core/src/main/java/org/servicemix/client: added simplified methods which don't require an EndpointResolver or a Map of exchange properties
Revision
774
Author
jstrachan
Date
2005-11-09 11:17:34 -0500 (Wed, 09 Nov 2005)

Log Message

added simplified methods which don't require an EndpointResolver or a Map of exchange properties

Modified Paths

Diff

Modified: trunk/core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java (773 => 774)

--- trunk/core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java	2005-11-09 15:34:55 UTC (rev 773)
+++ trunk/core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java	2005-11-09 16:17:34 UTC (rev 774)
@@ -171,7 +171,18 @@
 
     // Helper methods to make JBI a little more concise to use from a client
     //-------------------------------------------------------------------------
+    public Object request(Map inMessageProperties, Object content) throws JBIException {
+        return request(null, null, inMessageProperties, content);
+    }
 
+    public void send(Map inMessageProperties, Object content) throws JBIException {
+        send(null, null, inMessageProperties, content);
+    }
+
+    public boolean sendSync(Map inMessageProperties, Object content) throws JBIException {
+        return sendSync(null, null, inMessageProperties, content);
+    }
+
     public void send(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException {
         InOnly exchange = createInOnlyExchange(resolver);
         populateMessage(exchange, exchangeProperties, inMessageProperties, content);

Modified: trunk/core/src/main/java/org/servicemix/client/ServiceMixClient.java (773 => 774)

--- trunk/core/src/main/java/org/servicemix/client/ServiceMixClient.java	2005-11-09 15:34:55 UTC (rev 773)
+++ trunk/core/src/main/java/org/servicemix/client/ServiceMixClient.java	2005-11-09 16:17:34 UTC (rev 774)
@@ -128,8 +128,38 @@
     boolean sendSync(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException;
 
 
+    /**
+     * Performs a request-response (using an [EMAIL PROTECTED] InOut} to the endpoint denoted by the given resolver,
+     * blocking until the response is received and then returning the result.
+     *
+     * @param inMessageProperties the properties used for the in message or null if no properties are required
+     * @param content             the body of the message
+     * @throws JBIException if the message could not be dispatched for some reason.
+     */
+    Object request(Map inMessageProperties, Object content) throws JBIException;
 
+    /**
+     * Sends a one way message exchange to the endpoint denoted by the given resolver
+     *
+     * @param inMessageProperties the properties used for the in message or null if no properties are required
+     * @param content             the body of the message
+     * @throws JBIException if the message could not be dispatched for some reason.
+     */
+    void send(Map inMessageProperties, Object content) throws JBIException;
 
+    /**
+     * Sends a one way message exchange to the endpoint denoted by the given resolver and blocks until the send is completed.
+     *
+     * @param inMessageProperties the properties used for the in message or null if no properties are required
+     * @param content             the body of the message
+     * @return true if the exchange has been processed and returned by the
+     *  servicing component, false otherwise.
+     * @throws JBIException if the message could not be dispatched for some reason.
+     */
+    boolean sendSync(Map inMessageProperties, Object content) throws JBIException;
+
+
+
     // Factory methods to make MessageExchange instances
     //-------------------------------------------------------------------------
 

Modified: trunk/core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java (773 => 774)

--- trunk/core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java	2005-11-09 15:34:55 UTC (rev 773)
+++ trunk/core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java	2005-11-09 16:17:34 UTC (rev 774)
@@ -211,7 +211,19 @@
 
     // Helper methods to make JBI a little more concise to use from a client
     //-------------------------------------------------------------------------
+    
+    public Object request(Map inMessageProperties, Object content) throws JBIException {
+        return request(null, null, inMessageProperties, content);
+    }
 
+    public void send(Map inMessageProperties, Object content) throws JBIException {
+        send(null, null, inMessageProperties, content);
+    }
+
+    public boolean sendSync(Map inMessageProperties, Object content) throws JBIException {
+        return sendSync(null, null, inMessageProperties, content);
+    }
+
     public void send(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException {
         InOnly exchange = createInOnlyExchange(resolver);
         populateMessage(exchange, exchangeProperties, inMessageProperties, content);

Reply via email to