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/13 16:24:27 UTC
[3/3] camel git commit: Add component documentation.
Add component documentation.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/11bd3a1b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/11bd3a1b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/11bd3a1b
Branch: refs/heads/camel-2.15.x
Commit: 11bd3a1bd5502e56266db0cf5e9c29877110f5be
Parents: 232d90a
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Apr 13 16:26:45 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 13 16:27:14 2015 +0200
----------------------------------------------------------------------
.../camel/impl/ScheduledPollEndpoint.java | 34 +++++++++++---------
.../camel/component/mail/MailConfiguration.java | 6 ++++
2 files changed, 25 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/11bd3a1b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
index b255706..bf19d4a 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
@@ -44,36 +44,40 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
private static final String QUARTZ_2_SCHEDULER = "org.apache.camel.pollconsumer.quartz2.QuartzScheduledPollConsumerScheduler";
// if adding more options then align with org.apache.camel.impl.ScheduledPollConsumer
- @UriParam(defaultValue = "true", label = "consumer")
+ @UriParam(defaultValue = "true", label = "consumer", description = "Whether the scheduler should be auto started.")
private boolean startScheduler = true;
- @UriParam(defaultValue = "1000", label = "consumer")
+ @UriParam(defaultValue = "1000", label = "consumer", description = "Milliseconds before the first poll starts.")
private long initialDelay = 1000;
- @UriParam(defaultValue = "500", label = "consumer")
+ @UriParam(defaultValue = "500", label = "consumer", description = "Milliseconds before the next poll.")
private long delay = 500;
- @UriParam(defaultValue = "MILLISECONDS", label = "consumer")
+ @UriParam(defaultValue = "MILLISECONDS", label = "consumer", description = "Time unit for initialDelay and delay options.")
private TimeUnit timeUnit = TimeUnit.MILLISECONDS;
- @UriParam(defaultValue = "true", label = "consumer")
+ @UriParam(defaultValue = "true", label = "consumer", description = "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.")
private boolean useFixedDelay = true;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation"
+ + " to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.")
private PollingConsumerPollStrategy pollStrategy = new DefaultPollingConsumerPollStrategy();
- @UriParam(defaultValue = "TRACE", label = "consumer")
+ @UriParam(defaultValue = "TRACE", label = "consumer",
+ description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
private LoggingLevel runLoggingLevel = LoggingLevel.TRACE;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.")
private boolean sendEmptyMessageWhenIdle;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
private boolean greedy;
- @UriParam(enums = "spring,quartz2", label = "consumer")
+ @UriParam(enums = "spring,quartz2", label = "consumer", description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
private ScheduledPollConsumerScheduler scheduler;
private String schedulerName; // used when configuring scheduler using a string value
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
private Map<String, Object> schedulerProperties;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.")
private ScheduledExecutorService scheduledExecutorService;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row."
+ + " The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again."
+ + " When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.")
private int backoffMultiplier;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.")
private int backoffIdleThreshold;
- @UriParam(label = "consumer")
+ @UriParam(label = "consumer", description = "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.")
private int backoffErrorThreshold;
protected ScheduledPollEndpoint(String endpointUri, Component component) {
http://git-wip-us.apache.org/repos/asf/camel/blob/11bd3a1b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
index a2d61ca..638e603 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
@@ -418,6 +418,12 @@ public class MailConfiguration implements Cloneable {
return mapMailMessage;
}
+ /**
+ * Specifies whether Camel should map the received mail message to Camel body/headers.
+ * If set to true, the body of the mail message is mapped to the body of the Camel IN message and the mail headers are mapped to IN headers.
+ * If this option is set to false then the IN message contains a raw javax.mail.Message.
+ * You can retrieve this raw message by calling exchange.getIn().getBody(javax.mail.Message.class).
+ */
public void setMapMailMessage(boolean mapMailMessage) {
this.mapMailMessage = mapMailMessage;
}