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
commit cf217a01202862ccfcb425e218324ff0dc3e3661 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Aug 26 05:35:31 2019 +0200 Regen --- docs/components/modules/ROOT/nav.adoc | 1 + .../components/modules/ROOT/pages/attachments.adoc | 22 ++++++++++++++++++++++ .../ROOT/pages/microprofile-metrics-component.adoc | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index cb8ba7f..9d14e4a 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -19,6 +19,7 @@ * xref:atomix-queue-component.adoc[Atomix Queue Component] * xref:atomix-set-component.adoc[Atomix Set Component] * xref:atomix-value-component.adoc[Atomix Value Component] +* xref:attachments.adoc[Attachments Component] * xref:avro-component.adoc[Avro Component] * xref:avro-dataformat.adoc[Avro DataFormat] * xref:aws-cw-component.adoc[AWS CloudWatch Component] diff --git a/docs/components/modules/ROOT/pages/attachments.adoc b/docs/components/modules/ROOT/pages/attachments.adoc new file mode 100644 index 0000000..85dcbce --- /dev/null +++ b/docs/components/modules/ROOT/pages/attachments.adoc @@ -0,0 +1,22 @@ += Attachments Component + +The attachments component provides the `javax.attachments` API support for Apache Camel. +A few Camel component uses attachments such as mail and web-service components. +The attachments component is include automatic when using these components. + +The attachments support is on Camel `Message` level, for example to get +the `javax.activation.DataHandler` instance of the attachment, you can do as shown below: + +[source,java] +---- +AttachmentMessage attMsg = exchange.getIn(AttachmentMessage.class); +Attachment attachment = attMsg.getAttachmentObject("myAttachment"); +DataHandler dh = attachment.getDataHandler(); +---- + +And if you want to add an attachment, to a Camel `Message` you can do as shown: +[source,java] +---- +AttachmentMessage attMsg = exchange.getIn(AttachmentMessage.class); +attMsg.addAttachment("message1.xml", new DataHandler(new FileDataSource(new File("myMessage1.xml")))); +---- diff --git a/docs/components/modules/ROOT/pages/microprofile-metrics-component.adoc b/docs/components/modules/ROOT/pages/microprofile-metrics-component.adoc index 93eb1aa..3f4a879 100644 --- a/docs/components/modules/ROOT/pages/microprofile-metrics-component.adoc +++ b/docs/components/modules/ROOT/pages/microprofile-metrics-component.adoc @@ -45,7 +45,7 @@ The MicroProfile Metrics component supports 2 options, which are listed below. The MicroProfile Metrics endpoint is configured using URI syntax: ---- -microprofile-metrics:metricType:metricsName +microprofile-metrics:metricType:metricName ---- with the following path and query parameters: