servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r563128 - in /incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api: Channel.java Endpoint.java Exchange.java Message.java Reference.java Registry.java
Date Mon, 06 Aug 2007 13:32:13 GMT
Author: gnodet
Date: Mon Aug  6 06:32:11 2007
New Revision: 563128

URL: http://svn.apache.org/viewvc?view=rev&rev=563128
Log:
A few changes

Modified:
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Channel.java
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Endpoint.java
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Exchange.java
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Message.java
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Reference.java
    incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Registry.java

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Channel.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Channel.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Channel.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Channel.java
Mon Aug  6 06:32:11 2007
@@ -22,6 +22,7 @@
  * Creates a channel to perform invocations on the NMR.
  *
  * @version $Revision: $
+ * @since 4.0
  */
 public interface Channel {
 
@@ -45,9 +46,9 @@
     Exchange createExchange(Exchange.Pattern pattern);
 
     /**
-     * Asynchronously invocation of the service
+     * Synchronously invocation of the service
      */
-    void send(Exchange exchange);
+    void invoke(Exchange exchange);
 
     /**
      * An asynchronous invocation of the service which will notify the returned future when
the invocation

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Endpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Endpoint.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Endpoint.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Endpoint.java
Mon Aug  6 06:32:11 2007
@@ -24,6 +24,7 @@
  * be given several exchanges concurrently for processing.
  *
  * @version $Revision: $
+ * @since 4.0
  */
 public interface Endpoint {
 

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Exchange.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Exchange.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Exchange.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Exchange.java
Mon Aug  6 06:32:11 2007
@@ -16,6 +16,7 @@
  */
 package org.apache.servicemix.api;
 
+import java.io.Serializable;
 import java.util.Set;
 
 /**
@@ -26,8 +27,9 @@
  * Exchanges are created using the {@link Channel}.
  *
  * @version $Revision: $
+ * @since 4.0
  */
-public interface Exchange {
+public interface Exchange extends Serializable, Cloneable {
 
     enum Pattern {
         InOnly,
@@ -66,9 +68,9 @@
      */
     Exchange.Pattern getPattern();
 
-    Reference getReference();
+    Reference getTarget();
 
-    void setReference(Reference target);
+    void setTarget(Reference target);
 
     /**
      *
@@ -127,7 +129,16 @@
      */
     Exception getError();
 
+    /**
+     * Make sure that all streams contained in the content and in
+     * attachments are transformed to re-readable sources.
+     * This method will be called by the framework when persisting
+     * the exchange or when displaying it
+     */
+    void        ensureReReadable();
+
+    void     copyFrom(Exchange exchange);
     Exchange copy();
-    String   toString();
+    String   display(boolean displayContent);
 
 }

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Message.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Message.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Message.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Message.java
Mon Aug  6 06:32:11 2007
@@ -16,12 +16,14 @@
  */
 package org.apache.servicemix.api;
 
+import java.io.Serializable;
 import java.util.Set;
 
 /**
  * @version $Revision: $
+ * @since 4.0
  */
-public interface Message {
+public interface Message extends Serializable, Cloneable {
 
     enum Type {
         In, Out, Fault
@@ -37,7 +39,7 @@
     Set<String> getAttachmentIds();
     Object      getAttachment(String id);
     void        addAttachment(String id, Object value);
-    void        removeAttacment(String id);
+    void        removeAttachment(String id);
 
     /**
      *
@@ -52,12 +54,12 @@
     Message     copy();
 
     /**
-     * Make sure that all streams container in the content and in
-     * attachements are transformed to re-readable sources.
+     * Make sure that all streams contained in the content and in
+     * attachments are transformed to re-readable sources.
      * This method will be called by the framework when persisting
      * the message or when displaying it
      */
     void        ensureReReadable();
 
-    String      toString();        
+    String      display(boolean displayContent);
 }

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Reference.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Reference.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Reference.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Reference.java
Mon Aug  6 06:32:11 2007
@@ -24,10 +24,15 @@
  * as targets for {@link Exchange}s.
  *
  * @version $Revision: $
+ * @since 4.0
  */
 public interface Reference {
 
-    
+    /**
+     * Obtains an xml document describing this endpoint reference.
+     * 
+     * @return 
+     */
     Document toXml();
 
 }

Modified: incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Registry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Registry.java?view=diff&rev=563128&r1=563127&r2=563128
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Registry.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/api/src/main/java/org/apache/servicemix/api/Registry.java
Mon Aug  6 06:32:11 2007
@@ -24,11 +24,13 @@
  * The Registry is used to register endpoints, unregister them, query endpoints
  * and create a Channel to interfact with them.
  *
+ * @since 4.0
  */
 public interface Registry {
 
     /**
      * Register the given endpoint in the registry.
+     * In an OSGi world, this would be performed automatically by a ServiceTracker.
      *
      * @param endpoint the endpoint to register
      * @param properties
@@ -37,13 +39,14 @@
 
     /**
      * Unregister a previously register enpoint.
+     * In an OSGi world, this would be performed automatically by a ServiceTracker.
      *
      * @param endpoint the endpoint to unregister
      */
     void unregister(Endpoint endpoint);
 
     /**
-     * From a given amount of metdata which could include interface name, service name
+     * From a given amount of metadata which could include interface name, service name
      * policy data and so forth, choose an available endpoint reference to use
      * for invocations.
      *
@@ -51,7 +54,14 @@
      */
     Reference lookup(Map<String, ?> properties);
 
-    Reference lookp(Document xml);
+    /**
+     * This methods creates a Reference from its xml representation.
+     * See {@link Reference.toXml}
+     * 
+     * @param xml
+     * @return
+     */
+    Reference lookup(Document xml);
 
     /**
      * Create a channel to interact with the NMR without exposing an endpoint.



Mime
View raw message