camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [7/8] camel git commit: CAMEL-9157: JMX - Add dataformat as mbean category
Date Thu, 24 Sep 2015 11:36:20 GMT
CAMEL-9157: JMX - Add dataformat as mbean category


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/73e46319
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/73e46319
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/73e46319

Branch: refs/heads/master
Commit: 73e463199c8f37d7efbe65eb107cb55203296820
Parents: 4c650d4
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Sep 24 13:34:35 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Sep 24 13:34:35 2015 +0200

----------------------------------------------------------------------
 .../dataformat/xstream/AbstractXStreamWrapper.java     | 13 ++++++++++++-
 .../camel/dataformat/zipfile/ZipFileDataFormat.java    | 12 +++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/73e46319/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
----------------------------------------------------------------------
diff --git a/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
b/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
index 2981f66..8b51a4b 100644
--- a/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
+++ b/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
@@ -38,13 +38,14 @@ import org.apache.camel.Exchange;
 import org.apache.camel.converter.jaxp.StaxConverter;
 import org.apache.camel.spi.ClassResolver;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.support.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
 
 /**
  * An abstract class which implement <a href="http://camel.apache.org/data-format.html">data
format</a>
  * ({@link DataFormat}) interface which leverage the XStream library for XML or JSON's marshaling
and unmarshaling
  */
-public abstract class AbstractXStreamWrapper implements DataFormat {
+public abstract class AbstractXStreamWrapper extends ServiceSupport implements DataFormat
{
 
     private XStream xstream;
     private HierarchicalStreamDriver xstreamDriver;
@@ -289,4 +290,14 @@ public abstract class AbstractXStreamWrapper implements DataFormat {
 
     protected abstract HierarchicalStreamReader createHierarchicalStreamReader(
             Exchange exchange, InputStream stream) throws XMLStreamException;
+
+    @Override
+    protected void doStart() throws Exception {
+        // noop
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        // noop
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/73e46319/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormat.java
b/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormat.java
index 884c608..4427650 100644
--- a/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormat.java
+++ b/components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormat.java
@@ -26,6 +26,7 @@ import java.util.zip.ZipOutputStream;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.support.ServiceSupport;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.StringHelper;
 
@@ -35,7 +36,7 @@ import static org.apache.camel.Exchange.FILE_NAME;
  * Zip file data format.
  * See {@link org.apache.camel.model.dataformat.ZipDataFormat} for "deflate" compression.
  */
-public class ZipFileDataFormat implements DataFormat {
+public class ZipFileDataFormat extends ServiceSupport implements DataFormat {
     private boolean usingIterator;
     
     public void setUsingIterator(boolean usingIterator) {
@@ -97,4 +98,13 @@ public class ZipFileDataFormat implements DataFormat {
         }
     }
 
+    @Override
+    protected void doStart() throws Exception {
+        // noop
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        // noop
+    }
 }


Mime
View raw message