You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/08/05 14:26:41 UTC
[camel] 05/09: CAMEL-13792 - Rename components to default names,
Camel-mina2 to camel-mina - Updated docs
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit b865a68ee0797cee77f88e21474a46e3c1d44626
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 5 15:29:04 2019 +0200
CAMEL-13792 - Rename components to default names, Camel-mina2 to camel-mina - Updated docs
---
.../camel-hl7/src/main/docs/hl7-dataformat.adoc | 12 +++++-----
.../{mina2-component.adoc => mina-component.adoc} | 28 +++++++++++-----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
index c3d98ab..704913e 100644
--- a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
+++ b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc
@@ -9,12 +9,12 @@ v2 messages] using the http://hl7api.sourceforge.net[HAPI library].
This component supports the following:
-* HL7 MLLP codec for xref:mina2-component.adoc[Mina]
+* HL7 MLLP codec for xref:mina-component.adoc[Mina]
* HL7 MLLP codec for xref:netty4-component.adoc[Netty4]
* Type Converter from/to HAPI and String
* HL7 DataFormat using the HAPI library
* Even more ease-of-use as it's integrated well with the
-xref:mina2-component.adoc[camel-mina2] component.
+xref:mina-component.adoc[camel-mina] component.
Maven users will need to add the following dependency to their `pom.xml`
for this component:
@@ -35,9 +35,9 @@ HL7 is often used with the HL7 MLLP protocol, which is a text based TCP
socket based protocol. This component ships with a Mina and Netty4 Codec
that conforms to the MLLP protocol so you can easily expose an HL7
listener accepting HL7 requests over the TCP transport layer. To expose
-a HL7 listener service, the xref:mina2-component.adoc[camel-mina2] or
+a HL7 listener service, the xref:mina-component.adoc[camel-mina] or
xref:netty4-component.adoc[camel-netty4] component is used with the
-`HL7MLLPCodec` (mina2) or `HL7MLLPNettyDecoder/HL7MLLPNettyEncoder`
+`HL7MLLPCodec` (mina) or `HL7MLLPNettyDecoder/HL7MLLPNettyEncoder`
(Netty4).
HL7 MLLP codec can be configured as follows:
@@ -69,12 +69,12 @@ segment terminators. The HAPI library requires the use of `\r`.
=== Exposing an HL7 listener using Mina
-In the Spring XML file, we configure a mina2 endpoint to listen for HL7
+In the Spring XML file, we configure a mina endpoint to listen for HL7
requests using TCP on port `8888`:
[source,xml]
----
-<endpoint id="hl7MinaListener" uri="mina2:tcp://localhost:8888?sync=true&codec=#hl7codec"/>
+<endpoint id="hl7MinaListener" uri="mina:tcp://localhost:8888?sync=true&codec=#hl7codec"/>
----
*sync=true* indicates that this listener is synchronous and therefore
diff --git a/components/camel-mina/src/main/docs/mina2-component.adoc b/components/camel-mina/src/main/docs/mina-component.adoc
similarity index 96%
rename from components/camel-mina/src/main/docs/mina2-component.adoc
rename to components/camel-mina/src/main/docs/mina-component.adoc
index 1860506..166f977 100644
--- a/components/camel-mina/src/main/docs/mina2-component.adoc
+++ b/components/camel-mina/src/main/docs/mina-component.adoc
@@ -1,5 +1,5 @@
-[[mina2-component]]
-= Mina2 Component
+[[mina-component]]
+= Mina Component
*Available as of Camel version 2.10*
@@ -9,7 +9,7 @@ http://mina.apache.org/[Apache MINA 2.x]
TIP: Favor using xref:netty4-component.adoc[Netty] as Netty is a much more active
maintained and popular project than Apache Mina currently is.
-WARNING: Be careful with `sync=false` on consumer endpoints. Since camel-mina2 all
+WARNING: Be careful with `sync=false` on consumer endpoints. Since camel-mina all
consumer exchanges are InOut. This is different to camel-mina.
Maven users will need to add the following dependency to their `pom.xml`
@@ -19,7 +19,7 @@ for this component:
------------------------------------------------------------
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-mina2</artifactId>
+ <artifactId>camel-mina</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
@@ -29,9 +29,9 @@ for this component:
[source,java]
-------------------------------------
-mina2:tcp://hostname[:port][?options]
-mina2:udp://hostname[:port][?options]
-mina2:vm://hostname[:port][?options]
+mina:tcp://hostname[:port][?options]
+mina:udp://hostname[:port][?options]
+mina:vm://hostname[:port][?options]
-------------------------------------
You can specify a codec in the Registry using the
@@ -219,7 +219,7 @@ Mina consumer endpoint that listens on port 6200:
[source,java]
---------------------------------------------------------------------------------------
-from("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false").to("mock:result");
+from("mina:tcp://localhost:" + port1 + "?textline=true&sync=false").to("mock:result");
---------------------------------------------------------------------------------------
As the sample is part of a unit test, we test it by sending some data to
@@ -230,7 +230,7 @@ it on port 6200.
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello World");
-template.sendBody("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false", "Hello World");
+template.sendBody("mina:tcp://localhost:" + port1 + "?textline=true&sync=false", "Hello World");
assertMockEndpointsSatisfied();
-------------------------------------------------------------------------------------------------
@@ -244,7 +244,7 @@ consumer.
[source,java]
---------------------------------------------------------------------------------------------
-from("mina2:tcp://localhost:" + port2 + "?textline=true&sync=true").process(new Processor() {
+from("mina:tcp://localhost:" + port2 + "?textline=true&sync=true").process(new Processor() {
public void process(Exchange exchange) throws Exception {
String body = exchange.getIn().getBody(String.class);
exchange.getOut().setBody("Bye " + body);
@@ -259,19 +259,19 @@ fact, something we have dynamically set in our processor code logic.
[source,java]
-----------------------------------------------------------------------------------------------------------------------
-String response = (String)template.requestBody("mina2:tcp://localhost:" + port2 + "?textline=true&sync=true", "World");
+String response = (String)template.requestBody("mina:tcp://localhost:" + port2 + "?textline=true&sync=true", "World");
assertEquals("Bye World", response);
-----------------------------------------------------------------------------------------------------------------------
== Sample with Spring DSL
-Spring DSL can, of course, also be used for xref:mina2-component.adoc[MINA]. In the
+Spring DSL can, of course, also be used for xref:mina-component.adoc[MINA]. In the
sample below we expose a TCP server on port 5555:
[source,xml]
-----------------------------------------------------------
<route>
- <from uri="mina2:tcp://localhost:5555?textline=true"/>
+ <from uri="mina:tcp://localhost:5555?textline=true"/>
<to uri="bean:myTCPOrderHandler"/>
</route>
-----------------------------------------------------------
@@ -301,7 +301,7 @@ written the `bye` message back to the client:
[source,java]
---------------------------------------------------------------------------------------------------
- from("mina2:tcp://localhost:8080?sync=true&textline=true").process(new Processor() {
+ from("mina:tcp://localhost:8080?sync=true&textline=true").process(new Processor() {
public void process(Exchange exchange) throws Exception {
String body = exchange.getIn().getBody(String.class);
exchange.getOut().setBody("Bye " + body);