CAMEL-8561: Better component docs summary of components - we use javadoc from the endpoint class instead of component so its in the same source file as @UriEndpoint.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ed1223a0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ed1223a0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ed1223a0 Branch: refs/heads/master Commit: ed1223a0e3a75fefa8b5c8a3f5f6f999acc4e64c Parents: 0577b69 Author: Claus Ibsen <[email protected]> Authored: Sun Dec 27 15:14:48 2015 +0100 Committer: Claus Ibsen <[email protected]> Committed: Sun Dec 27 18:25:28 2015 +0100 ---------------------------------------------------------------------- .../camel/component/mqtt/MQTTEndpoint.java | 2 +- .../camel/component/paho/PahoEndpoint.java | 7 ++++--- .../paxlogging/PaxLoggingEndpoint.java | 2 +- .../apache/camel/component/pdf/PdfEndpoint.java | 3 +++ .../component/pgevent/PgEventEndpoint.java | 21 ++++++++++---------- 5 files changed, 20 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/ed1223a0/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java index 3040831..d079778 100644 --- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java @@ -58,7 +58,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Component for communicating with MQTT M2M message brokers + * Component for communicating with MQTT M2M message brokers using FuseSource MQTT Client. */ @UriEndpoint(scheme = "mqtt", title = "MQTT", syntax = "mqtt:name", consumerClass = MQTTConsumer.class, label = "messaging,iot") public class MQTTEndpoint extends DefaultEndpoint { http://git-wip-us.apache.org/repos/asf/camel/blob/ed1223a0/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java index 09665e1..250943c 100644 --- a/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java +++ b/components/camel-paho/src/main/java/org/apache/camel/component/paho/PahoEndpoint.java @@ -37,9 +37,10 @@ import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - - -@UriEndpoint(scheme = "paho", title = "Paho", consumerClass = PahoConsumer.class, label = "messaging", syntax = "paho:topic") +/** + * Component for communicating with MQTT M2M message brokers using Eclipse Paho MQTT Client. + */ +@UriEndpoint(scheme = "paho", title = "Paho", consumerClass = PahoConsumer.class, label = "messaging,iot", syntax = "paho:topic") public class PahoEndpoint extends DefaultEndpoint { private static final Logger LOG = LoggerFactory.getLogger(PahoEndpoint.class); http://git-wip-us.apache.org/repos/asf/camel/blob/ed1223a0/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingEndpoint.java b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingEndpoint.java index 2884c55..202f354 100644 --- a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingEndpoint.java +++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingEndpoint.java @@ -26,7 +26,7 @@ import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriPath; /** - * Paxlogging endpoint. + * The paxlogging component can be used in an OSGi environment to receive PaxLogging events and process them. */ @UriEndpoint(scheme = "paxlogging", title = "OSGi PAX Logging", syntax = "paxlogging:appender", consumerOnly = true, consumerClass = PaxLoggingConsumer.class, label = "monitoring") public class PaxLoggingEndpoint extends DefaultEndpoint { http://git-wip-us.apache.org/repos/asf/camel/blob/ed1223a0/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java index fb3f2fa..2004ccd 100644 --- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java +++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfEndpoint.java @@ -24,6 +24,9 @@ import org.apache.camel.impl.DefaultEndpoint; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; +/** + * The pdf components provides the ability to create, modify or extract content from PDF documents. + */ @UriEndpoint(scheme = "pdf", title = "PDF", syntax = "pdf:operation", producerOnly = true, label = "pdf,printing") public class PdfEndpoint extends DefaultEndpoint { http://git-wip-us.apache.org/repos/asf/camel/blob/ed1223a0/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java index ca3ff39..8e2e285 100644 --- a/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java +++ b/components/camel-pgevent/src/main/java/org/apache/camel/component/pgevent/PgEventEndpoint.java @@ -19,7 +19,6 @@ package org.apache.camel.component.pgevent; import java.io.InvalidClassException; import java.sql.DriverManager; import java.util.Properties; -import javax.naming.directory.InvalidAttributesException; import javax.sql.DataSource; import com.impossibl.postgres.api.jdbc.PGConnection; @@ -37,7 +36,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Represents a PgEvent endpoint. + * The pgevent component allows for producing/consuming PostgreSQL events related to the LISTEN/NOTIFY commands. + * + * This requires using PostgreSQL 8.3 or newer. */ @UriEndpoint(scheme = "pgevent", title = "PostgresSQL Event", syntax = "pgevent:host:port/database/channel", consumerClass = PgEventConsumer.class, label = "database,sql") public class PgEventEndpoint extends DefaultEndpoint { @@ -67,13 +68,13 @@ public class PgEventEndpoint extends DefaultEndpoint { private PGConnection dbConnection; - public PgEventEndpoint(String uri, PgEventComponent component) throws InvalidAttributesException { + public PgEventEndpoint(String uri, PgEventComponent component) { super(uri, component); this.uri = uri; parseUri(); } - public PgEventEndpoint(String uri, PgEventComponent component, DataSource dataSource) throws InvalidAttributesException { + public PgEventEndpoint(String uri, PgEventComponent component, DataSource dataSource) { super(uri, component); this.uri = uri; this.datasource = dataSource; @@ -97,9 +98,9 @@ public class PgEventEndpoint extends DefaultEndpoint { /** * Parse the provided URI and extract available parameters * - * @throws InvalidAttributesException if there is an error in the parameters + * @throws IllegalArgumentException if there is an error in the parameters */ - protected final void parseUri() throws InvalidAttributesException { + protected final void parseUri() throws IllegalArgumentException { LOG.info("URI: " + uri); if (uri.matches(FORMAT1)) { LOG.info("FORMAT1"); @@ -128,7 +129,7 @@ public class PgEventEndpoint extends DefaultEndpoint { database = parts[0]; channel = parts[1]; } else { - throw new InvalidAttributesException("The provided URL does not match the acceptable patterns."); + throw new IllegalArgumentException("The provided URL does not match the acceptable patterns."); } } @@ -138,9 +139,9 @@ public class PgEventEndpoint extends DefaultEndpoint { return new PgEventProducer(this); } - private void validateInputs() throws InvalidClassException, InvalidAttributesException { + private void validateInputs() throws InvalidClassException, IllegalArgumentException { if (getChannel() == null || getChannel().length() == 0) { - throw new InvalidAttributesException("A required parameter was not set when creating this Endpoint (channel)"); + throw new IllegalArgumentException("A required parameter was not set when creating this Endpoint (channel)"); } if (datasource != null) { LOG.debug("******Datasource detected*****"); @@ -151,7 +152,7 @@ public class PgEventEndpoint extends DefaultEndpoint { } } else { if (user == null) { - throw new InvalidAttributesException("A required parameter was " + throw new IllegalArgumentException("A required parameter was " + "not set when creating this Endpoint (pgUser or pgDataSource)"); } }
