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 2019/10/01 08:05:24 UTC

[camel] branch master updated: CAMEL-13957

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new de47c46  CAMEL-13957
de47c46 is described below

commit de47c4634bd22eacfd9da6441f60a4e3f44d90ed
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Oct 1 10:05:06 2019 +0200

    CAMEL-13957
    
    CAMEL-13957: Dead link from Writing components documentation page
---
 .../modules/ROOT/pages/writing-components.adoc     | 67 ++++------------------
 1 file changed, 10 insertions(+), 57 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/writing-components.adoc b/docs/user-manual/modules/ROOT/pages/writing-components.adoc
index a769f22..333ccc8 100644
--- a/docs/user-manual/modules/ROOT/pages/writing-components.adoc
+++ b/docs/user-manual/modules/ROOT/pages/writing-components.adoc
@@ -8,10 +8,7 @@ xref:endpoint.adoc[Endpoints].
 
 Here are the main steps to writing a component:
 
-* Write a POJO which implements the
-http://activemq.apache.org/camel/maven/current/camel-core/apidocs/org/apache/camel/Component.html[Component]
-interface. The simplest approach is just to derive from
-http://activemq.apache.org/camel/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultComponent.html[DefaultComponent].
+* Write a POJO which implements the `Component` interface. The simplest approach is just to derive from `DefaultComponent`.
 * To support auto-discovery of your component add a file to
 `META-INF/services/org/apache/camel/component/FOO` where FOO is the URI
 scheme for your component and any related endpoints created on the fly.
@@ -21,9 +18,7 @@ For example if your component is implemented by the
 following line -- `class=com.example.CustomComponent`.
 
 Users can then either explicitly create your component, configure it and
-register with a
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html[CamelContext]
-or users can use a URI which auto-creates your component.
+register with a `CamelContext` or users can use a URI which auto-creates your component.
 
 [[WritingComponents-WritingEndpoints]]
 == Writing Endpoints
@@ -31,46 +26,16 @@ or users can use a URI which auto-creates your component.
 When implementing an xref:endpoint.adoc[Endpoint] you typically may
 implement one or more of the following methods:
 
-* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createProducer()[createProducer()]
-will create a
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html[Producer]
-for sending message exchanges to the endpoint
-* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createConsumer(org.apache.camel.Processor)[createConsumer()]
-implements the xref:eventDrivenConsumer-eip.adoc[Event Driven Consumer]
-pattern for consuming message exchanges from the endpoint via a
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Processor.html[Processor]
-when creating a
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Consumer.html[Consumer]
-* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createPollingConsumer()[createPollingConsumer()]
-implements the xref:polling-consumer.adoc[Polling Consumer] pattern for
-consuming message exchanges from the endpoint via a
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/PollingConsumer.html[PollingConsumer]
-
-Typically you just derive from
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultEndpoint.html[DefaultEndpoint]
-and implement the
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createProducer()[createProducer()]
-and / or
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createConsumer(org.apache.camel.Processor)[createConsumer()]
-methods. The
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createPollingConsumer()[createPollingConsumer()]
-method will be created by default for you in the
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultEndpoint.html[DefaultEndpoint]
-class.
-
-If your endpoint is a polling-centric component you can derive from
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultPollingEndpoint.html[DefaultPollingEndpoint]
-and then implement
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createPollingConsumer()[createPollingConsumer()];
-the
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createConsumer(org.apache.camel.Processor)[createConsumer()]
-method will be created for you which avoids you having to write any
-polling code.
+* `createProducer` will create a producer for sending message exchanges to the endpoint
+* `createConsumer` implements the xref:eventDrivenConsumer-eip.adoc[Event Driven Consumer]
+pattern for consuming message exchanges from the endpoint.
+
+Typically you just derive from `DefaultEndpoint`
 
 [[WritingComponents-AnnotatingyourEndpoint]]
 == Annotating your Endpoint
 
-As of *Camel 2.12* if you want to benefit from the automatic generation
+If you want to benefit from the automatic generation
 of HTML documentation for all the parameters on your endpoint as part of
 the maven site reports, you need to
 xref:endpoint-annotations.adoc[annotate your Endpoint's parameters].
@@ -80,21 +45,9 @@ and then annotate each parameter you wish to be configured via the URI
 configuration mechanism with `@UriParam` (or `@UriParams` for nested
 configuration objects).
 
-In addition its recommended that your Component implementation inherit
-from the UriEndpointComponent base class as that means your Component
-will automatically generate better metadata for the
-xref:componentconfiguration.adoc[ComponentConfiguration] API.
-
 Refer to the xref:endpoint-annotations.adoc[Endpoint Annotations guide
 for details].
 
-[[WritingComponents-UsingaProcessor]]
-== Using a Processor
-
-If you are writing a simple endpoint which just processes messages in
-some way, you can just implement a xref:processor.adoc[Processor] and
-xref:processor.adoc[use that to create an endpoint].
-
 [[WritingComponents-Dependencyinjectionandauto-discovery]]
 == Dependency injection and auto-discovery
 
@@ -106,10 +59,10 @@ getting the benefits of dependency injection.
 
 For example your component can depend on a JDBC DataSource or JMS
 ConnectionFactory which can be provided in the ApplicationContext in
-Spring or Module in Guice.
+Spring.
 
 So you can if you prefer configure your Component using an IoC framework
-like Spring or Guice; then add it to the CamelContext. Or you can let
+like Spring; then add it to the CamelContext. Or you can let
 the Component auto-inject itself as the endpoints are auto-discovered.
 
 [[WritingComponents-Options]]