Repository: camel Updated Branches: refs/heads/master 654bd8fea -> c57a42a56
Component doc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c57a42a5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c57a42a5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c57a42a5 Branch: refs/heads/master Commit: c57a42a5622596000b32161b1ff3718548e42e64 Parents: 654bd8f Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Apr 24 14:39:08 2015 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Apr 24 14:39:08 2015 +0200 ---------------------------------------------------------------------- .../component/beanstalk/BeanstalkCommand.java | 2 - .../component/beanstalk/BeanstalkEndpoint.java | 11 ++- .../camel/component/dns/DnsComponent.java | 2 + .../apache/camel/component/dns/DnsEndpoint.java | 3 + .../component/dozer/DozerConfiguration.java | 24 ++++++ .../camel/component/exec/ExecEndpoint.java | 79 ++++---------------- 6 files changed, 50 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkCommand.java ---------------------------------------------------------------------- diff --git a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkCommand.java b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkCommand.java index 76859e0..fac52ea 100644 --- a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkCommand.java +++ b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkCommand.java @@ -20,6 +20,4 @@ public enum BeanstalkCommand { bury, release, put, touch, delete, kick - - } http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java index 590c2b8..be7bfbe 100644 --- a/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java +++ b/components/camel-beanstalk/src/main/java/org/apache/camel/component/beanstalk/BeanstalkEndpoint.java @@ -47,11 +47,11 @@ public class BeanstalkEndpoint extends ScheduledPollEndpoint { private int jobDelay = BeanstalkComponent.DEFAULT_DELAY; @UriParam(defaultValue = "" + BeanstalkComponent.DEFAULT_TIME_TO_RUN) private int jobTimeToRun = BeanstalkComponent.DEFAULT_TIME_TO_RUN; - @UriParam + @UriParam(label = "consumer") private BeanstalkCommand onFailure = BeanstalkCommand.bury; - @UriParam(defaultValue = "true") + @UriParam(label = "consumer", defaultValue = "true") private boolean useBlockIO = true; - @UriParam(defaultValue = "true") + @UriParam(label = "consumer", defaultValue = "true") private boolean awaitJob = true; public BeanstalkEndpoint(final String uri, final Component component, final ConnectionSettings conn, final String connectionSettings) { @@ -76,6 +76,11 @@ public class BeanstalkEndpoint extends ScheduledPollEndpoint { return command; } + /** + * put means to put the job into Beanstalk. Job body is specified in the Camel message body. Job ID will be returned in beanstalk.jobId message header. + * delete, release, touch or bury expect Job ID in the message header beanstalk.jobId. Result of the operation is returned in beanstalk.result message header + * kick expects the number of jobs to kick in the message body and returns the number of jobs actually kicked out in the message header beanstalk.result. + */ public void setCommand(BeanstalkCommand command) { this.command = command; } http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsComponent.java ---------------------------------------------------------------------- diff --git a/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsComponent.java b/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsComponent.java index 13a6fd8..fc69f62 100644 --- a/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsComponent.java +++ b/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsComponent.java @@ -22,6 +22,8 @@ import org.apache.camel.Endpoint; import org.apache.camel.impl.UriEndpointComponent; /** + * This is a component for Camel to run DNS queries, using DNSJava. + * <p/> * The DNS components creates endpoints of the form: <br/> * dns:///... <br/> * At this point, the DNS component works with these operations:<br/> http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsEndpoint.java b/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsEndpoint.java index 6e030a4..76778af 100644 --- a/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsEndpoint.java +++ b/components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsEndpoint.java @@ -64,6 +64,9 @@ public class DnsEndpoint extends DefaultEndpoint { return dnsType; } + /** + * The type of the lookup. + */ public void setDnsType(DnsType dnsType) { this.dnsType = dnsType; } http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java index edae400..4f13be5 100644 --- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java +++ b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerConfiguration.java @@ -53,6 +53,9 @@ public class DozerConfiguration { return marshalId; } + /** + * The id of a dataFormat defined within the Camel Context to use for marshalling the mapping output to a non-Java type. + */ public void setMarshalId(String marshalId) { this.marshalId = marshalId; } @@ -61,6 +64,9 @@ public class DozerConfiguration { return unmarshalId; } + /** + * The id of a dataFormat defined within the Camel Context to use for unmarshalling the mapping input from a non-Java type. + */ public void setUnmarshalId(String unmarshalId) { this.unmarshalId = unmarshalId; } @@ -69,6 +75,9 @@ public class DozerConfiguration { return sourceModel; } + /** + * Fully-qualified class name for the source type used in the mapping. If specified, the input to the mapping is converted to the specified type before being mapped with Dozer. + */ public void setSourceModel(String sourceModel) { this.sourceModel = sourceModel; } @@ -77,6 +86,9 @@ public class DozerConfiguration { return targetModel; } + /** + * Fully-qualified class name for the target type used in the mapping. + */ public void setTargetModel(String targetModel) { this.targetModel = targetModel; } @@ -85,6 +97,9 @@ public class DozerConfiguration { return name; } + /** + * A human readable name of the mapping. + */ public void setName(String name) { this.name = name; } @@ -93,6 +108,10 @@ public class DozerConfiguration { return mappingFile; } + /** + * The location of a Dozer configuration file. The file is loaded from the classpath by default, + * but you can use file:, classpath:, or http: to load the configuration from a specific location. + */ public void setMappingFile(String mappingFile) { this.mappingFile = mappingFile; } @@ -101,6 +120,11 @@ public class DozerConfiguration { return mappingConfiguration; } + /** + * The name of a DozerBeanMapperConfiguration bean in the Camel registry which should be used for configuring the Dozer mapping. + * This is an alternative to the mappingFile option that can be used for fine-grained control over how Dozer is configured. + * Remember to use a "#" prefix in the value to indicate that the bean is in the Camel registry (e.g. "#myDozerConfig"). + */ public void setMappingConfiguration(DozerBeanMapperConfiguration mappingConfiguration) { this.mappingConfiguration = mappingConfiguration; } http://git-wip-us.apache.org/repos/asf/camel/blob/c57a42a5/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecEndpoint.java b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecEndpoint.java index 3253ac5..4f5f4a1 100644 --- a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecEndpoint.java +++ b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecEndpoint.java @@ -47,25 +47,18 @@ public class ExecEndpoint extends DefaultEndpoint { @UriPath @Metadata(required = "true") private String executable; - @UriParam private String args; - @UriParam private String workingDir; - @UriParam private long timeout; - @UriParam private String outFile; - @UriParam private ExecCommandExecutor commandExecutor; - @UriParam private ExecBinding binding; - @UriParam private boolean useStderrOnEmptyStdout; @@ -87,11 +80,6 @@ public class ExecEndpoint extends DefaultEndpoint { return true; } - /** - * @return the executable to be executed; that is the remaining part of the - * endpoint URI - * @see ExecBinding#EXEC_COMMAND_EXECUTABLE - */ public String getExecutable() { return executable; } @@ -99,77 +87,40 @@ public class ExecEndpoint extends DefaultEndpoint { /** * Sets the executable to be executed. The executable must not be empty or * <code>null</code>. - * - * @param executable Sets the executable to be executed. */ public void setExecutable(String executable) { ObjectHelper.notEmpty(executable, "executable"); this.executable = executable; } - /** - * The arguments may be one or many whitespace-separated tokens, that can be - * quoted with ", e.g. <code>args="arg 1" arg2"</code> will use two arguments - * <code>arg 1</code> and <code>arg2</code>. To include the quotes use - * <code>""</code><br> - * , e.g. <code>args=""arg 1"" arg2</code> will use the arguments - * <code>"arg 1"</code> and <code>arg2</code>. - * - * @return the arguments of the executable application, as configured from - * the endpoint URI. - * @see ExecBinding#EXEC_COMMAND_ARGS - * @see ExecParseUtils#splitToWhiteSpaceSeparatedTokens(String) - */ public String getArgs() { return args; } /** - * Sets the arguments of the executable application - * - * @param args Returns <code>null</code> value if no arguments are - * configured in the endpoint URI - * @see #getArgs() - * @see ExecBinding#EXEC_COMMAND_ARGS + * The arguments may be one or many whitespace-separated tokens. */ public void setArgs(String args) { this.args = args; } - /** - * @return the working directory of the executable, or <code>null</code> is - * such is not set. - * @see ExecBinding#EXEC_COMMAND_WORKING_DIR - */ public String getWorkingDir() { return workingDir; } /** - * Sets the working directory of the executable. - * - * @param dir the working directory of the executable. <code>null</code> - * values indicates that the current working directory will be - * used. + * The directory in which the command should be executed. If null, the working directory of the current process will be used. */ public void setWorkingDir(String dir) { this.workingDir = dir; } - /** - * @return The returned value is always a positive <code>long</code>. The - * default value is {@link ExecEndpoint#NO_TIMEOUT} - * @see ExecBinding#EXEC_COMMAND_TIMEOUT - */ public long getTimeout() { return timeout; } /** - * Sets the timeout. - * - * @param timeout The <code>timeout</code> must be a positive long - * @see ExecBinding#EXEC_COMMAND_TIMEOUT + * The timeout, in milliseconds, after which the executable should be terminated. If execution has not completed within the timeout, the component will send a termination request. */ public void setTimeout(long timeout) { if (timeout <= 0) { @@ -178,36 +129,26 @@ public class ExecEndpoint extends DefaultEndpoint { this.timeout = timeout; } - /** - * @return <code>null</code> if no out file is set, otherwise returns the - * value of the outFile - * @see ExecBinding#EXEC_COMMAND_OUT_FILE - */ public String getOutFile() { return outFile; } /** - * @param outFile a not-empty file path - * @see ExecBinding#EXEC_COMMAND_OUT_FILE + * The name of a file, created by the executable, that should be considered as its output. + * If no outFile is set, the standard output (stdout) of the executable will be used instead. */ public void setOutFile(String outFile) { ObjectHelper.notEmpty(outFile, "outFile"); this.outFile = outFile; } - /** - * @return The command executor used to execute commands. Defaults to - * {@link org.apache.camel.component.exec.impl.DefaultExecCommandExecutor} - */ public ExecCommandExecutor getCommandExecutor() { return commandExecutor; } /** - * Sets a custom executor to execute commands. - * - * @param commandExecutor a not-null instance of {@link ExecCommandExecutor} + * A reference to a org.apache.commons.exec.ExecCommandExecutor in the Registry that customizes the command execution. + * The default command executor utilizes the commons-exec library, which adds a shutdown hook for every executed command. */ public void setCommandExecutor(ExecCommandExecutor commandExecutor) { ObjectHelper.notNull(commandExecutor, "commandExecutor"); @@ -218,6 +159,9 @@ public class ExecEndpoint extends DefaultEndpoint { return binding; } + /** + * A reference to a org.apache.commons.exec.ExecBinding in the Registry. + */ public void setBinding(ExecBinding binding) { ObjectHelper.notNull(binding, "binding"); this.binding = binding; @@ -227,6 +171,9 @@ public class ExecEndpoint extends DefaultEndpoint { return useStderrOnEmptyStdout; } + /** + * A boolean indicating that when stdout is empty, this component will populate the Camel Message Body with stderr. This behavior is disabled (false) by default. + */ public void setUseStderrOnEmptyStdout(boolean useStderrOnEmptyStdout) { this.useStderrOnEmptyStdout = useStderrOnEmptyStdout; }