servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r357691 - in /incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix: client/ components/util/ components/util/xstream/ jbi/container/ jbi/messaging/
Date Mon, 19 Dec 2005 13:50:30 GMT
Author: jstrachan
Date: Mon Dec 19 05:50:20 2005
New Revision: 357691

URL: http://svn.apache.org/viewcvs?rev=357691&view=rev
Log:
refactored the Marshaler interface to PojoMarshaler to avoid confusion; folks may have thought
that it was some kinda base interface for all Marshaler types etc.

Added:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/PojoMarshaler.java
      - copied, changed from r357683, incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/Marshaler.java
Removed:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/Marshaler.java
Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/MarshalerSupport.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/PojoSupport.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/xstream/XStreamMarshaler.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/container/ActivationSpec.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/DefaultMarshaler.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeImpl.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/NormalizedMessageImpl.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/DefaultServiceMixClient.java
Mon Dec 19 05:50:20 2005
@@ -23,7 +23,7 @@
 import org.servicemix.jbi.container.ActivationSpec;
 import org.servicemix.jbi.container.JBIContainer;
 import org.servicemix.jbi.messaging.DefaultMarshaler;
-import org.servicemix.jbi.messaging.Marshaler;
+import org.servicemix.jbi.messaging.PojoMarshaler;
 import org.servicemix.jbi.resolver.EndpointFilter;
 import org.servicemix.jbi.resolver.EndpointResolver;
 import org.servicemix.jbi.resolver.ExternalInterfaceNameEndpointResolver;
@@ -59,7 +59,7 @@
 public class DefaultServiceMixClient extends ComponentSupport implements ServiceMixClient
{
 
     private EndpointFilter filter = NullEndpointFilter.getInstance();
-    private Marshaler marshaler = new DefaultMarshaler();
+    private PojoMarshaler marshaler = new DefaultMarshaler();
 
     public DefaultServiceMixClient() {
     }
@@ -251,7 +251,7 @@
         this.filter = filter;
     }
 
-    public Marshaler getMarshaler() {
+    public PojoMarshaler getMarshaler() {
         return marshaler;
     }
 
@@ -261,7 +261,7 @@
      *
      * @param marshaler
      */
-    public void setMarshaler(Marshaler marshaler) {
+    public void setMarshaler(PojoMarshaler marshaler) {
         this.marshaler = marshaler;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/client/ServiceMixClientFacade.java
Mon Dec 19 05:50:20 2005
@@ -23,7 +23,7 @@
 import org.servicemix.jbi.container.ActivationSpec;
 import org.servicemix.jbi.container.JBIContainer;
 import org.servicemix.jbi.messaging.DefaultMarshaler;
-import org.servicemix.jbi.messaging.Marshaler;
+import org.servicemix.jbi.messaging.PojoMarshaler;
 import org.servicemix.jbi.resolver.EndpointFilter;
 import org.servicemix.jbi.resolver.EndpointResolver;
 import org.servicemix.jbi.resolver.ExternalInterfaceNameEndpointResolver;
@@ -62,7 +62,7 @@
 
     private ComponentContext context;
     private EndpointFilter filter = NullEndpointFilter.getInstance();
-    private Marshaler marshaler = new DefaultMarshaler();
+    private PojoMarshaler marshaler = new DefaultMarshaler();
     private MessageExchangeFactory exchangeFactory;
 
     public ServiceMixClientFacade(ComponentContext context) {
@@ -292,7 +292,7 @@
         this.filter = filter;
     }
 
-    public Marshaler getMarshaler() {
+    public PojoMarshaler getMarshaler() {
         return marshaler;
     }
 
@@ -302,7 +302,7 @@
      *
      * @param marshaler
      */
-    public void setMarshaler(Marshaler marshaler) {
+    public void setMarshaler(PojoMarshaler marshaler) {
         this.marshaler = marshaler;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/MarshalerSupport.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/MarshalerSupport.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/MarshalerSupport.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/MarshalerSupport.java
Mon Dec 19 05:50:20 2005
@@ -20,6 +20,9 @@
 import org.servicemix.jbi.jaxp.SourceTransformer;
 
 /**
+ * A useful base class for some kind of marshaler to and from JBI NormalizedMessage instances
to
+ * some kind of underlying transport or protocol.
+ * 
  * @version $Revision$
  */
 public class MarshalerSupport {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/PojoSupport.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/PojoSupport.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/PojoSupport.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/PojoSupport.java
Mon Dec 19 05:50:20 2005
@@ -23,7 +23,7 @@
 import org.servicemix.jbi.FaultException;
 import org.servicemix.jbi.NotInitialisedYetException;
 import org.servicemix.jbi.management.BaseLifeCycle;
-import org.servicemix.jbi.messaging.Marshaler;
+import org.servicemix.jbi.messaging.PojoMarshaler;
 import org.servicemix.jbi.messaging.NormalizedMessageImpl;
 
 import javax.jbi.JBIException;
@@ -111,7 +111,7 @@
         if (message instanceof NormalizedMessageImpl) {
             return ((NormalizedMessageImpl) message).getBody();
         }
-        return message.getProperty(Marshaler.BODY);
+        return message.getProperty(PojoMarshaler.BODY);
     }
 
     /**
@@ -131,7 +131,7 @@
             ((NormalizedMessageImpl) message).setBody(body);
         }
         else {
-            message.setProperty(Marshaler.BODY, body);
+            message.setProperty(PojoMarshaler.BODY, body);
         }
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/xstream/XStreamMarshaler.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/xstream/XStreamMarshaler.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/xstream/XStreamMarshaler.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/components/util/xstream/XStreamMarshaler.java
Mon Dec 19 05:50:20 2005
@@ -25,7 +25,7 @@
 import org.servicemix.jbi.jaxp.SourceTransformer;
 import org.servicemix.jbi.jaxp.StringSource;
 import org.servicemix.jbi.messaging.DefaultMarshaler;
-import org.servicemix.jbi.messaging.Marshaler;
+import org.servicemix.jbi.messaging.PojoMarshaler;
 import org.w3c.dom.Document;
 
 import javax.jbi.messaging.MessageExchange;
@@ -39,7 +39,7 @@
 import javax.xml.transform.stream.StreamSource;
 
 /**
- * A {@link Marshaler} for <a href="http://xStream.codehaus.org/">XStream</a>
which
+ * A {@link PojoMarshaler} for <a href="http://xStream.codehaus.org/">XStream</a>
which
  * streams the object to an a W3C DOM Document so that other components can access
  * the XML without an extra parse.
  *

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/container/ActivationSpec.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/container/ActivationSpec.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/container/ActivationSpec.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/container/ActivationSpec.java
Mon Dec 19 05:50:20 2005
@@ -17,7 +17,7 @@
  **/
 package org.servicemix.jbi.container;
 
-import org.servicemix.jbi.messaging.Marshaler;
+import org.servicemix.jbi.messaging.PojoMarshaler;
 import org.servicemix.jbi.resolver.EndpointChooser;
 import org.servicemix.jbi.resolver.EndpointResolver;
 import org.servicemix.jbi.resolver.InterfaceNameEndpointResolver;
@@ -53,7 +53,7 @@
     private QName destinationInterface;
     private QName destinationOperation;
     private String destinationEndpoint;
-    private transient Marshaler marshaler;
+    private transient PojoMarshaler marshaler;
     private SubscriptionSpec[] subscriptions = {};
     private boolean failIfNoDestinationEndpoint = true;
     private Boolean persistent;
@@ -231,11 +231,11 @@
         this.destinationEndpoint = destinationEndpoint;
     }
 
-    public Marshaler getMarshaler() {
+    public PojoMarshaler getMarshaler() {
         return marshaler;
     }
 
-    public void setMarshaler(Marshaler marshaler) {
+    public void setMarshaler(PojoMarshaler marshaler) {
         this.marshaler = marshaler;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/DefaultMarshaler.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/DefaultMarshaler.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/DefaultMarshaler.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/DefaultMarshaler.java
Mon Dec 19 05:50:20 2005
@@ -27,24 +27,24 @@
 import javax.xml.transform.dom.DOMSource;
 
 /**
- * Default implementation of {@link Marshaler} which will pass through String
+ * Default implementation of {@link PojoMarshaler} which will pass through String
  * objects as XML content, DOM objects or Stream objects, otherwise the payload
  * is stored in a message property.
  * 
  * @version $Revision$
  */
-public class DefaultMarshaler implements Marshaler {
+public class DefaultMarshaler implements PojoMarshaler {
 
-    private Marshaler parent;
+    private PojoMarshaler parent;
 
     public DefaultMarshaler() {
     }
 
-    public DefaultMarshaler(Marshaler parent) {
+    public DefaultMarshaler(PojoMarshaler parent) {
         this.parent = parent;
     }
 
-    public Marshaler getParent() {
+    public PojoMarshaler getParent() {
         return parent;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeFactoryImpl.java
Mon Dec 19 05:50:20 2005
@@ -259,7 +259,7 @@
         }
         
         exchange.setSourceContext(getContext());
-        Marshaler marshaler = getContext().getActivationSpec().getMarshaler();
+        PojoMarshaler marshaler = getContext().getActivationSpec().getMarshaler();
         if (marshaler != null) {
             exchange.setMarshaler(marshaler);
         }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeImpl.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeImpl.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/MessageExchangeImpl.java
Mon Dec 19 05:50:20 2005
@@ -76,7 +76,7 @@
     
     protected ComponentContextImpl sourceContext;
     protected ExchangePacket packet;
-    protected Marshaler marshaler;
+    protected PojoMarshaler marshaler;
     protected int state;
     protected int syncState = SYNC_STATE_ASYNC;
     protected int[][] states;
@@ -516,14 +516,14 @@
     }
 
 
-    public synchronized Marshaler getMarshaler() {
+    public synchronized PojoMarshaler getMarshaler() {
         if (marshaler == null) {
             marshaler = new DefaultMarshaler();
         }
         return marshaler;
     }
 
-    public void setMarshaler(Marshaler marshaler) {
+    public void setMarshaler(PojoMarshaler marshaler) {
         this.marshaler = marshaler;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/NormalizedMessageImpl.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/NormalizedMessageImpl.java?rev=357691&r1=357690&r2=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/NormalizedMessageImpl.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/NormalizedMessageImpl.java
Mon Dec 19 05:50:20 2005
@@ -224,7 +224,7 @@
         setContent(new StringSource(xml));
     }
 
-    public  Marshaler getMarshaler() {
+    public  PojoMarshaler getMarshaler() {
         return exchange.getMarshaler();
     }
 

Copied: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/PojoMarshaler.java
(from r357683, incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/Marshaler.java)
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/PojoMarshaler.java?p2=incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/PojoMarshaler.java&p1=incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/Marshaler.java&r1=357683&r2=357691&rev=357691&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/Marshaler.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/jbi/messaging/PojoMarshaler.java
Mon Dec 19 05:50:20 2005
@@ -24,14 +24,15 @@
 import javax.jbi.messaging.NormalizedMessage;
 
 /**
- * A plugin strategy which marshals an Object into and out of a JBI message
+ * A plugin strategy which marshals an Object into and out of a JBI message.
+ * This interface is used by the ServiceMixClient to marshal POJOs into and out of JBI messages.
  *
  * @version $Revision$
  */
-public interface Marshaler {
+public interface PojoMarshaler {
 
     /**
-     * The key on the message to store the message body which cannot be marshalled into or
out of XML easily
+     * The key on the message to store the message body which cannot be marshaled into or
out of XML easily
      * or to provide a cache of the object representation of the object.
      */
     String BODY = "org.servicemix.body";



Mime
View raw message