[2/8] cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample

2016-04-05 Thread ay
[CXF-5855] enable atmosphere's sse handling; update the sample


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/35f01c94
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/35f01c94
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/35f01c94

Branch: refs/heads/3.1.x-fixes
Commit: 35f01c94841870afa8331e0591aec8a3bc4ca94d
Parents: 897d81d
Author: Akitoshi Yoshida 
Authored: Thu Mar 17 00:11:58 2016 +0100
Committer: Akitoshi Yoshida 
Committed: Tue Apr 5 13:36:57 2016 +0200

--
 .../jax_rs/websocket/src/test/resources/client.js | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/35f01c94/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
 
b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
index 7eb55f3..8e8d653 100644
--- 
a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
+++ 
b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
@@ -8,7 +8,7 @@
 
 "use strict";
 
-var HOST_URL = 'http://localhost:9100/';
+var HOST_URL = 'http://localhost:9000/';
 
 var reader = require('readline');
 var prompt = reader.createInterface(process.stdin, process.stdout);
@@ -25,13 +25,13 @@ var isopen = false;
 const TRANSPORT_NAMES = ["websocket", "sse"];
 
 const COMMAND_LIST = 
-[["add name",   "Add a new consumer and return the customer 
instance."],
- ["delete id",  "Delete the customer."],
- ["get id", "Return the customere."],
+[["add name",   "Add a new consumer and return the customer instance. 
(e.g., add green)"],
+ ["delete id",  "Delete the customer. (e.g., delete 124)"],
+ ["get id", "Return the customere. (e.g., get 123)"],
  ["quit",   "Quit the application."],
- ["subscribe",  "Subscribe to the customer updatese."],
- ["unsubscribe","Unsubscribe from the customer updatese."],
- ["update id name", "Update the customer."]];
+ ["subscribe",  "Subscribe to the customer queries."],
+ ["unsubscribe","Unsubscribe from the customer queries."],
+ ["update id name", "Update the customer. (e.g., update 125 red)"]];
 
 function selectOption(c, opts) {
 var i = parseInt(c);



[4/8] cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample

2016-04-05 Thread ay
[CXF-5855] enable atmosphere's sse handling; update the sample


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

Branch: refs/heads/3.1.x-fixes
Commit: a529d270668dabd1cfa6b040769cb25af97973db
Parents: 91197fd
Author: Akitoshi Yoshida 
Authored: Thu Mar 17 00:11:58 2016 +0100
Committer: Akitoshi Yoshida 
Committed: Tue Apr 5 13:36:57 2016 +0200

--
 .../release/samples/jax_rs/websocket/README.txt |  26 ++-
 .../release/samples/jax_rs/websocket/pom.xml|  10 +-
 .../java/demo/jaxrs/server/CustomerService.java | 105 -
 .../websocket/src/test/resources/client.js  | 232 +++
 .../websocket/atmosphere/AtmosphereUtils.java   |  18 ++
 .../AtmosphereWebSocketJettyDestination.java|   3 +-
 .../AtmosphereWebSocketServletDestination.java  |   3 +-
 .../atmosphere/DefaultProtocolInterceptor.java  |  90 ++-
 8 files changed, 463 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/a529d270/distribution/src/main/release/samples/jax_rs/websocket/README.txt
--
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/README.txt 
b/distribution/src/main/release/samples/jax_rs/websocket/README.txt
index 09c43e8..f1d3455 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/websocket/README.txt
@@ -6,6 +6,13 @@ This is a websocket transport version of JAX-RS Basic Demo.
 A RESTful customer service is provided on URL ws://localhost:9000/customers. 
 Users access this URI to operate on customer.
 
+This sample includes two convenient clients: a plain javascript browser client
+and a node.js client based on atmosphere.
+
+
+Connecting to the server
+---
+
 Open a websocket to ws://localhost:9000/ and send requests over the websocket.
 
 A GET request to path /customerservice/customers/123
@@ -102,7 +109,6 @@ Please review the README in the samples directory before
 continuing.
 
 
-
 Building and running the demo using maven
 ---
 
@@ -118,6 +124,8 @@ Using either UNIX or Windows:
 
 To remove the target dir, run mvn clean".
 
+Using Javascript client in Browser
+
 Using a web browser that natively supports WebSocket (Safari, Chrome, Firefox):
 After starting the server (see above), open the index.html page located at
 
@@ -140,3 +148,19 @@ Content-Type: text/xml; charset="utf-8"
   Jack
 
 
+
+
+Using Node.js client 
+
+
+Go to samples/jax_rs/websocket/src/test/resources and at the console
+
+Assuming node (>=v4) and npm are installed, execute the following shell 
commands.
+
+% npm install atmosphere.js
+% node client.js
+
+This client program supports websocket and sse and allows
+you to choose your preferred protocol.
+
+

http://git-wip-us.apache.org/repos/asf/cxf/blob/a529d270/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
--
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml 
b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
index abe9d3b..353e544 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
@@ -32,6 +32,7 @@
 ${project.version}
 
 1.8.5
+2.3.7
 8.1.15.v20140411
 9.2.2.v20140723
 ${cxf.jetty8.version}
@@ -207,6 +208,13 @@
 org.springframework
 spring-core
 
-
+
+
+
+org.atmosphere
+atmosphere-runtime
+${cxf.atmosphere.version}
+
+
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/a529d270/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
 
b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
index 967e978..cc039ff 100644
--- 
a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
+++ 
b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
@@ -25,6 +25,9 @@ import 

cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample

2016-03-19 Thread ay
Repository: cxf
Updated Branches:
  refs/heads/master f492f92e5 -> 4f5b60aba


[CXF-5855] enable atmosphere's sse handling; update the sample


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4f5b60ab
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4f5b60ab
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4f5b60ab

Branch: refs/heads/master
Commit: 4f5b60aba0a8f9f56c7f16e8a93ef22876467678
Parents: f492f92
Author: Akitoshi Yoshida 
Authored: Thu Mar 17 00:11:58 2016 +0100
Committer: Akitoshi Yoshida 
Committed: Thu Mar 17 00:15:29 2016 +0100

--
 .../release/samples/jax_rs/websocket/README.txt |  26 ++-
 .../release/samples/jax_rs/websocket/pom.xml|  10 +-
 .../java/demo/jaxrs/server/CustomerService.java | 105 -
 .../websocket/src/test/resources/client.js  | 232 +++
 .../websocket/atmosphere/AtmosphereUtils.java   |  18 ++
 .../AtmosphereWebSocketJettyDestination.java|   3 +-
 .../AtmosphereWebSocketServletDestination.java  |   3 +-
 .../atmosphere/DefaultProtocolInterceptor.java  |  90 ++-
 8 files changed, 463 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/README.txt
--
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/README.txt 
b/distribution/src/main/release/samples/jax_rs/websocket/README.txt
index 09c43e8..f1d3455 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/README.txt
+++ b/distribution/src/main/release/samples/jax_rs/websocket/README.txt
@@ -6,6 +6,13 @@ This is a websocket transport version of JAX-RS Basic Demo.
 A RESTful customer service is provided on URL ws://localhost:9000/customers. 
 Users access this URI to operate on customer.
 
+This sample includes two convenient clients: a plain javascript browser client
+and a node.js client based on atmosphere.
+
+
+Connecting to the server
+---
+
 Open a websocket to ws://localhost:9000/ and send requests over the websocket.
 
 A GET request to path /customerservice/customers/123
@@ -102,7 +109,6 @@ Please review the README in the samples directory before
 continuing.
 
 
-
 Building and running the demo using maven
 ---
 
@@ -118,6 +124,8 @@ Using either UNIX or Windows:
 
 To remove the target dir, run mvn clean".
 
+Using Javascript client in Browser
+
 Using a web browser that natively supports WebSocket (Safari, Chrome, Firefox):
 After starting the server (see above), open the index.html page located at
 
@@ -140,3 +148,19 @@ Content-Type: text/xml; charset="utf-8"
   Jack
 
 
+
+
+Using Node.js client 
+
+
+Go to samples/jax_rs/websocket/src/test/resources and at the console
+
+Assuming node (>=v4) and npm are installed, execute the following shell 
commands.
+
+% npm install atmosphere.js
+% node client.js
+
+This client program supports websocket and sse and allows
+you to choose your preferred protocol.
+
+

http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
--
diff --git a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml 
b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
index d198d71..9b79c2c 100644
--- a/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/websocket/pom.xml
@@ -32,6 +32,7 @@
 ${project.version}
 
 1.8.5
+2.3.7
 8.1.15.v20140411
 9.2.2.v20140723
 ${cxf.jetty8.version}
@@ -207,6 +208,13 @@
 org.springframework
 spring-core
 
-
+
+
+
+org.atmosphere
+atmosphere-runtime
+${cxf.atmosphere.version}
+
+
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4f5b60ab/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
 
b/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
index 967e978..cc039ff 100644
--- 
a/distribution/src/main/release/samples/jax_rs/websocket/src/main/java/demo/jaxrs/server/CustomerService.java
+++ 

cxf git commit: [CXF-5855] enable atmosphere's sse handling; update the sample

2016-03-19 Thread ay
Repository: cxf
Updated Branches:
  refs/heads/master 4f5b60aba -> 5404ada11


[CXF-5855] enable atmosphere's sse handling; update the sample


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5404ada1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5404ada1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5404ada1

Branch: refs/heads/master
Commit: 5404ada11eb5f78828a0b480601b3ab01ebcdf10
Parents: 4f5b60a
Author: Akitoshi Yoshida 
Authored: Thu Mar 17 00:11:58 2016 +0100
Committer: Akitoshi Yoshida 
Committed: Thu Mar 17 00:41:07 2016 +0100

--
 .../jax_rs/websocket/src/test/resources/client.js | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/5404ada1/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
--
diff --git 
a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
 
b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
index 7eb55f3..8e8d653 100644
--- 
a/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
+++ 
b/distribution/src/main/release/samples/jax_rs/websocket/src/test/resources/client.js
@@ -8,7 +8,7 @@
 
 "use strict";
 
-var HOST_URL = 'http://localhost:9100/';
+var HOST_URL = 'http://localhost:9000/';
 
 var reader = require('readline');
 var prompt = reader.createInterface(process.stdin, process.stdout);
@@ -25,13 +25,13 @@ var isopen = false;
 const TRANSPORT_NAMES = ["websocket", "sse"];
 
 const COMMAND_LIST = 
-[["add name",   "Add a new consumer and return the customer 
instance."],
- ["delete id",  "Delete the customer."],
- ["get id", "Return the customere."],
+[["add name",   "Add a new consumer and return the customer instance. 
(e.g., add green)"],
+ ["delete id",  "Delete the customer. (e.g., delete 124)"],
+ ["get id", "Return the customere. (e.g., get 123)"],
  ["quit",   "Quit the application."],
- ["subscribe",  "Subscribe to the customer updatese."],
- ["unsubscribe","Unsubscribe from the customer updatese."],
- ["update id name", "Update the customer."]];
+ ["subscribe",  "Subscribe to the customer queries."],
+ ["unsubscribe","Unsubscribe from the customer queries."],
+ ["update id name", "Update the customer. (e.g., update 125 red)"]];
 
 function selectOption(c, opts) {
 var i = parseInt(c);