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/04/24 14:10:42 UTC

[1/6] camel git commit: Component doc

Repository: camel
Updated Branches:
  refs/heads/master c86c2f11f -> 654bd8fea


Component doc


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

Branch: refs/heads/master
Commit: 4f283d1d1abdcdd9e1da4baf61e028c2248cb537
Parents: c86c2f1
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 13:29:53 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 13:29:53 2015 +0200

----------------------------------------------------------------------
 .../apache/camel/component/stomp/StompComponent.java    | 12 ++++++++++++
 .../camel/component/stomp/StompConfiguration.java       | 12 +++++++++++-
 .../org/apache/camel/component/stomp/StompEndpoint.java |  2 +-
 3 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4f283d1d/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
index f8468e4..03459b3 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
@@ -48,18 +48,30 @@ public class StompComponent extends UriEndpointComponent {
         return configuration;
     }
 
+    /**
+     * To use the shared stomp configuration
+     */
     public void setConfiguration(StompConfiguration configuration) {
         this.configuration = configuration;
     }
 
+    /**
+     * The URI of the Stomp broker to connect to
+     */
     public void setBrokerURL(String brokerURL) {
         getConfiguration().setBrokerURL(brokerURL);
     }
 
+    /**
+     * The username
+     */
     public void setLogin(String login) {
         getConfiguration().setLogin(login);
     }
 
+    /**
+     * The password
+     */
     public void setPasscode(String passcode) {
         getConfiguration().setPasscode(passcode);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/4f283d1d/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
index 00b7fc8..72c1224 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
@@ -17,13 +17,14 @@
 package org.apache.camel.component.stomp;
 
 import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 
 @UriParams
 public class StompConfiguration implements Cloneable {
 
-    @UriParam(defaultValue = "tcp://localhost:61613")
+    @UriParam(defaultValue = "tcp://localhost:61613") @Metadata(required = "true")
     private String brokerURL = "tcp://localhost:61613";
     @UriParam
     private String login;
@@ -46,6 +47,9 @@ public class StompConfiguration implements Cloneable {
         return brokerURL;
     }
 
+    /**
+     * The URI of the Stomp broker to connect to
+     */
     public void setBrokerURL(String brokerURL) {
         this.brokerURL = brokerURL;
     }
@@ -54,6 +58,9 @@ public class StompConfiguration implements Cloneable {
         return login;
     }
 
+    /**
+     * The username
+     */
     public void setLogin(String login) {
         this.login = login;
     }
@@ -62,6 +69,9 @@ public class StompConfiguration implements Cloneable {
         return passcode;
     }
 
+    /**
+     * The password
+     */
     public void setPasscode(String passcode) {
         this.passcode = passcode;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/4f283d1d/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
index 17600e4..2682ae3 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
@@ -48,7 +48,7 @@ import static org.fusesource.stomp.client.Constants.UNSUBSCRIBE;
 @UriEndpoint(scheme = "stomp", title = "Stomp", syntax = "stomp:destination", consumerClass = StompConsumer.class, label = "messaging")
 public class StompEndpoint extends DefaultEndpoint {
 
-    @UriPath @Metadata(required = "true")
+    @UriPath(description = "Name of the queue") @Metadata(required = "true")
     private String destination;
     @UriParam
     private StompConfiguration configuration;


[2/6] camel git commit: Component doc

Posted by da...@apache.org.
Component doc


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

Branch: refs/heads/master
Commit: 525b56b7321004d99d18e25bce0a70da38921079
Parents: 4f283d1
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 13:38:49 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 13:38:49 2015 +0200

----------------------------------------------------------------------
 .../camel/component/ssh/SshComponent.java       | 63 ++++++++++++++++++++
 .../camel/component/ssh/SshConfiguration.java   |  3 +-
 2 files changed, 65 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/525b56b7/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshComponent.java b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshComponent.java
index 5635ff2..3f45770 100644
--- a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshComponent.java
+++ b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshComponent.java
@@ -55,6 +55,9 @@ public class SshComponent extends UriEndpointComponent {
         return configuration;
     }
 
+    /**
+     * To use the shared SSH configuration
+     */
     public void setConfiguration(SshConfiguration configuration) {
         this.configuration = configuration;
     }
@@ -63,6 +66,11 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getHost();
     }
 
+    /**
+     * Sets the hostname of the remote SSH server.
+     *
+     * @param host String representing hostname of SSH server.
+     */
     public void setHost(String host) {
         getConfiguration().setHost(host);
     }
@@ -71,6 +79,11 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getPort();
     }
 
+    /**
+     * Sets the port number for the remote SSH server.
+     *
+     * @param port int representing port number on remote host. Defaults to 22.
+     */
     public void setPort(int port) {
         getConfiguration().setPort(port);
     }
@@ -79,6 +92,11 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getUsername();
     }
 
+    /**
+     * Sets the username to use in logging into the remote SSH server.
+     *
+     * @param username String representing login username.
+     */
     public void setUsername(String username) {
         getConfiguration().setUsername(username);
     }
@@ -87,6 +105,12 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getPassword();
     }
 
+    /**
+     * Sets the password to use in connecting to remote SSH server.
+     * Requires keyPairProvider to be set to null.
+     *
+     * @param password String representing password for username at remote host.
+     */
     public void setPassword(String password) {
         getConfiguration().setPassword(password);
     }
@@ -95,6 +119,13 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getPollCommand();
     }
 
+    /**
+     * Sets the command string to send to the remote SSH server during every poll cycle.
+     * Only works with camel-ssh component being used as a consumer, i.e. from("ssh://...").
+     * You may need to end your command with a newline, and that must be URL encoded %0A
+     *
+     * @param pollCommand String representing the command to send.
+     */
     public void setPollCommand(String pollCommand) {
         getConfiguration().setPollCommand(pollCommand);
     }
@@ -103,6 +134,14 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getKeyPairProvider();
     }
 
+    /**
+     * Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH Server.
+     *
+     * @param keyPairProvider KeyPairProvider reference to use in authenticating. If set to 'null',
+     *                        then will attempt to connect using username/password settings.
+     *
+     * @see KeyPairProvider
+     */
     public void setKeyPairProvider(KeyPairProvider keyPairProvider) {
         getConfiguration().setKeyPairProvider(keyPairProvider);
     }
@@ -111,6 +150,14 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getKeyType();
     }
 
+    /**
+     * Sets the key type to pass to the KeyPairProvider as part of authentication.
+     * KeyPairProvider.loadKey(...) will be passed this value. Defaults to "ssh-rsa".
+     *
+     * @param keyType String defining the type of KeyPair to use for authentication.
+     *
+     * @see KeyPairProvider
+     */
     public void setKeyType(String keyType) {
         getConfiguration().setKeyType(keyType);
     }
@@ -119,6 +166,12 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getTimeout();
     }
 
+    /**
+     * Sets the timeout in milliseconds to wait in establishing the remote SSH server connection.
+     * Defaults to 30000 milliseconds.
+     *
+     * @param timeout long milliseconds to wait.
+     */
     public void setTimeout(long timeout) {
         getConfiguration().setTimeout(timeout);
     }
@@ -126,13 +179,17 @@ public class SshComponent extends UriEndpointComponent {
     /**
      * @deprecated As of version 2.11, replaced by {@link #getCertResource()}
      */
+    @Deprecated
     public String getCertFilename() {
         return getConfiguration().getCertFilename();
     }
 
     /**
+     * Sets the resource path of the certificate to use for Authentication.
+     *
      * @deprecated As of version 2.11, replaced by {@link #setCertResource(String)}
      */
+    @Deprecated
     public void setCertFilename(String certFilename) {
         getConfiguration().setCertFilename(certFilename);
     }
@@ -141,6 +198,12 @@ public class SshComponent extends UriEndpointComponent {
         return getConfiguration().getCertResource();
     }
 
+    /**
+     * Sets the resource path of the certificate to use for Authentication.
+     * Will use {@link ResourceHelperKeyPairProvider} to resolve file based certificate, and depends on keyType setting.
+     *
+     * @param certResource String file, classpath, or http url for the certificate
+     */
     public void setCertResource(String certResource) {
         getConfiguration().setCertResource(certResource);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/525b56b7/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
index b172519..4d2921c 100644
--- a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
+++ b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/SshConfiguration.java
@@ -38,7 +38,7 @@ public class SshConfiguration implements Cloneable {
     private String username;
     @UriParam
     private String password;
-    @UriParam
+    @UriParam(label = "consumer")
     private String pollCommand;
     private KeyPairProvider keyPairProvider;
     @UriParam(defaultValue = KeyPairProvider.SSH_RSA)
@@ -148,6 +148,7 @@ public class SshConfiguration implements Cloneable {
     /**
      * Sets the command string to send to the remote SSH server during every poll cycle.
      * Only works with camel-ssh component being used as a consumer, i.e. from("ssh://...")
+     * You may need to end your command with a newline, and that must be URL encoded %0A
      *
      * @param pollCommand String representing the command to send.
      */


[3/6] camel git commit: Component doc

Posted by da...@apache.org.
Component doc


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

Branch: refs/heads/master
Commit: 429b354220b83721be260af54b7ec0c5d22d2184
Parents: 525b56b
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 13:50:23 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 13:50:23 2015 +0200

----------------------------------------------------------------------
 .../camel/component/xquery/XQueryComponent.java |  3 ++
 .../camel/component/xquery/XQueryEndpoint.java  | 36 ++++++++++++++++++++
 2 files changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/429b3542/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
index 2047c4d..0f3be86 100644
--- a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
+++ b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
@@ -54,6 +54,9 @@ public class XQueryComponent extends UriEndpointComponent {
         return moduleURIResolver;
     }
 
+    /**
+     * To use the custom {@link ModuleURIResolver}
+     */
     public void setModuleURIResolver(ModuleURIResolver moduleURIResolver) {
         this.moduleURIResolver = moduleURIResolver;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/429b3542/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryEndpoint.java b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryEndpoint.java
index 1a23db9..d38c89c 100644
--- a/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryEndpoint.java
+++ b/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryEndpoint.java
@@ -75,6 +75,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return resourceUri;
     }
 
+    /**
+     * The name of the template to load from classpath or file system
+     */
     public void setResourceUri(String resourceUri) {
         this.resourceUri = resourceUri;
     }
@@ -83,6 +86,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return configuration;
     }
 
+    /**
+     * To use a custom Saxon configuration
+     */
     public void setConfiguration(Configuration configuration) {
         this.configuration = configuration;
     }
@@ -91,6 +97,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return staticQueryContext;
     }
 
+    /**
+     * To use a custom Saxon StaticQueryContext
+     */
     public void setStaticQueryContext(StaticQueryContext staticQueryContext) {
         this.staticQueryContext = staticQueryContext;
     }
@@ -99,6 +108,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return parameters;
     }
 
+    /**
+     * Additional parameters
+     */
     public void setParameters(Map<String, Object> parameters) {
         this.parameters = parameters;
     }
@@ -107,6 +119,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return namespacePrefixes;
     }
 
+    /**
+     * Allows to control which namespace prefixes to use for a set of namespace mappings
+     */
     public void setNamespacePrefixes(Map<String, String> namespacePrefixes) {
         this.namespacePrefixes = namespacePrefixes;
     }
@@ -115,6 +130,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return resultsFormat;
     }
 
+    /**
+     * What output result to use
+     */
     public void setResultsFormat(ResultFormat resultsFormat) {
         this.resultsFormat = resultsFormat;
     }
@@ -123,6 +141,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return properties;
     }
 
+    /**
+     * Properties to configure the serialization parameters
+     */
     public void setProperties(Properties properties) {
         this.properties = properties;
     }
@@ -131,6 +152,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return resultType;
     }
 
+    /**
+     * What output result to use defined as a class
+     */
     public void setResultType(Class<?> resultType) {
         this.resultType = resultType;
     }
@@ -139,6 +163,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return stripsAllWhiteSpace;
     }
 
+    /**
+     * Whether to strip all whitespaces
+     */
     public void setStripsAllWhiteSpace(boolean stripsAllWhiteSpace) {
         this.stripsAllWhiteSpace = stripsAllWhiteSpace;
     }
@@ -147,6 +174,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return moduleURIResolver;
     }
 
+    /**
+     * To use the custom {@link ModuleURIResolver}
+     */
     public void setModuleURIResolver(ModuleURIResolver moduleURIResolver) {
         this.moduleURIResolver = moduleURIResolver;
     }
@@ -155,6 +185,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return allowStAX;
     }
 
+    /**
+     * Whether to allow using StAX mode
+     */
     public void setAllowStAX(boolean allowStAX) {
         this.allowStAX = allowStAX;
     }
@@ -163,6 +196,9 @@ public class XQueryEndpoint extends ProcessorEndpoint {
         return headerName;
     }
 
+    /**
+     * To use a Camel Message header as the input source instead of Message body.
+     */
     public void setHeaderName(String headerName) {
         this.headerName = headerName;
     }


[5/6] camel git commit: Component doc

Posted by da...@apache.org.
Component doc


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

Branch: refs/heads/master
Commit: 9f0ee1c3f578a69fb5164035d775e503cee42cd7
Parents: 9d9f2b3
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 14:07:03 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 14:07:03 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/bean/BeanEndpoint.java    | 11 ++++++-----
 .../org/apache/camel/component/ejb/EjbComponent.java     |  6 ++++++
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9f0ee1c3/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
index e6f01c1..1287483 100644
--- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanEndpoint.java
@@ -38,16 +38,17 @@ import org.apache.camel.spi.UriPath;
 public class BeanEndpoint extends DefaultEndpoint {
     private transient BeanHolder beanHolder;
     private transient BeanProcessor processor;
-    @UriPath @Metadata(required = "true")
+    @UriPath(description = "Sets the name of the bean to invoke") @Metadata(required = "true")
     private String beanName;
-    @UriParam
+    @UriParam(description = "If enabled, Camel will cache the result of the first Registry look-up. Cache can be enabled if the bean in the Registry is defined as a singleton scope.")
     private boolean cache;
-    @UriParam
+    @UriParam(description = "How to treat the parameters which are passed from the message body."
+            + "true means the message body should be an array of parameters. Note: This option is used internally by Camel, and is not intended for end users to use.")
     @Deprecated
     private boolean multiParameterArray;
-    @UriParam
+    @UriParam(description = "Sets the name of the method to invoke on the bean")
     private String method;
-    @UriParam
+    @UriParam(description = "Used for configuring additional properties on the bean")
     private Map<String, Object> parameters;
 
     public BeanEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/9f0ee1c3/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java b/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
index 0a06900..91ac608 100644
--- a/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
+++ b/components/camel-ejb/src/main/java/org/apache/camel/component/ejb/EjbComponent.java
@@ -60,6 +60,9 @@ public class EjbComponent extends BeanComponent {
         return context;
     }
 
+    /**
+     * The Context to use for looking up the EJBs
+     */
     public void setContext(Context context) {
         this.context = context;
     }
@@ -68,6 +71,9 @@ public class EjbComponent extends BeanComponent {
         return properties;
     }
 
+    /**
+     * Properties for creating javax.naming.Context if a context has not been configured.
+     */
     public void setProperties(Properties properties) {
         this.properties = properties;
     }


[6/6] camel git commit: Component doc

Posted by da...@apache.org.
Component doc


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

Branch: refs/heads/master
Commit: 654bd8fea0a5103a7b49ea87256eadf004942574
Parents: 9f0ee1c
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 14:13:23 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 14:13:23 2015 +0200

----------------------------------------------------------------------
 .../component/ganglia/GangliaComponent.java     |  3 ++
 .../component/ganglia/GangliaConfiguration.java | 46 ++++++++++++++++++++
 2 files changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/654bd8fe/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
index 1ebb9c6..fb2562f 100644
--- a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
+++ b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaComponent.java
@@ -53,6 +53,9 @@ public class GangliaComponent extends UriEndpointComponent {
         return configuration;
     }
 
+    /**
+     * To use the shared configuration
+     */
     public void setConfiguration(GangliaConfiguration configuration) {
         this.configuration = configuration;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/654bd8fe/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaConfiguration.java b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaConfiguration.java
index 39b79f4..6da1412 100644
--- a/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaConfiguration.java
+++ b/components/camel-ganglia/src/main/java/org/apache/camel/component/ganglia/GangliaConfiguration.java
@@ -120,6 +120,9 @@ public class GangliaConfiguration implements Cloneable {
         return host;
     }
 
+    /**
+     * Host name for Ganglia server
+     */
     public void setHost(String host) {
         this.host = host;
     }
@@ -128,6 +131,9 @@ public class GangliaConfiguration implements Cloneable {
         return port;
     }
 
+    /**
+     * Port for Ganglia server
+     */
     public void setPort(int port) {
         this.port = port;
     }
@@ -136,6 +142,9 @@ public class GangliaConfiguration implements Cloneable {
         return mode;
     }
 
+    /**
+     * Send the UDP metric packets using MULTICAST or UNICAST
+     */
     public void setMode(GMetric.UDPAddressingMode mode) {
         this.mode = mode;
     }
@@ -144,6 +153,9 @@ public class GangliaConfiguration implements Cloneable {
         return ttl;
     }
 
+    /**
+     * If using multicast, set the TTL of the packets
+     */
     public void setTtl(int ttl) {
         this.ttl = ttl;
     }
@@ -152,6 +164,9 @@ public class GangliaConfiguration implements Cloneable {
         return wireFormat31x;
     }
 
+    /**
+     * Use the wire format of Ganglia 3.1.0 and later versions.  Set this to false to use Ganglia 3.0.x or earlier.
+     */
     public void setWireFormat31x(boolean wireFormat31x) {
         this.wireFormat31x = wireFormat31x;
     }
@@ -160,6 +175,9 @@ public class GangliaConfiguration implements Cloneable {
         return spoofHostname;
     }
 
+    /**
+     * Spoofing information IP:hostname
+     */
     public void setSpoofHostname(String spoofHostname) {
         this.spoofHostname = spoofHostname;
     }
@@ -168,6 +186,9 @@ public class GangliaConfiguration implements Cloneable {
         return groupName;
     }
 
+    /**
+     * The group that the metric belongs to.
+     */
     public void setGroupName(String groupName) {
         this.groupName = groupName;
     }
@@ -176,6 +197,9 @@ public class GangliaConfiguration implements Cloneable {
         return prefix;
     }
 
+    /**
+     * Prefix the metric name with this string and an underscore.
+     */
     public void setPrefix(String prefix) {
         this.prefix = prefix;
     }
@@ -184,6 +208,9 @@ public class GangliaConfiguration implements Cloneable {
         return metricName;
     }
 
+    /**
+     * The name to use for the metric.
+     */
     public void setMetricName(String metricName) {
         this.metricName = metricName;
     }
@@ -192,6 +219,9 @@ public class GangliaConfiguration implements Cloneable {
         return type;
     }
 
+    /**
+     * The type of value
+     */
     public void setType(GMetricType type) {
         this.type = type;
     }
@@ -200,6 +230,9 @@ public class GangliaConfiguration implements Cloneable {
         return slope;
     }
 
+    /**
+     * The slope
+     */
     public void setSlope(GMetricSlope slope) {
         this.slope = slope;
     }
@@ -208,6 +241,11 @@ public class GangliaConfiguration implements Cloneable {
         return units;
     }
 
+    /**
+     * Any unit of measurement that qualifies the metric, e.g. widgets, litres, bytes.
+     * Do not include a prefix such as k (kilo) or m (milli), other tools may scale the units later.
+     * The value should be unscaled.
+     */
     public void setUnits(String units) {
         this.units = units;
     }
@@ -220,6 +258,10 @@ public class GangliaConfiguration implements Cloneable {
         return tmax;
     }
 
+    /**
+     * Maximum time in seconds that the value can be considered current.
+     * After this, Ganglia considers the value to have expired.
+     */
     public void setTmax(int tmax) {
         this.tmax = tmax;
     }
@@ -228,6 +270,10 @@ public class GangliaConfiguration implements Cloneable {
         return dmax;
     }
 
+    /**
+     * Minumum time in seconds before Ganglia will purge the metric value if it expires.
+     * Set to 0 and the value will remain in Ganglia indefinitely until a gmond agent restart.
+     */
     public void setDmax(int dmax) {
         this.dmax = dmax;
     }


[4/6] camel git commit: Component doc

Posted by da...@apache.org.
Component doc


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

Branch: refs/heads/master
Commit: 9d9f2b3c47c4b138d6d3fc7b210ddd9c788a4c91
Parents: 429b354
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 24 14:00:00 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 24 14:00:00 2015 +0200

----------------------------------------------------------------------
 .../component/jgroups/CamelJGroupsReceiver.java |  2 +-
 .../component/jgroups/JGroupsComponent.java     | 18 +++++--
 .../component/jgroups/JGroupsEndpoint.java      | 54 ++++++++------------
 3 files changed, 34 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9d9f2b3c/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/CamelJGroupsReceiver.java
----------------------------------------------------------------------
diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/CamelJGroupsReceiver.java b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/CamelJGroupsReceiver.java
index 1fbbe7a..7233a8a 100644
--- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/CamelJGroupsReceiver.java
+++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/CamelJGroupsReceiver.java
@@ -49,7 +49,7 @@ public class CamelJGroupsReceiver extends ReceiverAdapter {
 
     @Override
     public void viewAccepted(View view) {
-        if (endpoint.isResolvedEnableViewMessages()) {
+        if (endpoint.isEnableViewMessages()) {
             Exchange exchange = endpoint.createExchange(view);
             try {
                 LOG.debug("Processing view: {}", view);

http://git-wip-us.apache.org/repos/asf/camel/blob/9d9f2b3c/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsComponent.java b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsComponent.java
index b7c906e..9096094 100644
--- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsComponent.java
+++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsComponent.java
@@ -28,10 +28,8 @@ import org.jgroups.Channel;
 public class JGroupsComponent extends UriEndpointComponent {
 
     private Channel channel;
-
     private String channelProperties;
-
-    private Boolean enableViewMessages;
+    private boolean enableViewMessages;
 
     public JGroupsComponent() {
         super(JGroupsEndpoint.class);
@@ -46,6 +44,9 @@ public class JGroupsComponent extends UriEndpointComponent {
         return channel;
     }
 
+    /**
+     * Channel to use
+     */
     public void setChannel(Channel channel) {
         this.channel = channel;
     }
@@ -54,15 +55,22 @@ public class JGroupsComponent extends UriEndpointComponent {
         return channelProperties;
     }
 
+    /**
+     * Specifies configuration properties of the JChannel used by the endpoint.
+     */
     public void setChannelProperties(String channelProperties) {
         this.channelProperties = channelProperties;
     }
 
-    public Boolean getEnableViewMessages() {
+    public boolean isEnableViewMessages() {
         return enableViewMessages;
     }
 
-    public void setEnableViewMessages(Boolean enableViewMessages) {
+    /**
+     * If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only org.jgroups.Message instances).
+     * By default only regular messages are consumed by the endpoint.
+     */
+    public void setEnableViewMessages(boolean enableViewMessages) {
         this.enableViewMessages = enableViewMessages;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/9d9f2b3c/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
index d92d09a..ea32da8 100644
--- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
+++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
@@ -39,33 +39,25 @@ import org.slf4j.LoggerFactory;
 public class JGroupsEndpoint extends DefaultEndpoint {
 
     public static final String HEADER_JGROUPS_ORIGINAL_MESSAGE = "JGROUPS_ORIGINAL_MESSAGE";
-
     public static final String HEADER_JGROUPS_SRC = "JGROUPS_SRC";
-
     public static final String HEADER_JGROUPS_DEST = "JGROUPS_DEST";
-
     public static final String HEADER_JGROUPS_CHANNEL_ADDRESS = "JGROUPS_CHANNEL_ADDRESS";
 
     private static final Logger LOG = LoggerFactory.getLogger(JGroupsEndpoint.class);
 
-    private Channel channel;
     private AtomicInteger connectCount = new AtomicInteger(0);
 
+    private Channel channel;
     private Channel resolvedChannel;
 
     @UriPath @Metadata(required = "true")
     private String clusterName;
-
     @UriParam
     private String channelProperties;
+    @UriParam(label = "consumer")
+    private boolean enableViewMessages;
 
-    @UriParam
-    private Boolean enableViewMessages;
-
-    @UriParam
-    private boolean resolvedEnableViewMessages;
-
-    public JGroupsEndpoint(String endpointUri, Component component, Channel channel, String clusterName, String channelProperties, Boolean enableViewMessages) {
+    public JGroupsEndpoint(String endpointUri, Component component, Channel channel, String clusterName, String channelProperties, boolean enableViewMessages) {
         super(endpointUri, component);
         this.channel = channel;
         this.clusterName = clusterName;
@@ -114,7 +106,6 @@ public class JGroupsEndpoint extends DefaultEndpoint {
     protected void doStart() throws Exception {
         super.doStart();
         resolvedChannel = resolveChannel();
-        resolvedEnableViewMessages = resolveEnableViewMessages();
     }
 
     @Override
@@ -154,17 +145,13 @@ public class JGroupsEndpoint extends DefaultEndpoint {
         }
     }
 
-    private boolean resolveEnableViewMessages() {
-        if (enableViewMessages != null) {
-            resolvedEnableViewMessages = enableViewMessages;
-        }
-        return resolvedEnableViewMessages;
-    }
-
     public Channel getChannel() {
         return channel;
     }
 
+    /**
+     * The channel to use
+     */
     public void setChannel(Channel channel) {
         this.channel = channel;
     }
@@ -173,6 +160,9 @@ public class JGroupsEndpoint extends DefaultEndpoint {
         return clusterName;
     }
 
+    /**
+     * The name of the JGroups cluster the component should connect to.
+     */
     public void setClusterName(String clusterName) {
         this.clusterName = clusterName;
     }
@@ -181,31 +171,27 @@ public class JGroupsEndpoint extends DefaultEndpoint {
         return channelProperties;
     }
 
+    /**
+     * Specifies configuration properties of the JChannel used by the endpoint.
+     */
     public void setChannelProperties(String channelProperties) {
         this.channelProperties = channelProperties;
     }
 
-    public Channel getResolvedChannel() {
+    Channel getResolvedChannel() {
         return resolvedChannel;
     }
 
-    public void setResolvedChannel(Channel resolvedChannel) {
-        this.resolvedChannel = resolvedChannel;
-    }
-
-    public Boolean getEnableViewMessages() {
+    public boolean isEnableViewMessages() {
         return enableViewMessages;
     }
 
-    public void setEnableViewMessages(Boolean enableViewMessages) {
+    /**
+     * If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only org.jgroups.Message instances).
+     * By default only regular messages are consumed by the endpoint.
+     */
+    public void setEnableViewMessages(boolean enableViewMessages) {
         this.enableViewMessages = enableViewMessages;
     }
 
-    public boolean isResolvedEnableViewMessages() {
-        return resolvedEnableViewMessages;
-    }
-
-    public void setResolvedEnableViewMessages(boolean resolvedEnableViewMessages) {
-        this.resolvedEnableViewMessages = resolvedEnableViewMessages;
-    }
 }
\ No newline at end of file