You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/06 11:36:59 UTC

[09/11] camel git commit: Component docs

Component docs


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

Branch: refs/heads/master
Commit: 97b6a7934e05064ba3200939033b6e3e2324c546
Parents: 713dfa6
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 6 11:01:51 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jan 6 11:36:29 2016 +0100

----------------------------------------------------------------------
 .../camel/component/gae/auth/GAuthEndpoint.java |  2 +-
 .../component/gae/login/GLoginEndpoint.java     | 21 ++++-
 .../camel/component/gae/mail/GMailEndpoint.java |  2 +-
 .../camel/component/gae/task/GTaskEndpoint.java |  2 +-
 .../camel/component/hdfs/HdfsConfiguration.java | 16 ++--
 .../component/hdfs/HdfsWritableFactories.java   | 68 --------------
 .../camel/component/hdfs/WritableType.java      | 97 ++++++++++++++++++++
 .../component/hdfs2/HdfsConfiguration.java      | 16 ++--
 .../component/hdfs2/HdfsWritableFactories.java  | 68 --------------
 .../camel/component/hdfs2/WritableType.java     | 97 ++++++++++++++++++++
 .../camel/component/ibatis/IBatisEndpoint.java  | 42 +++++++++
 11 files changed, 274 insertions(+), 157 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthEndpoint.java
index 5e4f9ff..6ae5d7f 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthEndpoint.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthEndpoint.java
@@ -46,7 +46,7 @@ import org.apache.camel.spi.UriPath;
  * endpoint URIs are <code>gauth:authorize</code> and <code>gauth:upgrade</code>
  * , respectively.
  */
-@UriEndpoint(scheme = "gauth", title = "Google GAuth", syntax = "gauth:name", producerOnly = true, label = "cloud,paas")
+@UriEndpoint(scheme = "gauth", title = "Google GAuth", syntax = "gauth:name", producerOnly = true, label = "cloud,paas", excludeProperties = "httpUri")
 public class GAuthEndpoint  extends DefaultEndpoint {
 
     public static enum Name {

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
index cfc3f23..4b7fe7a 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/login/GLoginEndpoint.java
@@ -30,10 +30,11 @@ import org.apache.camel.spi.UriPath;
 /**
  * The glogin component is used by Camel applications outside Google App Engine (GAE) for programmatic login to GAE applications.
  */
-@UriEndpoint(scheme = "glogin", title = "Google Login", syntax = "glogin:hostName", producerOnly = true, label = "cloud,paas")
+@UriEndpoint(scheme = "glogin", title = "Google Login", syntax = "glogin:hostName", producerOnly = true, label = "cloud,paas", excludeProperties = "httpUri")
 public class GLoginEndpoint extends DefaultEndpoint {
 
     private OutboundBinding<GLoginEndpoint, GLoginData, GLoginData> outboundBinding;
+    private GLoginService service;
 
     @UriPath @Metadata(required = "true")
     private String hostName;
@@ -49,7 +50,9 @@ public class GLoginEndpoint extends DefaultEndpoint {
     private boolean devAdmin;
     @UriParam
     private boolean devMode;
-    private GLoginService service;
+    @UriParam
+    private String serviceRef;
+
 
     /**
      * Creates a new GLoginEndpoint.
@@ -175,6 +178,20 @@ public class GLoginEndpoint extends DefaultEndpoint {
         this.service = service;
     }
 
+    public String getServiceRef() {
+        return serviceRef;
+    }
+
+    /**
+     * A reference name to lookup a {@link GLoginService} from the registry.
+     * <p/>
+     * The GloginService the service that makes the remote calls to Google services or the
+     * local development server.
+     */
+    public void setServiceRef(String serviceRef) {
+        this.serviceRef = serviceRef;
+    }
+
     /**
      * Creates a {@link GLoginProducer}.
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
index 246711c..e2ed498 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/mail/GMailEndpoint.java
@@ -35,7 +35,7 @@ import org.apache.camel.spi.UriPath;
 /**
  * The gmail component is used for sending emails to GAE.
  */
-@UriEndpoint(scheme = "gmail", title = "Google mail", syntax = "gmail:sender", producerOnly = true, label = "cloud,mail,paas")
+@UriEndpoint(scheme = "gmail", title = "Google mail", syntax = "gmail:sender", producerOnly = true, label = "cloud,mail,paas", excludeProperties = "httpUri")
 public class GMailEndpoint extends DefaultEndpoint implements OutboundBindingSupport<GMailEndpoint, Message, Void> {
 
     private OutboundBinding<GMailEndpoint, Message, Void> outboundBinding;

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskEndpoint.java b/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskEndpoint.java
index 2128711..83c1f38 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskEndpoint.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskEndpoint.java
@@ -42,7 +42,7 @@ import org.apache.camel.spi.UriPath;
  * The gtask component is used for sending messages to GAE task queue service.
  */
 @UriEndpoint(scheme = "gtask", extendsScheme = "servlet", title = "Google Task",
-        syntax = "gtask:queueName", producerOnly = true, label = "cloud,paas")
+        syntax = "gtask:queueName", producerOnly = true, label = "cloud,paas", excludeProperties = "httpUri")
 public class GTaskEndpoint extends ServletEndpoint implements OutboundBindingSupport<GTaskEndpoint, TaskOptions, Void> {
 
     private OutboundBinding<GTaskEndpoint, TaskOptions, Void> outboundBinding;

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
index 0a0bc86..e663d74 100644
--- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsConfiguration.java
@@ -63,9 +63,9 @@ public class HdfsConfiguration {
     @UriParam(defaultValue = "HDFS")
     private HdfsFileSystemType fileSystemType = HdfsFileSystemType.HDFS;
     @UriParam(defaultValue = "NULL")
-    private HdfsWritableFactories.WritableType keyType = HdfsWritableFactories.WritableType.NULL;
+    private WritableType keyType = WritableType.NULL;
     @UriParam(defaultValue = "BYTES")
-    private HdfsWritableFactories.WritableType valueType = HdfsWritableFactories.WritableType.BYTES;
+    private WritableType valueType = WritableType.BYTES;
     @UriParam(defaultValue = HdfsConstants.DEFAULT_OPENED_SUFFIX)
     private String openedSuffix = HdfsConstants.DEFAULT_OPENED_SUFFIX;
     @UriParam(defaultValue = HdfsConstants.DEFAULT_READ_SUFFIX)
@@ -138,10 +138,10 @@ public class HdfsConfiguration {
         }
     }
 
-    private HdfsWritableFactories.WritableType getWritableType(Map<String, Object> hdfsSettings, String param, HdfsWritableFactories.WritableType dflt) {
+    private WritableType getWritableType(Map<String, Object> hdfsSettings, String param, WritableType dflt) {
         String eit = (String) hdfsSettings.get(param);
         if (eit != null) {
-            return HdfsWritableFactories.WritableType.valueOf(eit);
+            return WritableType.valueOf(eit);
         } else {
             return dflt;
         }
@@ -388,25 +388,25 @@ public class HdfsConfiguration {
         return fileSystemType;
     }
 
-    public HdfsWritableFactories.WritableType getKeyType() {
+    public WritableType getKeyType() {
         return keyType;
     }
 
     /**
      * The type for the key in case of sequence or map files.
      */
-    public void setKeyType(HdfsWritableFactories.WritableType keyType) {
+    public void setKeyType(WritableType keyType) {
         this.keyType = keyType;
     }
 
-    public HdfsWritableFactories.WritableType getValueType() {
+    public WritableType getValueType() {
         return valueType;
     }
 
     /**
      * The type for the key in case of sequence or map files
      */
-    public void setValueType(HdfsWritableFactories.WritableType valueType) {
+    public void setValueType(WritableType valueType) {
         this.valueType = valueType;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
index d97c607..cd0c73f 100644
--- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsWritableFactories.java
@@ -39,74 +39,6 @@ import org.apache.hadoop.io.WritableComparable;
 
 public class HdfsWritableFactories {
 
-    public enum WritableType {
-        NULL {
-            @Override
-            public Class<NullWritable> getWritableClass() {
-                return NullWritable.class;
-            }
-        },
-
-        BOOLEAN {
-            @Override
-            public Class<BooleanWritable> getWritableClass() {
-                return BooleanWritable.class;
-            }
-        },
-
-        BYTE {
-            @Override
-            public Class<ByteWritable> getWritableClass() {
-                return ByteWritable.class;
-            }
-        },
-
-        INT {
-            @Override
-            public Class<IntWritable> getWritableClass() {
-                return IntWritable.class;
-            }
-        },
-
-        FLOAT {
-            @Override
-            public Class<FloatWritable> getWritableClass() {
-                return FloatWritable.class;
-            }
-        },
-
-        LONG {
-            @Override
-            public Class<LongWritable> getWritableClass() {
-                return LongWritable.class;
-            }
-        },
-
-        DOUBLE {
-            @Override
-            public Class<DoubleWritable> getWritableClass() {
-                return DoubleWritable.class;
-            }
-        },
-
-        TEXT {
-            @Override
-            public Class<Text> getWritableClass() {
-                return Text.class;
-            }
-        },
-
-        BYTES {
-            @Override
-            public Class<BytesWritable> getWritableClass() {
-                return BytesWritable.class;
-            }
-        };
-
-        @SuppressWarnings("rawtypes")
-        public abstract Class<? extends WritableComparable> getWritableClass();
-    }
-
     interface HdfsWritableFactory {
 
         Writable create(Object value, TypeConverter typeConverter, Holder<Integer> size);

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/WritableType.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/WritableType.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/WritableType.java
new file mode 100644
index 0000000..607de5f
--- /dev/null
+++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/WritableType.java
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hdfs;
+
+import org.apache.hadoop.io.BooleanWritable;
+import org.apache.hadoop.io.ByteWritable;
+import org.apache.hadoop.io.BytesWritable;
+import org.apache.hadoop.io.DoubleWritable;
+import org.apache.hadoop.io.FloatWritable;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.WritableComparable;
+
+public enum WritableType {
+
+    NULL {
+        @Override
+        public Class<NullWritable> getWritableClass() {
+            return NullWritable.class;
+        }
+    },
+
+    BOOLEAN {
+        @Override
+        public Class<BooleanWritable> getWritableClass() {
+            return BooleanWritable.class;
+        }
+    },
+
+    BYTE {
+        @Override
+        public Class<ByteWritable> getWritableClass() {
+            return ByteWritable.class;
+        }
+    },
+
+    INT {
+        @Override
+        public Class<IntWritable> getWritableClass() {
+            return IntWritable.class;
+        }
+    },
+
+    FLOAT {
+        @Override
+        public Class<FloatWritable> getWritableClass() {
+            return FloatWritable.class;
+        }
+    },
+
+    LONG {
+        @Override
+        public Class<LongWritable> getWritableClass() {
+            return LongWritable.class;
+        }
+    },
+
+    DOUBLE {
+        @Override
+        public Class<DoubleWritable> getWritableClass() {
+            return DoubleWritable.class;
+        }
+    },
+
+    TEXT {
+        @Override
+        public Class<Text> getWritableClass() {
+            return Text.class;
+        }
+    },
+
+    BYTES {
+        @Override
+        public Class<BytesWritable> getWritableClass() {
+            return BytesWritable.class;
+        }
+    };
+
+    @SuppressWarnings("rawtypes")
+    public abstract Class<? extends WritableComparable> getWritableClass();
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
index c673aa2..01b5680 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsConfiguration.java
@@ -63,9 +63,9 @@ public class HdfsConfiguration {
     @UriParam(defaultValue = "HDFS")
     private HdfsFileSystemType fileSystemType = HdfsFileSystemType.HDFS;
     @UriParam(defaultValue = "NULL")
-    private HdfsWritableFactories.WritableType keyType = HdfsWritableFactories.WritableType.NULL;
+    private WritableType keyType = WritableType.NULL;
     @UriParam(defaultValue = "BYTES")
-    private HdfsWritableFactories.WritableType valueType = HdfsWritableFactories.WritableType.BYTES;
+    private WritableType valueType = WritableType.BYTES;
     @UriParam(defaultValue = HdfsConstants.DEFAULT_OPENED_SUFFIX)
     private String openedSuffix = HdfsConstants.DEFAULT_OPENED_SUFFIX;
     @UriParam(defaultValue = HdfsConstants.DEFAULT_READ_SUFFIX)
@@ -138,10 +138,10 @@ public class HdfsConfiguration {
         }
     }
 
-    private HdfsWritableFactories.WritableType getWritableType(Map<String, Object> hdfsSettings, String param, HdfsWritableFactories.WritableType dflt) {
+    private WritableType getWritableType(Map<String, Object> hdfsSettings, String param, WritableType dflt) {
         String eit = (String) hdfsSettings.get(param);
         if (eit != null) {
-            return HdfsWritableFactories.WritableType.valueOf(eit);
+            return WritableType.valueOf(eit);
         } else {
             return dflt;
         }
@@ -388,25 +388,25 @@ public class HdfsConfiguration {
         return fileSystemType;
     }
 
-    public HdfsWritableFactories.WritableType getKeyType() {
+    public WritableType getKeyType() {
         return keyType;
     }
 
     /**
      * The type for the key in case of sequence or map files.
      */
-    public void setKeyType(HdfsWritableFactories.WritableType keyType) {
+    public void setKeyType(WritableType keyType) {
         this.keyType = keyType;
     }
 
-    public HdfsWritableFactories.WritableType getValueType() {
+    public WritableType getValueType() {
         return valueType;
     }
 
     /**
      * The type for the key in case of sequence or map files
      */
-    public void setValueType(HdfsWritableFactories.WritableType valueType) {
+    public void setValueType(WritableType valueType) {
         this.valueType = valueType;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsWritableFactories.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsWritableFactories.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsWritableFactories.java
index be7ecf0..51bd87e 100644
--- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsWritableFactories.java
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsWritableFactories.java
@@ -39,74 +39,6 @@ import org.apache.hadoop.io.WritableComparable;
 
 public class HdfsWritableFactories {
 
-    public enum WritableType {
-        NULL {
-            @Override
-            public Class<NullWritable> getWritableClass() {
-                return NullWritable.class;
-            }
-        },
-
-        BOOLEAN {
-            @Override
-            public Class<BooleanWritable> getWritableClass() {
-                return BooleanWritable.class;
-            }
-        },
-
-        BYTE {
-            @Override
-            public Class<ByteWritable> getWritableClass() {
-                return ByteWritable.class;
-            }
-        },
-
-        INT {
-            @Override
-            public Class<IntWritable> getWritableClass() {
-                return IntWritable.class;
-            }
-        },
-
-        FLOAT {
-            @Override
-            public Class<FloatWritable> getWritableClass() {
-                return FloatWritable.class;
-            }
-        },
-
-        LONG {
-            @Override
-            public Class<LongWritable> getWritableClass() {
-                return LongWritable.class;
-            }
-        },
-
-        DOUBLE {
-            @Override
-            public Class<DoubleWritable> getWritableClass() {
-                return DoubleWritable.class;
-            }
-        },
-
-        TEXT {
-            @Override
-            public Class<Text> getWritableClass() {
-                return Text.class;
-            }
-        },
-
-        BYTES {
-            @Override
-            public Class<BytesWritable> getWritableClass() {
-                return BytesWritable.class;
-            }
-        };
-
-        @SuppressWarnings("rawtypes")
-        public abstract Class<? extends WritableComparable> getWritableClass();
-    }
-
     interface HdfsWritableFactory {
 
         Writable create(Object value, TypeConverter typeConverter, Holder<Integer> size);

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/WritableType.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/WritableType.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/WritableType.java
new file mode 100644
index 0000000..24efeee
--- /dev/null
+++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/WritableType.java
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hdfs2;
+
+import org.apache.hadoop.io.BooleanWritable;
+import org.apache.hadoop.io.ByteWritable;
+import org.apache.hadoop.io.BytesWritable;
+import org.apache.hadoop.io.DoubleWritable;
+import org.apache.hadoop.io.FloatWritable;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.WritableComparable;
+
+public enum WritableType {
+
+    NULL {
+        @Override
+        public Class<NullWritable> getWritableClass() {
+            return NullWritable.class;
+        }
+    },
+
+    BOOLEAN {
+        @Override
+        public Class<BooleanWritable> getWritableClass() {
+            return BooleanWritable.class;
+        }
+    },
+
+    BYTE {
+        @Override
+        public Class<ByteWritable> getWritableClass() {
+            return ByteWritable.class;
+        }
+    },
+
+    INT {
+        @Override
+        public Class<IntWritable> getWritableClass() {
+            return IntWritable.class;
+        }
+    },
+
+    FLOAT {
+        @Override
+        public Class<FloatWritable> getWritableClass() {
+            return FloatWritable.class;
+        }
+    },
+
+    LONG {
+        @Override
+        public Class<LongWritable> getWritableClass() {
+            return LongWritable.class;
+        }
+    },
+
+    DOUBLE {
+        @Override
+        public Class<DoubleWritable> getWritableClass() {
+            return DoubleWritable.class;
+        }
+    },
+
+    TEXT {
+        @Override
+        public Class<Text> getWritableClass() {
+            return Text.class;
+        }
+    },
+
+    BYTES {
+        @Override
+        public Class<BytesWritable> getWritableClass() {
+            return BytesWritable.class;
+        }
+    };
+
+    @SuppressWarnings("rawtypes")
+    public abstract Class<? extends WritableComparable> getWritableClass();
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/97b6a793/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisEndpoint.java b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisEndpoint.java
index 14370be..c99feed 100644
--- a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisEndpoint.java
+++ b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisEndpoint.java
@@ -49,6 +49,12 @@ public class IBatisEndpoint extends DefaultPollingEndpoint {
     @UriParam(defaultValue = "TRANSACTION_REPEATABLE_READ",
               enums = "TRANSACTION_NONE,TRANSACTION_READ_UNCOMMITTED,TRANSACTION_READ_COMMITTED,TRANSACTION_REPEATABLE_READ,TRANSACTION_SERIALIZABLE")
     private String isolation;
+    @UriParam(label = "consumer", optionalPrefix = "consumer.")
+    private String onConsume;
+    @UriParam(label = "consumer", optionalPrefix = "consumer.", defaultValue = "true")
+    private boolean useIterator = true;
+    @UriParam(label = "consumer", optionalPrefix = "consumer.")
+    private boolean routeEmptyResultSet;
 
     public IBatisEndpoint() {
     }
@@ -77,6 +83,9 @@ public class IBatisEndpoint extends DefaultPollingEndpoint {
     public IBatisConsumer createConsumer(Processor processor) throws Exception {
         IBatisConsumer consumer = new IBatisConsumer(this, processor);
         consumer.setMaxMessagesPerPoll(getMaxMessagesPerPoll());
+        consumer.setOnConsume(getOnConsume());
+        consumer.setUseIterator(isUseIterator());
+        consumer.setRouteEmptyResultSet(isRouteEmptyResultSet());
         configureConsumer(consumer);
         return consumer;
     }
@@ -156,6 +165,39 @@ public class IBatisEndpoint extends DefaultPollingEndpoint {
         this.isolation = isolation;
     }
 
+    public String getOnConsume() {
+        return onConsume;
+    }
+
+    /**
+     * Statement to run after data has been processed in the route
+     */
+    public void setOnConsume(String onConsume) {
+        this.onConsume = onConsume;
+    }
+
+    public boolean isUseIterator() {
+        return useIterator;
+    }
+
+    /**
+     * Process resultset individually or as a list
+     */
+    public void setUseIterator(boolean useIterator) {
+        this.useIterator = useIterator;
+    }
+
+    public boolean isRouteEmptyResultSet() {
+        return routeEmptyResultSet;
+    }
+
+    /**
+     * Whether allow empty resultset to be routed to the next hop
+     */
+    public void setRouteEmptyResultSet(boolean routeEmptyResultSet) {
+        this.routeEmptyResultSet = routeEmptyResultSet;
+    }
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();