Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Mavenized the project #127

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="examples"/>
<classpathentry kind="src" path="tests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="examples">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="tests">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="libs/json-org.jar"/>
<classpathentry kind="lib" path="libs/WebSocket.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin/
jar/
/target/
/.DS_Store
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#Thu Dec 22 15:57:36 CET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
Expand All @@ -9,4 +8,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Empty file modified LICENSE
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions README.markdown
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
I forked this from "Gottox/socket.io-java-client":
The only thing I did is to **mavenize the whole project** and get rid of the lib folder.

So all other stuff was not touched.

---

[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=Gottox&url=https://github.com/Gottox/socket.io-java-client&title=socket.io-java-client&language=&tags=github&category=software)

# Socket.IO-Client for Java
Expand Down
Empty file modified build.xml
100644 → 100755
Empty file.
Empty file modified doc/AcknowledgeExample.html
100644 → 100755
Empty file.
Empty file modified doc/BasicExample.html
100644 → 100755
Empty file.
Empty file modified doc/BasicExample2.html
100644 → 100755
Empty file.
Empty file modified doc/Example.html
100644 → 100755
Empty file.
Empty file modified doc/Test.html
100644 → 100755
Empty file.
Empty file modified doc/allclasses-frame.html
100644 → 100755
Empty file.
Empty file modified doc/allclasses-noframe.html
100644 → 100755
Empty file.
Empty file modified doc/basic/AcknowledgeExample.html
100644 → 100755
Empty file.
Empty file modified doc/basic/BasicExample.html
100644 → 100755
Empty file.
Empty file modified doc/basic/BasicExample2.html
100644 → 100755
Empty file.
Empty file modified doc/basic/class-use/AcknowledgeExample.html
100644 → 100755
Empty file.
Empty file modified doc/basic/class-use/BasicExample.html
100644 → 100755
Empty file.
Empty file modified doc/basic/class-use/BasicExample2.html
100644 → 100755
Empty file.
Empty file modified doc/basic/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/basic/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/basic/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/basic/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/chat/Chat.html
100644 → 100755
Empty file.
Empty file modified doc/chat/ChatCallback.html
100644 → 100755
Empty file.
Empty file modified doc/chat/ChatCallbackAdapter.html
100644 → 100755
Empty file.
Empty file modified doc/chat/ChatFrame.html
100644 → 100755
Empty file.
Empty file modified doc/chat/class-use/Chat.html
100644 → 100755
Empty file.
Empty file modified doc/chat/class-use/ChatCallback.html
100644 → 100755
Empty file.
Empty file modified doc/chat/class-use/ChatCallbackAdapter.html
100644 → 100755
Empty file.
Empty file modified doc/chat/class-use/ChatFrame.html
100644 → 100755
Empty file.
Empty file modified doc/chat/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/chat/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/chat/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/chat/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/class-use/AcknowledgeExample.html
100644 → 100755
Empty file.
Empty file modified doc/class-use/BasicExample.html
100644 → 100755
Empty file.
Empty file modified doc/class-use/BasicExample2.html
100644 → 100755
Empty file.
Empty file modified doc/class-use/Example.html
100644 → 100755
Empty file.
Empty file modified doc/class-use/Test.html
100644 → 100755
Empty file.
Empty file modified doc/constant-values.html
100644 → 100755
Empty file.
Empty file modified doc/deprecated-list.html
100644 → 100755
Empty file.
Empty file modified doc/help-doc.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-1.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-10.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-11.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-12.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-13.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-14.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-15.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-16.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-17.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-18.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-19.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-2.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-20.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-21.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-3.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-4.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-5.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-6.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-7.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-8.html
100644 → 100755
Empty file.
Empty file modified doc/index-files/index-9.html
100644 → 100755
Empty file.
Empty file modified doc/index.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/AbstractTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/AllTests.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/IOAcknowledge.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/IOCallback.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/IOConnection.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/IOMessage.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/IOTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/SocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/SocketIOException.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/WebsocketTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/WebsocketTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/XHRTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/XhrTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/AbstractTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/AllTests.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/IOAcknowledge.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/IOCallback.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/IOConnection.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/IOMessage.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/IOTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/SocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/SocketIOException.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/WebsocketTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/WebsocketTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/XHRTestSocketIO.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/class-use/XhrTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/MutateProxy.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/RandomBlockJUnit4ClassRunner.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/class-use/MutateProxy.html
100644 → 100755
Empty file.
Empty file.
Empty file modified doc/io/socket/testutils/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/testutils/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/WebsocketTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/XhrTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/class-use/WebsocketTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/class-use/XhrTransport.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/io/socket/transports/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/overview-frame.html
100644 → 100755
Empty file.
Empty file modified doc/overview-summary.html
100644 → 100755
Empty file.
Empty file modified doc/overview-tree.html
100644 → 100755
Empty file.
Empty file modified doc/package-frame.html
100644 → 100755
Empty file.
Empty file modified doc/package-list
100644 → 100755
Empty file.
Empty file modified doc/package-summary.html
100644 → 100755
Empty file.
Empty file modified doc/package-tree.html
100644 → 100755
Empty file.
Empty file modified doc/package-use.html
100644 → 100755
Empty file.
Empty file modified doc/resources/inherit.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/schema.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified doc/serialized-form.html
100644 → 100755
Empty file.
Empty file modified doc/stylesheet.css
100644 → 100755
Empty file.
Empty file modified examples/basic/AcknowledgeExample.java
100644 → 100755
Empty file.
Empty file modified examples/basic/BasicExample.java
100644 → 100755
Empty file.
Empty file modified examples/basic/BasicExample2.java
100644 → 100755
Empty file.
Empty file modified examples/chat/Chat.java
100644 → 100755
Empty file.
Empty file modified examples/chat/ChatCallback.java
100644 → 100755
Empty file.
Empty file modified examples/chat/ChatCallbackAdapter.java
100644 → 100755
Empty file.
Empty file modified examples/chat/ChatFrame.form
100644 → 100755
Empty file.
Empty file modified examples/chat/ChatFrame.java
100644 → 100755
Empty file.
Empty file modified examples/chat/server.js
100644 → 100755
Empty file.
Binary file removed libs/WebSocket.jar
Binary file not shown.
Binary file removed libs/json-org.jar
Binary file not shown.
53 changes: 53 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>socket.io-java-client</groupId>
<artifactId>socket.io-java-client</artifactId>
<version>1.0.0</version>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>tests</testSourceDirectory>
<resources>
<resource>
<directory>examples</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>tests</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
</project>
Empty file modified src/io/socket/IOAcknowledge.java
100644 → 100755
Empty file.
Empty file modified src/io/socket/IOCallback.java
100644 → 100755
Empty file.
31 changes: 31 additions & 0 deletions src/io/socket/IOCallbackAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package io.socket;

import org.json.JSONObject;

public class IOCallbackAdapter implements IOCallback {

@Override
public void onDisconnect() {
}

@Override
public void onConnect() {
}

@Override
public void onMessage(String data, IOAcknowledge ack) {
}

@Override
public void onMessage(JSONObject json, IOAcknowledge ack) {
}

@Override
public void on(String event, IOAcknowledge ack, Object... args) {
}

@Override
public void onError(SocketIOException socketIOException) {
}

}
14 changes: 2 additions & 12 deletions src/io/socket/IOConnection.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.logging.Logger;

import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;

import org.json.JSONArray;
import org.json.JSONException;
Expand All @@ -37,6 +37,7 @@
* The Class IOConnection.
*/
class IOConnection implements IOCallback {

/** Debug logger */
static final Logger logger = Logger.getLogger("io.socket");

Expand Down Expand Up @@ -431,7 +432,6 @@ private synchronized void cleanup() {
else
connections.remove(urlStr);
}
logger.info("Cleanup");
backgroundTimer.cancel();
}

Expand All @@ -457,10 +457,8 @@ private void error(SocketIOException e) {
private synchronized void sendPlain(String text) {
if (getState() == STATE_READY)
try {
logger.info("> " + text);
transport.send(text);
} catch (Exception e) {
logger.info("IOEx: saving");
outputBuffer.add(text);
}
else {
Expand Down Expand Up @@ -527,15 +525,8 @@ public synchronized void transportConnected() {
ConcurrentLinkedQueue<String> outputBuffer = this.outputBuffer;
this.outputBuffer = new ConcurrentLinkedQueue<String>();
try {
// DEBUG
String[] texts = outputBuffer.toArray(new String[outputBuffer
.size()]);
logger.info("Bulk start:");
for (String text : texts) {
logger.info("> " + text);
}
logger.info("Bulk end");
// DEBUG END
transport.sendBulk(texts);
} catch (IOException e) {
this.outputBuffer = outputBuffer;
Expand Down Expand Up @@ -610,7 +601,6 @@ public void transportData(String text) {
* the text
*/
public void transportMessage(String text) {
logger.info("< " + text);
IOMessage message;
try {
message = new IOMessage(text);
Expand Down
Empty file modified src/io/socket/IOMessage.java
100644 → 100755
Empty file.
Empty file modified src/io/socket/IOTransport.java
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion src/io/socket/SocketIO.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.Properties;

import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;

import org.json.JSONObject;

Expand Down
Empty file modified src/io/socket/SocketIOException.java
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion src/io/socket/WebsocketTransport.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;

import org.java_websocket.client.DefaultSSLWebSocketClientFactory;
import org.java_websocket.client.WebSocketClient;
Expand Down
Empty file modified src/io/socket/XhrTransport.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/AbstractTestSocketIO.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/AllTests.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/WebsocketTestSocketIO.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/XHRTestSocketIO.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/testutils/MutateProxy.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/testutils/RandomBlockJUnit4ClassRunner.java
100644 → 100755
Empty file.
Empty file modified tests/io/socket/testutils/socketio.js
100644 → 100755
Empty file.