camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: Add Camel-ahc-ws gitbook docs
Date Mon, 25 Jan 2016 12:34:44 GMT
Repository: camel
Updated Branches:
  refs/heads/master 68147dc8c -> 607e14f60


Add Camel-ahc-ws gitbook docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/607e14f6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/607e14f6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/607e14f6

Branch: refs/heads/master
Commit: 607e14f60732ea05e522df875fa79e5831b5ed21
Parents: 68147dc
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Jan 25 13:26:03 2016 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Jan 25 13:34:06 2016 +0100

----------------------------------------------------------------------
 .../camel-ahc-ws/src/main/docs/readme.adoc      | 114 +++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |   3 +-
 2 files changed, 116 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/607e14f6/components/camel-ahc-ws/src/main/docs/readme.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ahc-ws/src/main/docs/readme.adoc b/components/camel-ahc-ws/src/main/docs/readme.adoc
new file mode 100644
index 0000000..0476bfb
--- /dev/null
+++ b/components/camel-ahc-ws/src/main/docs/readme.adoc
@@ -0,0 +1,114 @@
+[[AHC-WS-AsyncHttpClientWebsocketClientComponent]]
+Async Http Client (AHC) Websocket Client Component
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.14*
+
+The *ahc-ws* component provides Websocket
+based link:endpoint.html[endpoints] for a client communicating with
+external servers over Websocket (as a client opening a websocket
+connection to an external server). +
+The component uses the link:ahc.html[AHC] component that in turn uses
+the https://github.com/AsyncHttpClient/async-http-client[Async Http
+Client] library.
+
+Maven users will need to add the following dependency to
+their `pom.xml` for this component:
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-ahc-ws</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[AHC-WS-URIFormat]]
+URI Format
+^^^^^^^^^^
+
+[source,java]
+-------------------------------------------------
+ahc-ws://hostname[:port][/resourceUri][?options]
+ahc-wss://hostname[:port][/resourceUri][?options]
+-------------------------------------------------
+
+Will by default use port 80 for ahc-ws and 443 for ahc-wss.
+
+[[AHC-WS-AHC-WSOptions]]
+AHC-WS Options
+^^^^^^^^^^^^^^
+
+As the AHC-WS component is based on the AHC component, you can use the
+various configuration options of the AHC component.
+
+[[AHC-WS-WritingandReadingDataoverWebsocket]]
+Writing and Reading Data over Websocket
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+An ahc-ws endpoint can either write data to the socket or read from the
+socket, depending on whether the endpoint is configured as the producer
+or the consumer, respectively.
+
+[[AHC-WS-ConfiguringURItoWriteorReadData]]
+Configuring URI to Write or Read Data
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the route below, Camel will write to the specified websocket
+connection.
+
+[source,java]
+-----------------------------------
+from("direct:start")
+        .to("ahc-ws://targethost");
+-----------------------------------
+
+And the equivalent Spring sample:
+
+[source,xml]
+------------------------------------------------------------
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+  <route>
+    <from uri="direct:start"/>
+    <to uri="ahc-ws://targethost"/>
+  </route>
+</camelContext>
+------------------------------------------------------------
+
+In the route below, Camel will read from the specified websocket
+connection.
+
+[source,java]
+---------------------------
+from("ahc-ws://targethost")
+        .to("direct:next");
+---------------------------
+
+And the equivalent Spring sample:
+
+[source,xml]
+------------------------------------------------------------
+<camelContext xmlns="http://camel.apache.org/schema/spring">
+  <route>
+    <from uri="ahc-ws://targethost"/>
+    <to uri="direct:next"/>
+  </route>
+</camelContext>
+------------------------------------------------------------
+
+ 
+
+[[AHC-WS-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:../../../../camel-ahc/src/main/docs/readme.html[AHC]
+* link:atmosphere-websocket.html[Atmosphere-Websocket]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/607e14f6/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 632a74c..27d1376 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -3,7 +3,8 @@
 * [Introduction](README.md)
 * [Legal Notice](notice.md)
 * Components References
- * [Ahc](components/camel-ahc/src/main/docs/readme.adoc)
+ * [Async Http Client (AHC)](components/camel-ahc/src/main/docs/readme.adoc)
+ * [AHC Websocket (AHC-WS)](components/camel-ahc-ws/src/main/docs/readme.adoc)
  * [Atom](components/camel-atom/src/main/docs/readme.adoc)
  * [CDI](components/camel-cdi/src/main/docs/readme.adoc)
  * [JMS](components/camel-jms/src/main/docs/readme.adoc) 


Mime
View raw message