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 2015/05/05 16:46:29 UTC
[2/2] 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/0b541c17
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0b541c17
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0b541c17
Branch: refs/heads/master
Commit: 0b541c17ceafaae00cf186072826fed960a3a52b
Parents: 8f27983
Author: Claus Ibsen <da...@apache.org>
Authored: Tue May 5 16:50:15 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue May 5 16:50:15 2015 +0200
----------------------------------------------------------------------
.../component/jt400/Jt400Configuration.java | 43 ++++++-------
.../camel/component/krati/KratiConstants.java | 2 +-
.../camel/component/krati/KratiEndpoint.java | 63 +++++++++++++++++---
3 files changed, 73 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0b541c17/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
----------------------------------------------------------------------
diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
index 598f422..18d67d1 100644
--- a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
+++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
@@ -152,14 +152,15 @@ public class Jt400Configuration {
return type;
}
+ /**
+ * Whether to work with data queues or remote program call
+ */
public void setType(Jt400Type type) {
this.type = type;
}
/**
* Returns the name of the AS/400 system.
- *
- * @return the name of the AS/400 system
*/
public String getSystemName() {
return systemName;
@@ -171,8 +172,6 @@ public class Jt400Configuration {
/**
* Returns the ID of the AS/400 user.
- *
- * @return the ID of the AS/400 user
*/
public String getUserID() {
return userID;
@@ -184,8 +183,6 @@ public class Jt400Configuration {
/**
* Returns the password of the AS/400 user.
- *
- * @return the password of the AS/400 user
*/
public String getPassword() {
return password;
@@ -198,9 +195,6 @@ public class Jt400Configuration {
/**
* Returns the fully qualified integrated file system path name of the
* target object of this endpoint.
- *
- * @return the fully qualified integrated file system path name of the
- * target object of this endpoint
*/
public String getObjectPath() {
return objectPath;
@@ -215,9 +209,6 @@ public class Jt400Configuration {
/**
* Returns the CCSID to use for the connection with the AS/400 system.
* Returns -1 if the CCSID to use is the default system CCSID.
- *
- * @return the CCSID to use for the connection with the AS/400 system, or -1
- * if that is the default system CCSID
*/
public int getCssid() {
return ccsid;
@@ -225,8 +216,6 @@ public class Jt400Configuration {
/**
* Sets the CCSID to use for the connection with the AS/400 system.
- *
- * @param ccsid the CCSID to use for the connection with the AS/400 system
*/
public void setCcsid(int ccsid) {
this.ccsid = (ccsid < 0) ? DEFAULT_SYSTEM_CCSID : ccsid;
@@ -234,8 +223,6 @@ public class Jt400Configuration {
/**
* Returns the data format for sending messages.
- *
- * @return the data format for sending messages
*/
public Format getFormat() {
return format;
@@ -243,9 +230,6 @@ public class Jt400Configuration {
/**
* Sets the data format for sending messages.
- *
- * @param format the data format for sending messages
- * @throws IllegalArgumentException if {@code format} is null
*/
public void setFormat(Format format) {
ObjectHelper.notNull(format, "format", this);
@@ -255,9 +239,6 @@ public class Jt400Configuration {
/**
* Returns whether AS/400 prompting is enabled in the environment running
* Camel.
- *
- * @return whether AS/400 prompting is enabled in the environment running
- * Camel
*/
public boolean isGuiAvailable() {
return guiAvailable;
@@ -266,9 +247,6 @@ public class Jt400Configuration {
/**
* Sets whether AS/400 prompting is enabled in the environment running
* Camel.
- *
- * @param guiAvailable whether AS/400 prompting is enabled in the
- * environment running Camel
*/
public void setGuiAvailable(boolean guiAvailable) {
this.guiAvailable = guiAvailable;
@@ -282,6 +260,9 @@ public class Jt400Configuration {
return keyed;
}
+ /**
+ * Whether to use keyed or non-keyed data queues.
+ */
public void setKeyed(boolean keyed) {
this.keyed = keyed;
}
@@ -290,6 +271,9 @@ public class Jt400Configuration {
return searchKey;
}
+ /**
+ * Search key for keyed data queues.
+ */
public void setSearchKey(String searchKey) {
this.searchKey = searchKey;
}
@@ -298,6 +282,9 @@ public class Jt400Configuration {
return searchType;
}
+ /**
+ * Search type such as EQ for equal etc.
+ */
public void setSearchType(SearchType searchType) {
this.searchType = searchType;
}
@@ -306,6 +293,9 @@ public class Jt400Configuration {
return outputFieldsIdxArray;
}
+ /**
+ * Specifies which fields (program parameters) are output parameters.
+ */
public void setOutputFieldsIdxArray(Integer[] outputFieldsIdxArray) {
this.outputFieldsIdxArray = outputFieldsIdxArray;
}
@@ -314,6 +304,9 @@ public class Jt400Configuration {
return outputFieldsLengthArray;
}
+ /**
+ * Specifies the fields (program parameters) length as in the AS/400 program definition.
+ */
public void setOutputFieldsLengthArray(Integer[] outputFieldsLengthArray) {
this.outputFieldsLengthArray = outputFieldsLengthArray;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0b541c17/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiConstants.java b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiConstants.java
index 181cd71..6f8950b 100644
--- a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiConstants.java
+++ b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiConstants.java
@@ -28,7 +28,7 @@ public final class KratiConstants {
//Operation Types
public static final String KRATI_OPERATION = "CamelKratiOperation";
- public static final String KRATI_OPERATION_ADD = "CamelKratiAdd";
+ public static final String KRATI_OPERATION_PUT = "CamelKratiPut";
public static final String KRATI_OPERATION_UPDATE = "CamelKratiUpdate";
public static final String KRATI_OPERATION_DELETE = "CamelKratiDelete";
public static final String KRATI_OPERATION_DELETEALL = "CamelKratiDeleteAll";
http://git-wip-us.apache.org/repos/asf/camel/blob/0b541c17/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
index c5117d0..16a38be 100644
--- a/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
+++ b/components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
@@ -47,12 +47,12 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
@UriPath @Metadata(required = "true")
protected String path;
- @UriParam
+ @UriParam(label = "producer", enums = "CamelKratiPut,CamelKratiGet,CamelKratiDelete,CamelKratiDeleteAll")
+ protected String operation;
+ @UriParam(label = "producer")
protected String key;
- @UriParam
+ @UriParam(label = "producer")
protected String value;
- @UriParam
- protected String operation;
@UriParam(defaultValue = "100")
protected int initialCapacity = 100;
@UriParam(defaultValue = "64")
@@ -67,7 +67,7 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
protected SegmentFactory segmentFactory = new ChannelSegmentFactory();
@UriParam
protected HashFunction<byte[]> hashFunction = new FnvHashFunction();
- @UriParam
+ @UriParam(label = "consumer")
protected int maxMessagesPerPoll;
public KratiEndpoint(String uri, KratiComponent component) throws URISyntaxException {
@@ -117,12 +117,8 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return true;
}
-
/**
* Returns the path from the URI.
- *
- * @param uri
- * @return
*/
protected String getPath(String uri) throws URISyntaxException {
URI u = new URI(uri);
@@ -140,6 +136,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return key;
}
+ /**
+ * The key.
+ */
public void setKey(String key) {
this.key = key;
}
@@ -148,6 +147,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return value;
}
+ /**
+ * The Value.
+ */
public void setValue(String value) {
this.value = value;
}
@@ -156,6 +158,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return operation;
}
+ /**
+ * Specifies the type of operation that will be performed to the datastore.
+ */
public void setOperation(String operation) {
this.operation = operation;
}
@@ -164,6 +169,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return initialCapacity;
}
+ /**
+ * The inital capcity of the store.
+ */
public void setInitialCapacity(int initialCapacity) {
this.initialCapacity = initialCapacity;
}
@@ -172,6 +180,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return segmentFileSize;
}
+ /**
+ * Data store segments size in MB.
+ */
public void setSegmentFileSize(int segmentFileSize) {
this.segmentFileSize = segmentFileSize;
}
@@ -180,6 +191,9 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return segmentFactory;
}
+ /**
+ * Sets the segment factory of the target store.
+ */
public void setSegmentFactory(SegmentFactory segmentFactory) {
this.segmentFactory = segmentFactory;
}
@@ -188,10 +202,16 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return hashFunction;
}
+ /**
+ * The hash function to use.
+ */
public void setHashFunction(HashFunction<byte[]> hashFunction) {
this.hashFunction = hashFunction;
}
+ /**
+ * Path of the datastore is the relative path of the folder that krati will use for its datastore.
+ */
public String getPath() {
return path;
}
@@ -200,7 +220,32 @@ public class KratiEndpoint extends ScheduledPollEndpoint {
return maxMessagesPerPoll;
}
+ /**
+ * The maximum number of messages which can be received in one poll. This can be used to avoid reading in too much data and taking up too much memory.
+ */
public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
this.maxMessagesPerPoll = maxMessagesPerPoll;
}
+
+ public Serializer<Object> getKeySerializer() {
+ return keySerializer;
+ }
+
+ /**
+ * The serializer that will be used to serialize the key.
+ */
+ public void setKeySerializer(Serializer<Object> keySerializer) {
+ this.keySerializer = keySerializer;
+ }
+
+ public Serializer<Object> getValueSerializer() {
+ return valueSerializer;
+ }
+
+ /**
+ * The serializer that will be used to serialize the value.
+ */
+ public void setValueSerializer(Serializer<Object> valueSerializer) {
+ this.valueSerializer = valueSerializer;
+ }
}