camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Endpoint Annotations
Date Tue, 23 Apr 2013 09:46:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/Endpoint+Annotations">Endpoint
Annotations</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://cwiki.apache.org/confluence/display/~jstrachan">James
Strachan</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <h2><a name="EndpointAnnotations-EndpointAnnotations"></a>Endpoint
Annotations</h2>

<p>As of <b>Camel 2.12</b> you can annotate <a href="/confluence/display/CAMEL/Endpoint"
title="Endpoint">Endpoint</a> and <a href="/confluence/pages/createpage.action?spaceKey=CAMEL&amp;title=Consumer&amp;linkCreation=true&amp;fromPageId=31819227"
class="createlink">Consumer</a> classes so that their configuration documentation
can be automatically generated by the maven plugin.</p>

<p>The following annotations are supported:</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Annotation</th>
<th class='confluenceTh'>Description</th>
</tr>
<tr>
<td class='confluenceTd'>@UriEndpoint</td>
<td class='confluenceTd'>Specifies that an endpoint is annotated with @UriParam and/or
@UriParams annotations. Also specifies the default scheme to use in the generated documentation
and the associated Consumer class for this endpoint</td>
</tr>
<tr>
<td class='confluenceTd'>@UriParam</td>
<td class='confluenceTd'>Used to annotate a parameter value; usually specified via ?foo=bar
syntax in the URI strings in Camel. Used currently only on field declarations but in the future
could be used on setter methods too. If no name is specified then the name of the field/setter
property is used.</td>
</tr>
<tr>
<td class='confluenceTd'>@UriParams</td>
<td class='confluenceTd'>Specifies that a field is a nested object of one or more configuration
parameters; then the class of this field should be annnotated with one or more @UriParam or
@UriParams annotations</td>
</tr>
</tbody></table>
</div>


<p>For example here is the <a href="https://github.com/apache/camel/blob/trunk/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java#L40"
class="external-link" rel="nofollow">TimerEndpoint</a>, notice the use of these annotations
and in its base classes.</p>
    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Endpoint+Annotations">View
Online</a>
              |
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Endpoint+Annotations?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message