You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Endpoint Annotations

As of Camel 2.12 you can annotate Endpoint and Consumer classes so that their configuration documentation can be automatically generated by the maven plugin.

The following annotations are supported:

Annotation

Description

@UriEndpoint

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

@UriParam

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.

@UriParams

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

For example here is the TimerEndpoint, notice the use of these annotations and in its base classes.

  • No labels