Browse files

Converted from Ant to Maven.

  • Loading branch information...
1 parent cdfb095 commit cca0c67e202c9ffe9befd17d6a4fd5c1e5dcba8e @mathieucarbou mathieucarbou committed Jan 29, 2011
Showing with 1,287 additions and 449 deletions.
  1. +22 −0 .gitignore
  2. +1 −0 README
  3. +7 −0 TODO
  4. +0 −3 WebContent/META-INF/MANIFEST.MF
  5. BIN WebContent/WEB-INF/lib/jetty-client-7.1.6.v20100715.jar
  6. BIN WebContent/WEB-INF/lib/jetty-continuation-7.1.6.v20100715.jar
  7. BIN WebContent/WEB-INF/lib/jetty-http-7.1.6.v20100715.jar
  8. BIN WebContent/WEB-INF/lib/jetty-io-7.1.6.v20100715.jar
  9. BIN WebContent/WEB-INF/lib/jetty-security-7.1.6.v20100715.jar
  10. BIN WebContent/WEB-INF/lib/jetty-server-7.1.6.v20100715.jar
  11. BIN WebContent/WEB-INF/lib/jetty-servlet-7.1.6.v20100715.jar
  12. BIN WebContent/WEB-INF/lib/jetty-util-7.1.6.v20100715.jar
  13. BIN WebContent/WEB-INF/lib/jetty-webapp-7.1.6.v20100715.jar
  14. BIN WebContent/WEB-INF/lib/jetty-websocket-7.1.6.v20100715.jar
  15. BIN WebContent/WEB-INF/lib/jetty-xml-7.1.6.v20100715.jar
  16. BIN WebContent/WEB-INF/lib/servlet-api-2.5.jar
  17. +0 −22 WebContent/WEB-INF/web.xml
  18. +0 −8 build.properties.example
  19. +0 −229 build.xml
  20. +57 −0 core/pom.xml
  21. 0 {src → core/src/main/java}/com/glines/socketio/client/common/SocketIOConnection.java
  22. 0 {src → core/src/main/java}/com/glines/socketio/client/jre/SocketIOConnectionImpl.java
  23. 0 {src → core/src/main/java}/com/glines/socketio/client/jre/SocketIOConnectionXHRBase.java
  24. 0 {src → core/src/main/java}/com/glines/socketio/common/ConnectionState.java
  25. 0 {src → core/src/main/java}/com/glines/socketio/common/DisconnectReason.java
  26. 0 {src → core/src/main/java}/com/glines/socketio/common/SocketIOException.java
  27. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOClosedException.java
  28. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOFrame.java
  29. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOInbound.java
  30. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOServlet.java
  31. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOSession.java
  32. 0 {src → core/src/main/java}/com/glines/socketio/server/SocketIOSessionManager.java
  33. 0 {src → core/src/main/java}/com/glines/socketio/server/Transport.java
  34. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/AbstractHttpTransport.java
  35. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/AbstractTransport.java
  36. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/ConnectionTimeoutPreventor.java
  37. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/FlashSocketTransport.java
  38. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/HTMLFileTransport.java
  39. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/JSONPPollingTransport.java
  40. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/TransportBuffer.java
  41. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/WebSocketTransport.java
  42. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/XHRMultipartTransport.java
  43. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/XHRPollingTransport.java
  44. 0 {src → core/src/main/java}/com/glines/socketio/server/transport/XHRTransport.java
  45. 0 {src → core/src/main/resources}/com/glines/socketio/WebSocketMain.swf
  46. 0 {src → core/src/main/resources}/com/glines/socketio/socket.io.js
  47. +38 −0 extension/gwt/pom.xml
  48. 0 {src → extension/gwt/src/main/java}/com/glines/socketio/client/gwt/GWTSocketIOConnectionFactory.java
  49. 0 {src → extension/gwt/src/main/java}/com/glines/socketio/client/gwt/GWTSocketIOConnectionImpl.java
  50. +29 −0 extension/gwt/src/main/resources/com/glines/socketio/Common.gwt.xml
  51. +34 −0 extension/gwt/src/main/resources/com/glines/socketio/client/Client.gwt.xml
  52. +25 −0 extension/pom.xml
  53. +20 −0 licenses/MIT
  54. +448 −0 pom.xml
  55. +60 −0 samples/broadcast/pom.xml
  56. +2 −3 ...ples → samples/broadcast/src/main/java/com/glines/socketio/sample}/broadcast/BroadcastServer.java
  57. +1 −1 ...samples/broadcast/src/main/java/com/glines/socketio/sample}/broadcast/BroadcastSocketServlet.java
  58. +40 −0 samples/broadcast/src/main/webapp/WEB-INF/web.xml
  59. +99 −0 samples/chat-gwt/pom.xml
  60. +1 −1 .../examples → samples/chat-gwt/src/main/java/com/glines/socketio/sample}/gwtchat/GWTChatServer.java
  61. +1 −1 ...es → samples/chat-gwt/src/main/java/com/glines/socketio/sample}/gwtchat/GWTChatSocketServlet.java
  62. +1 −1 ...es → samples/chat-gwt/src/main/java/com/glines/socketio/sample}/gwtchat/client/GWTChatClient.java
  63. +33 −0 samples/chat-gwt/src/main/resources/com/glines/socketio/sample/gwtchat/GWTChat.gwt.xml
  64. +44 −0 samples/chat-gwt/src/main/webapp/WEB-INF/web.xml
  65. +25 −1 {src/com/glines/socketio/examples/gwtchat → samples/chat-gwt/src/main/webapp}/gwtchat.html
  66. +62 −0 samples/chat/pom.xml
  67. +1 −1 ...s/socketio/examples → samples/chat/src/main/java/com/glines/socketio/sample}/chat/ChatServer.java
  68. +1 −1 ...tio/examples → samples/chat/src/main/java/com/glines/socketio/sample}/chat/ChatSocketServlet.java
  69. +44 −0 samples/chat/src/main/webapp/WEB-INF/web.xml
  70. +24 −0 {src/com/glines/socketio/examples/chat → samples/chat/src/main/webapp}/chat.html
  71. 0 {src/com/glines/socketio/examples/chat → samples/chat/src/main/webapp}/json.js
  72. +52 −0 samples/echo/pom.xml
  73. +2 −3 ...s/socketio/examples → samples/echo/src/main/java/com/glines/socketio/sample}/echo/EchoServer.java
  74. +1 −1 ...tio/examples → samples/echo/src/main/java/com/glines/socketio/sample}/echo/EchoSocketServlet.java
  75. +40 −0 samples/echo/src/main/webapp/WEB-INF/web.xml
  76. +72 −0 samples/pom.xml
  77. +0 −27 src/com/glines/socketio/Common.gwt.xml
  78. +0 −32 src/com/glines/socketio/client/Client.gwt.xml
  79. +0 −31 src/com/glines/socketio/examples/gwtchat/GWTChat.gwt.xml
  80. +0 −82 src/com/glines/socketio/examples/text/TextClient.java
  81. +0 −1 version.properties
View
22 .gitignore
@@ -0,0 +1,22 @@
+syntax: glob
+*.cert
+*.crt
+*.key
+*.orig
+*.iml
+*.ipr
+*.iws
+*.swp
+bin
+build
+dist
+.git
+*~
+.DS_Store
+.idea
+.settings
+.project
+.classpath
+war
+build.properties
+target
View
1 README
@@ -0,0 +1 @@
+Java backend integration for Socket.IO library (http://socket.io/)
View
7 TODO
@@ -0,0 +1,7 @@
+1. Maven pom.xml
+
+2. Add unit tests
+
+3. Add embedded containers to run sample webapps
+
+4. Split project in modules (core, samples, gwt, ...)
View
3 WebContent/META-INF/MANIFEST.MF
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
View
BIN WebContent/WEB-INF/lib/jetty-client-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-continuation-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-http-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-io-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-security-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-server-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-servlet-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-util-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-webapp-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-websocket-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/jetty-xml-7.1.6.v20100715.jar
Binary file not shown.
View
BIN WebContent/WEB-INF/lib/servlet-api-2.5.jar
Binary file not shown.
View
22 WebContent/WEB-INF/web.xml
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
- <display-name>SocketIOServer</display-name>
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- <welcome-file>index.jsp</welcome-file>
- <welcome-file>default.html</welcome-file>
- <welcome-file>default.htm</welcome-file>
- <welcome-file>default.jsp</welcome-file>
- </welcome-file-list>
- <servlet>
- <description></description>
- <display-name>SocketIOServlet</display-name>
- <servlet-name>SocketIOServlet</servlet-name>
- <servlet-class>com.glines.socketio.server.SocketIOServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>SocketIOServlet</servlet-name>
- <url-pattern>/socketio</url-pattern>
- </servlet-mapping>
-</web-app>
View
8 build.properties.example
@@ -1,8 +0,0 @@
-# Uncomment this and set it to the path to an installation of GWT in order to enable building the
-# GWT examples.
-#gwt.home=
-
-# Set these to the IP and port to which the examples will bind.
-# Suggested by mohan chinnappan <mchinnappan@gmail.com>
-examples.host=127.0.0.1
-examples.port=8080
View
229 build.xml
@@ -1,229 +0,0 @@
-<!--
- * The MIT License
- * Copyright (c) 2010 Tad Glines
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
--->
-
-<project name="socketio-java" default="dist">
- <description>J2EE Servlet based Socket.IO Server Implementation</description>
-
- <property file="build.properties"/>
- <property file="version.properties"/>
-
- <!-- The defailt host/port that examples will bind to. Can be overriden in build.properties -->
- <property name="examples.host" value="127.0.0.1"/>
- <property name="examples.port" value="8080"/>
-
- <property name="gwt.war.dir" location="war"/>
-
- <condition property="gwt.is.available">
- <isset property="gwt.home"/>
- </condition>
-
- <path id="classpath">
- <fileset dir="WebContent/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <path id="gwt_classpath">
- <fileset dir="${gwt.home}">
- <include name="gwt-dev.jar"/>
- <include name="gwt-user.jar"/>
- </fileset>
- </path>
-
- <target name="fixeol">
- <fixcrlf eol="lf" srcdir=".">
- <include name="src/**/*.java"/>
- <include name="src/**/*.xml"/>
- <include name="build.xml"/>
- <include name="build.properties.example"/>
- <include name="version.properties"/>
- </fixcrlf>
- </target>
-
- <target name="gwtwarning" unless="gwt.is.available">
- <echo level="warning">The property gwt.home is not set in build.properties.
-The GWT module and examples will not be compiled and the resulting jars
-will not be usable in a GWT project.</echo>
- </target>
-
- <target name="init">
- <mkdir dir="dist"/>
- <mkdir dir="build"/>
- <mkdir dir="build/classes"/>
- </target>
-
- <target name="clean">
- <delete dir="dist"/>
- <delete dir="build"/>
- <delete dir="war"/>
- </target>
-
- <target name="compile" depends="init">
- <javac sourcepath="" srcdir="src" destdir="build/classes" debug="on"
- target="1.6">
- <include name="**/*.java"/>
- <exclude name="com/glines/socketio/client/gwt/**"/>
- <exclude name="com/glines/socketio/examples/gwtchat/**"/>
- <classpath>
- <path refid="classpath"/>
- </classpath>
- </javac>
- <copy todir="build/classes">
- <fileset dir="src">
- <include name="**/*.js"/>
- <include name="**/*.swf"/>
- <include name="**/*.html"/>
- </fileset>
- </copy>
- </target>
-
- <target name="compile_gwt" depends="gwtwarning, compile" if="gwt.is.available">
- <javac sourcepath="" srcdir="src" destdir="build/classes" debug="on"
- target="1.6">
- <include name="com/glines/socketio/client/gwt/**"/>
- <include name="com/glines/socketio/examples/gwtchat/**"/>
- <classpath>
- <pathelement location="build/classes"/>
- <path refid="classpath"/>
- <path refid="gwt_classpath"/>
- </classpath>
- </javac>
- <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
- <classpath>
- <pathelement location="src"/>
- <pathelement location="build/classes"/>
- <path refid="classpath"/>
- <path refid="gwt_classpath"/>
- </classpath>
- <!-- Small Javascript size. -->
- <arg line="-style OBFUSCATED"/>
- <!-- Do not include class and package names in compiled JS. -->
- <arg line="-XdisableClassMetadata"/>
- <arg line="-XdisableCastChecking"/>
- <arg value="com.glines.socketio.examples.gwtchat.GWTChat"/>
- </java>
- </target>
-
- <target name="compile_gwt_dev" depends="gwtwarning, compile">
- <javac sourcepath="" srcdir="src" destdir="build/classes" debug="on"
- target="1.6">
- <include name="com/glines/socketio/client/gwt/**"/>
- <include name="com/glines/socketio/examples/gwtchat/**"/>
- <classpath>
- <pathelement location="build/classes"/>
- <path refid="classpath"/>
- <path refid="gwt_classpath"/>
- </classpath>
- </javac>
- <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
- <classpath>
- <pathelement location="src"/>
- <pathelement location="build/classes"/>
- <path refid="classpath"/>
- <path refid="gwt_classpath"/>
- </classpath>
- <!-- Human-readable JS. -->
- <arg line="-style PRETTY"/>
- <!-- Less optimal JS, but faster compile. -->
- <arg line="-draftCompile"/>
- <!-- Assertions on. -->
- <arg line="-ea"/>
- <arg value="com.glines.socketio.examples.gwtchat.GWTChat"/>
- </java>
- </target>
-
- <target name="jars">
- <jar destfile="dist/socketio-java-${socketio-java.version}.jar">
- <fileset dir="build/classes"/>
- <manifest>
- <attribute name="Implementation-Vendor" value="http://code.google.com/p/socketio-java"/>
- <attribute name="Implementation-Title" value="socketio-java"/>
- <attribute name="Implementation-Version" value="${socketio-java.version}"/>
- </manifest>
- </jar>
-
- <jar destfile="dist/socketio-java-src-${socketio-java.version}.jar">
- <fileset dir="src">
- <exclude name="**/*.js"/>
- <exclude name="**/*.swf"/>
- <exclude name="**/*.html"/>
- </fileset>
- <manifest>
- <attribute name="Implementation-Vendor" value="http://code.google.com/p/socketio-java"/>
- <attribute name="Implementation-Title" value="socketio-java Source"/>
- <attribute name="Implementation-Version" value="${socketio-java.version}"/>
- </manifest>
- </jar>
- </target>
-
- <target name="dist" depends="gwtwarning, compile, compile_gwt, jars"/>
-
- <target name="run-chat">
- <java fork="true" classname="com.glines.socketio.examples.chat.ChatServer">
- <jvmarg value="-Dorg.eclipse.jetty.util.log.DEBUG=true"/>
- <arg value="${examples.host}"/>
- <arg value="${examples.port}"/>
- <classpath>
- <pathelement location="dist/socketio-java-${socketio-java.version}.jar"/>
- <path refid="classpath"/>
- </classpath>
- </java>
- </target>
-
- <target name="run-gwtchat">
- <java fork="true" classname="com.glines.socketio.examples.gwtchat.GWTChatServer">
- <jvmarg value="-Dorg.eclipse.jetty.util.log.DEBUG=true"/>
- <arg value="${gwt.war.dir}"/>
- <arg value="${examples.host}"/>
- <arg value="${examples.port}"/>
- <classpath>
- <pathelement location="dist/socketio-java-${socketio-java.version}.jar"/>
- <path refid="classpath"/>
- </classpath>
- </java>
- </target>
-
- <target name="run-echo">
- <java fork="true" classname="com.glines.socketio.examples.echo.EchoServer">
- <jvmarg value="-Dorg.eclipse.jetty.util.log.DEBUG=true"/>
- <arg value="${examples.host}"/>
- <arg value="${examples.port}"/>
- <classpath>
- <pathelement location="dist/socketio-java-${socketio-java.version}.jar"/>
- <path refid="classpath"/>
- </classpath>
- </java>
- </target>
-
- <target name="run-broadcast">
- <java fork="true" classname="com.glines.socketio.examples.broadcast.BroadcastServer">
- <jvmarg value="-Dorg.eclipse.jetty.util.log.DEBUG=true"/>
- <arg value="${examples.host}"/>
- <arg value="${examples.port}"/>
- <classpath>
- <pathelement location="dist/socketio-java-${socketio-java.version}.jar"/>
- <path refid="classpath"/>
- </classpath>
- </java>
- </target>
-</project>
View
57 core/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-core</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Socket.IO Java Core</name>
+ <description>Core Socket.IO classes</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-client</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-continuation</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-io</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-websocket</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
View
0 ...tio/client/common/SocketIOConnection.java → ...tio/client/common/SocketIOConnection.java
File renamed without changes.
View
0 ...io/client/jre/SocketIOConnectionImpl.java → ...io/client/jre/SocketIOConnectionImpl.java
File renamed without changes.
View
0 ...client/jre/SocketIOConnectionXHRBase.java → ...client/jre/SocketIOConnectionXHRBase.java
File renamed without changes.
View
0 ...ines/socketio/common/ConnectionState.java → ...ines/socketio/common/ConnectionState.java
File renamed without changes.
View
0 ...nes/socketio/common/DisconnectReason.java → ...nes/socketio/common/DisconnectReason.java
File renamed without changes.
View
0 ...es/socketio/common/SocketIOException.java → ...es/socketio/common/SocketIOException.java
File renamed without changes.
View
0 ...ketio/server/SocketIOClosedException.java → ...ketio/server/SocketIOClosedException.java
File renamed without changes.
View
0 ...glines/socketio/server/SocketIOFrame.java → ...glines/socketio/server/SocketIOFrame.java
File renamed without changes.
View
0 ...ines/socketio/server/SocketIOInbound.java → ...ines/socketio/server/SocketIOInbound.java
File renamed without changes.
View
0 ...ines/socketio/server/SocketIOServlet.java → ...ines/socketio/server/SocketIOServlet.java
File renamed without changes.
View
0 ...ines/socketio/server/SocketIOSession.java → ...ines/socketio/server/SocketIOSession.java
File renamed without changes.
View
0 ...cketio/server/SocketIOSessionManager.java → ...cketio/server/SocketIOSessionManager.java
File renamed without changes.
View
0 ...com/glines/socketio/server/Transport.java → ...com/glines/socketio/server/Transport.java
File renamed without changes.
View
0 ...rver/transport/AbstractHttpTransport.java → ...rver/transport/AbstractHttpTransport.java
File renamed without changes.
View
0 ...o/server/transport/AbstractTransport.java → ...o/server/transport/AbstractTransport.java
File renamed without changes.
View
0 ...transport/ConnectionTimeoutPreventor.java → ...transport/ConnectionTimeoutPreventor.java
File renamed without changes.
View
0 ...erver/transport/FlashSocketTransport.java → ...erver/transport/FlashSocketTransport.java
File renamed without changes.
View
0 ...o/server/transport/HTMLFileTransport.java → ...o/server/transport/HTMLFileTransport.java
File renamed without changes.
View
0 ...rver/transport/JSONPPollingTransport.java → ...rver/transport/JSONPPollingTransport.java
File renamed without changes.
View
0 ...tio/server/transport/TransportBuffer.java → ...tio/server/transport/TransportBuffer.java
File renamed without changes.
View
0 .../server/transport/WebSocketTransport.java → .../server/transport/WebSocketTransport.java
File renamed without changes.
View
0 ...rver/transport/XHRMultipartTransport.java → ...rver/transport/XHRMultipartTransport.java
File renamed without changes.
View
0 ...server/transport/XHRPollingTransport.java → ...server/transport/XHRPollingTransport.java
File renamed without changes.
View
0 ...cketio/server/transport/XHRTransport.java → ...cketio/server/transport/XHRTransport.java
File renamed without changes.
View
0 src/com/glines/socketio/WebSocketMain.swf → ...ces/com/glines/socketio/WebSocketMain.swf
File renamed without changes.
View
0 src/com/glines/socketio/socket.io.js → ...esources/com/glines/socketio/socket.io.js
File renamed without changes.
View
38 extension/gwt/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio.extension</groupId>
+ <artifactId>socketio-extension</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-gwt</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Socket.IO Extension GWT</name>
+ <description>Socket.IO Java GWT Extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ </dependency>
+<!-- <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>2.1.1</version>
+ </dependency> -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>2.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
View
0 ...ent/gwt/GWTSocketIOConnectionFactory.java → ...ent/gwt/GWTSocketIOConnectionFactory.java
File renamed without changes.
View
0 ...client/gwt/GWTSocketIOConnectionImpl.java → ...client/gwt/GWTSocketIOConnectionImpl.java
File renamed without changes.
View
29 extension/gwt/src/main/resources/com/glines/socketio/Common.gwt.xml
@@ -0,0 +1,29 @@
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+
+<module>
+ <inherits name="com.google.gwt.core.Core"/>
+ <source path="common"/>
+</module>
View
34 extension/gwt/src/main/resources/com/glines/socketio/client/Client.gwt.xml
@@ -0,0 +1,34 @@
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+
+<module>
+ <inherits name="com.google.gwt.core.Core"/>
+ <inherits name="com.glines.socketio.Common"/>
+
+ <script src="/socket.io/socket.io.js"/>
+
+ <source path="common"/>
+ <source path="gwt"/>
+</module>
View
25 extension/pom.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <groupId>com.glines.socketio.extension</groupId>
+ <artifactId>socketio-extension</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Socket.IO Extensions</name>
+ <description>Socket.IO Java Extensions</description>
+
+ <modules>
+ <module>gwt</module>
+ </modules>
+
+</project>
View
20 licenses/MIT
@@ -0,0 +1,20 @@
+The MIT License
+Copyright (c) ${year} ${owner}
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
448 pom.xml
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Socket.IO Java</name>
+ <description>Java backend for Socket.IO javascript library</description>
+ <inceptionYear>2010</inceptionYear>
+
+ <properties>
+ <jdk.version>1.6</jdk.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <developers>
+ <developer>
+ <id>tadglines</id>
+ <name>Tad Glines</name>
+ <email>tad.glines@gmail.com</email>
+ <timezone>-8</timezone>
+ <roles>
+ <role>owner</role>
+ <role>developer</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <name>David Avenante</name>
+ <email>d.avenante@ovea.com</email>
+ <organization>Ovea</organization>
+ <organizationUrl>http://www.ovea.com/</organizationUrl>
+ <timezone>-5</timezone>
+ <roles>
+ <role>contributor</role>
+ </roles>
+ </contributor>
+ <contributor>
+ <name>Mathieu Carbou</name>
+ <email>mathieu.carbou@gmail.com</email>
+ <organization>Mycila</organization>
+ <organizationUrl>http://www.mycila.com/</organizationUrl>
+ <timezone>-5</timezone>
+ <roles>
+ <role>contributor</role>
+ </roles>
+ </contributor>
+ </contributors>
+
+ <licenses>
+ <license>
+ <name>The MIT License</name>
+ <url>http://www.opensource.org/licenses/mit-license.php</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <distributionManagement>
+ <!-- TODO: switch repositories when deploying on OSS Sonatype repos -->
+ <repository>
+ <id>mc-release</id>
+ <url>dav:https://mc-repo.googlecode.com/svn/maven2/releases</url>
+ </repository>
+ <!--<repository>
+ <id>socketio-staging</id>
+ <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ </repository>-->
+ <snapshotRepository>
+ <id>mc-snapshot</id>
+ <url>dav:https://mc-repo.googlecode.com/svn/maven2/snapshots</url>
+ <uniqueVersion>false</uniqueVersion>
+ </snapshotRepository>
+ <!--<snapshotRepository>
+ <id>socketio-snapshots</id>
+ <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+ <uniqueVersion>false</uniqueVersion>
+ </snapshotRepository>-->
+ <site>
+ <id>website</id>
+ <name>website</name>
+ <url>file://${basedir}/target/dist/site</url>
+ </site>
+ </distributionManagement>
+
+ <issueManagement>
+ <system>github</system>
+ <url>https://github.com/tadglines/Socket.IO-Java/issues</url>
+ </issueManagement>
+
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://build.intradev.ovea.com/hudson/</url>
+ </ciManagement>
+
+ <scm>
+ <connection>scm:git:git@github.com:tadglines/Socket.IO-Java.git</connection>
+ <developerConnection>scm:git:git@github.com:tadglines/Socket.IO-Java.git</developerConnection>
+ <url>https://github.com/tadglines/Socket.IO-Java</url>
+ </scm>
+
+ <modules>
+ <module>core</module>
+ <module>extension</module>
+ <module>samples</module>
+ </modules>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>1.0-beta-7</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
+ <message>
+ Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.
+ </message>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>${jdk.version}</source>
+ <target>${jdk.version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.1</version>
+ <configuration>
+ <useAgent>false</useAgent>
+ <!-- GPG key ID for Tad Glines -->
+ <keyname>29D37D27</keyname>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jarsigner-plugin</artifactId>
+ <version>1.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <source>${jdk.version}</source>
+ <encoding>UTF-8</encoding>
+ <maxmemory>1g</maxmemory>
+ <links>
+ <link>http://download.oracle.com/javase/6/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>com.mycila.maven-license-plugin</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>1.9.0</version>
+ <configuration>
+ <header>licenses/MIT</header>
+ <strictCheck>true</strictCheck>
+ <excludes>
+ <exclude>.idea/**</exclude>
+ <exclude>README</exclude>
+ <exclude>licenses/**</exclude>
+ <exclude>src/test/resources/**</exclude>
+ <exclude>**/*.ods</exclude>
+ <exclude>**/.gitignore</exclude>
+ <exclude>**/jndi.properties</exclude>
+ <exclude>**/logging.properties</exclude>
+ <exclude>**/*.js</exclude>
+ <exclude>**/*.swf</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>2.1.0-1</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-maven</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.mycila.maven-license-plugin</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>licensing-1</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <properties>
+ <owner>Tad Glines</owner>
+ <year>${project.inceptionYear}</year>
+ </properties>
+ <includes>
+ <include>**/*.java</include>
+ <include>**/*.xml</include>
+ <include>**/*.html</include>
+ </includes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>licensing-2</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <properties>
+ <owner>Ovea</owner>
+ <year>2011</year>
+ </properties>
+ <includes>
+ <include>PLACEHOLDER</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- TODO: activate if deploying in OSS Sonatype repos or maven central repo togpg sign jars -->
+ <!--<plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>-->
+ </plugins>
+ </build>
+
+ <reporting>
+ <outputDirectory>target/site</outputDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <source>${jdk.version}</source>
+ <encoding>UTF-8</encoding>
+ <maxmemory>1g</maxmemory>
+ <links>
+ <link>http://download.oracle.com/javase/6/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.glines.socketio.extension</groupId>
+ <artifactId>socketio-gwt</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Jetty -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-client</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-continuation</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-io</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-websocket</artifactId>
+ <version>7.1.6.v20100715</version>
+ </dependency>
+ <!-- GWT -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
View
60 samples/broadcast/pom.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio.sample</groupId>
+ <artifactId>socketio-sample</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-sample-broadcast</artifactId>
+ <packaging>war</packaging>
+
+ <name>Socket.IO Sample Broadcast</name>
+ <description>${project.name}</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
+ <packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.1.6.v20100715</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <name>org.eclipse.jetty.util.log.DEBUG</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>7.1.6.v20100715</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
5 ...o/examples/broadcast/BroadcastServer.java → ...tio/sample/broadcast/BroadcastServer.java
@@ -21,14 +21,13 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.broadcast;
+package com.glines.socketio.sample.broadcast;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
-import com.glines.socketio.examples.chat.ChatSocketServlet;
import com.glines.socketio.server.transport.FlashSocketTransport;
public class BroadcastServer {
@@ -56,7 +55,7 @@ public static void main(String[] args) throws Exception {
server.addConnector(connector);
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
- ServletHolder holder = new ServletHolder(new ChatSocketServlet());
+ ServletHolder holder = new ServletHolder(new BroadcastSocketServlet());
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_SERVER_HOST_KEY, host);
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_DOMAIN_KEY, host);
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_PORTS_KEY, ""+ port);
View
2 ...les/broadcast/BroadcastSocketServlet.java → ...ple/broadcast/BroadcastSocketServlet.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.broadcast;
+package com.glines.socketio.sample.broadcast;
import java.io.IOException;
import java.util.HashSet;
View
40 samples/broadcast/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <servlet>
+ <servlet-name>BroadcastSocketServlet</servlet-name>
+ <servlet-class>com.glines.socketio.sample.broadcast.BroadcastSocketServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>BroadcastSocketServlet</servlet-name>
+ <url-pattern>/socket.io/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
View
99 samples/chat-gwt/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio.sample</groupId>
+ <artifactId>socketio-sample</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-sample-chat-gwt</artifactId>
+ <packaging>war</packaging>
+
+ <name>Socket.IO Sample Chat GWT</name>
+ <description>${project.name}</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.glines.socketio.extension</groupId>
+ <artifactId>socketio-gwt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>2.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <targetPath>com/glines/socketio/sample/gwtchat</targetPath>
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>gwtchat.html</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <configuration>
+ <logLevel>INFO</logLevel>
+ <style>PRETTY</style>
+ <enableAssertions>true</enableAssertions>
+ <disableClassMetadata>false</disableClassMetadata>
+ <disableCastChecking>false</disableCastChecking>
+ <draftCompile>true</draftCompile>
+ <compileSourcesArtifacts>
+ <compileSourcesArtifact>com.glines.socketio:socketio-core</compileSourcesArtifact>
+ <compileSourcesArtifact>com.glines.socketio.extension:socketio-gwt</compileSourcesArtifact>
+ </compileSourcesArtifacts>
+ <module>com.glines.socketio.sample.gwtchat.GWTChat</module>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
+ <packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.1.6.v20100715</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <name>org.eclipse.jetty.util.log.DEBUG</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
View
2 ...ketio/examples/gwtchat/GWTChatServer.java → ...ocketio/sample/gwtchat/GWTChatServer.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.gwtchat;
+package com.glines.socketio.sample.gwtchat;
import java.io.IOException;
import java.io.InputStream;
View
2 ...xamples/gwtchat/GWTChatSocketServlet.java → .../sample/gwtchat/GWTChatSocketServlet.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.gwtchat;
+package com.glines.socketio.sample.gwtchat;
import java.io.IOException;
import java.util.Collections;
View
2 ...xamples/gwtchat/client/GWTChatClient.java → .../sample/gwtchat/client/GWTChatClient.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.gwtchat.client;
+package com.glines.socketio.sample.gwtchat.client;
import com.glines.socketio.client.common.SocketIOConnection;
import com.glines.socketio.client.gwt.GWTSocketIOConnectionFactory;
View
33 samples/chat-gwt/src/main/resources/com/glines/socketio/sample/gwtchat/GWTChat.gwt.xml
@@ -0,0 +1,33 @@
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+
+<module>
+ <inherits name="com.google.gwt.user.User"/>
+ <inherits name="com.google.gwt.json.JSON"/>
+ <inherits name="com.google.gwt.user.theme.standard.Standard"/>
+ <inherits name="com.glines.socketio.client.Client"/>
+ <source path="client"/>
+ <entry-point class="com.glines.socketio.sample.gwtchat.client.GWTChatClient"/>
+</module>
View
44 samples/chat-gwt/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <servlet>
+ <servlet-name>GWTChatSocketServlet</servlet-name>
+ <servlet-class>com.glines.socketio.sample.gwtchat.GWTChatSocketServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>GWTChatSocketServlet</servlet-name>
+ <url-pattern>/socket.io/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>gwtchat.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
View
26 ...es/socketio/examples/gwtchat/gwtchat.html → ...les/chat-gwt/src/main/webapp/gwtchat.html
@@ -1,3 +1,27 @@
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
<!doctype html>
<html>
<head>
@@ -24,7 +48,7 @@
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
- <script language="javascript" src="com.glines.socketio.examples.gwtchat.GWTChat/com.glines.socketio.examples.gwtchat.GWTChat.nocache.js"></script>
+ <script language="javascript" src="com.glines.socketio.sample.gwtchat.GWTChat/com.glines.socketio.sample.gwtchat.GWTChat.nocache.js"></script>
</head>
View
62 samples/chat/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio.sample</groupId>
+ <artifactId>socketio-sample</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-sample-chat</artifactId>
+ <packaging>war</packaging>
+
+ <name>Socket.IO Sample Chat</name>
+ <description>${project.name}</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <targetPath>com/glines/socketio/sample/chat</targetPath>
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>chat.html</include>
+ <include>json.js</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
+ <packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.1.6.v20100715</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <name>org.eclipse.jetty.util.log.DEBUG</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
2 ...es/socketio/examples/chat/ChatServer.java → ...ines/socketio/sample/chat/ChatServer.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.chat;
+package com.glines.socketio.sample.chat;
import java.io.IOException;
import java.io.InputStream;
View
2 ...etio/examples/chat/ChatSocketServlet.java → ...cketio/sample/chat/ChatSocketServlet.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.chat;
+package com.glines.socketio.sample.chat;
import java.io.IOException;
import java.util.Collections;
View
44 samples/chat/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <servlet>
+ <servlet-name>ChatSocketServlet</servlet-name>
+ <servlet-class>com.glines.socketio.sample.chat.ChatSocketServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ChatSocketServlet</servlet-name>
+ <url-pattern>/socket.io/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>chat.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
View
24 ...m/glines/socketio/examples/chat/chat.html → samples/chat/src/main/webapp/chat.html
@@ -1,3 +1,27 @@
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
<!doctype html>
<html>
<head>
View
0 ...com/glines/socketio/examples/chat/json.js → samples/chat/src/main/webapp/json.js
File renamed without changes.
View
52 samples/echo/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio.sample</groupId>
+ <artifactId>socketio-sample</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <artifactId>socketio-sample-echo</artifactId>
+ <packaging>war</packaging>
+
+ <name>Socket.IO Sample Echo</name>
+ <description>${project.name}</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio-core</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
+ <packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.1.6.v20100715</version>
+ <configuration>
+ <systemProperties>
+ <systemProperty>
+ <name>org.eclipse.jetty.util.log.DEBUG</name>
+ <value>true</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
5 ...es/socketio/examples/echo/EchoServer.java → ...ines/socketio/sample/echo/EchoServer.java
@@ -21,14 +21,13 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.echo;
+package com.glines.socketio.sample.echo;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
-import com.glines.socketio.examples.chat.ChatSocketServlet;
import com.glines.socketio.server.transport.FlashSocketTransport;
public class EchoServer {
@@ -56,7 +55,7 @@ public static void main(String[] args) throws Exception {
server.addConnector(connector);
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
- ServletHolder holder = new ServletHolder(new ChatSocketServlet());
+ ServletHolder holder = new ServletHolder(new EchoSocketServlet());
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_SERVER_HOST_KEY, host);
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_DOMAIN_KEY, host);
holder.setInitParameter(FlashSocketTransport.FLASHPOLICY_PORTS_KEY, ""+ port);
View
2 ...etio/examples/echo/EchoSocketServlet.java → ...cketio/sample/echo/EchoSocketServlet.java
@@ -21,7 +21,7 @@
* THE SOFTWARE.
*/
-package com.glines.socketio.examples.echo;
+package com.glines.socketio.sample.echo;
import java.io.IOException;
import java.util.HashSet;
View
40 samples/echo/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ The MIT License
+ Copyright (c) 2010 Tad Glines
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <servlet>
+ <servlet-name>EchoSocketServlet</servlet-name>
+ <servlet-class>com.glines.socketio.sample.echo.EchoSocketServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EchoSocketServlet</servlet-name>
+ <url-pattern>/socket.io/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
View
72 samples/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>com.glines.socketio</groupId>
+ <artifactId>socketio</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+ <groupId>com.glines.socketio.sample</groupId>
+ <artifactId>socketio-sample</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Socket.IO Samples</name>
+ <description>Socket.IO Java Samples</description>
+
+ <modules>
+ <module>broadcast</module>
+ <module>chat</module>
+ <module>chat-gwt</module>
+ <module>echo</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-continuation</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-io</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <!--
+ The jetty-maven-plugin won't include this jar on the class path unless
+ the scope is compile or runtime. Because maven doesn't support specifying multiple
+ scopes the scope here is set to "compile" and the jar is then excluded from the
+ war's via "packageExcludes"
+ TODO: Fix this once the jetty-maven-plugin gets fixed
+ -->
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-websocket</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
View
27 src/com/glines/socketio/Common.gwt.xml
@@ -1,27 +0,0 @@
-<!--
- * The MIT License
- * Copyright (c) 2010 Tad Glines
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
--->
-
-<module>
- <inherits name="com.google.gwt.core.Core"/>
- <source path="common"/>
-</module>
View
32 src/com/glines/socketio/client/Client.gwt.xml
@@ -1,32 +0,0 @@
-<!--
- * The MIT License
- * Copyright (c) 2010 Tad Glines
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
--->
-
-<module>
- <inherits name="com.google.gwt.core.Core"/>
- <inherits name="com.glines.socketio.Common"/>
-
- <script src="/socket.io/socket.io.js"/>
-
- <source path="common"/>
- <source path="gwt"/>
-</module>
View
31 src/com/glines/socketio/examples/gwtchat/GWTChat.gwt.xml
@@ -1,31 +0,0 @@
-<!--
- * The MIT License
- * Copyright (c) 2010 Tad Glines
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
--->
-
-<module>
- <inherits name="com.google.gwt.user.User"/>
- <inherits name="com.google.gwt.json.JSON"/>
- <inherits name="com.google.gwt.user.theme.standard.Standard"/>
- <inherits name="com.glines.socketio.client.Client"/>
- <source path="client"/>
- <entry-point class="com.glines.socketio.examples.gwtchat.client.GWTChatClient"/>
-</module>
View
82 src/com/glines/socketio/examples/text/TextClient.java
@@ -1,82 +0,0 @@
-/**
- * The MIT License
- * Copyright (c) 2010 Tad Glines
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package com.glines.socketio.examples.text;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import com.glines.socketio.client.common.SocketIOConnection;
-import com.glines.socketio.client.jre.SocketIOConnectionXHRBase;
-import com.glines.socketio.common.DisconnectReason;
-
-public class TextClient {
- public static synchronized void print(String str) {
- System.out.println(str);
- System.out.flush();
- }
-
- public static void main(String[] args) throws Exception {
- String host = "localhost";
- int port = 8080;
- String transport;
-
- if (args.length < 3) {
- System.exit(-1);
- }
-
- host = args[0];
- port = Integer.parseInt(args[1]);
- transport = args[2];
-
-
- SocketIOConnectionXHRBase client = new SocketIOConnectionXHRBase(
- new SocketIOConnection.SocketIOConnectionListener() {
-
- @Override
- public void onConnect() {
- print("Connected");
- }
-
- @Override
- public void onDisconnect(DisconnectReason reason,
- String errorMessage) {
- print("Disconnected: " + reason + ": " + errorMessage);
- System.exit(-1);
- }
-
- @Override
- public void onMessage(int messageType, String message) {
- print((String)message);
- }
-
- },
- host, (short)port, transport, false);
- client.connect();
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- String line;
- while ((line = in.readLine()) != null) {
- client.sendMessage(line);
- }
- }
-}