Permalink
Browse files

Merge branch 'CL-281'

  • Loading branch information...
2 parents e910b09 + 1a4e31a commit df3ef714ba0be8ea138fa724397946702731730f geremy cohen committed Dec 1, 2012
Showing with 2,171 additions and 0 deletions.
  1. 0 {java/3.3/src → gwt/3.3/bin}/org/json/.gitignore
  2. 0 {java → gwt}/3.3/java-build
  3. BIN gwt/3.3/lib/async-http-client-1.6.5-shaded.jar
  4. BIN gwt/3.3/lib/slf4j-nop-1.6.2.jar
  5. +40 −0 gwt/3.3/pom.xml
  6. +1 −0 gwt/3.3/src/org/json/.gitignore
  7. 0 {java → gwt}/3.3/src/org/json/CDL.java
  8. 0 {java → gwt}/3.3/src/org/json/Cookie.java
  9. 0 {java → gwt}/3.3/src/org/json/CookieList.java
  10. 0 {java → gwt}/3.3/src/org/json/HTTP.java
  11. 0 {java → gwt}/3.3/src/org/json/HTTPTokener.java
  12. 0 {java → gwt}/3.3/src/org/json/JSONArray.java
  13. 0 {java → gwt}/3.3/src/org/json/JSONException.java
  14. 0 {java → gwt}/3.3/src/org/json/JSONML.java
  15. 0 {java → gwt}/3.3/src/org/json/JSONObject.java
  16. 0 {java → gwt}/3.3/src/org/json/JSONString.java
  17. 0 {java → gwt}/3.3/src/org/json/JSONStringer.java
  18. 0 {java → gwt}/3.3/src/org/json/JSONTokener.java
  19. 0 {java → gwt}/3.3/src/org/json/JSONWriter.java
  20. 0 {java → gwt}/3.3/src/org/json/Test.java
  21. 0 {java → gwt}/3.3/src/org/json/XML.java
  22. 0 {java → gwt}/3.3/src/org/json/XMLTokener.java
  23. 0 {java → gwt}/3.3/src/pubnub/api/Callback.java
  24. 0 {java → gwt}/3.3/src/pubnub/api/Pubnub.java
  25. 0 {java → gwt}/3.3/src/pubnub/example/PubnubExample.java
  26. 0 {java → gwt}/3.3/src/pubnub/unit_test/PubnubUnitTest.java
  27. 0 {java → gwt}/3.3/src/pubnub/unit_test/PubnubUnitTestRunner.java
  28. BIN gwt/3.3/test/PubnubExample.jar
  29. BIN gwt/3.3/test/PubnubUnitTest.jar
  30. +15 −0 gwt/README.md
  31. +121 −0 java/3.3/build.xml
  32. BIN java/3.3/lib/json.jar
  33. BIN java/3.3/lib/junit.jar
  34. BIN java/3.3/lib/org.hamcrest.core_1.1.0.v20090501071000.jar
  35. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/JIJConstants.class
  36. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader$ManifestInfo.class
  37. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.class
  38. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.class
  39. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.class
  40. BIN java/3.3/lib/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.class
  41. +15 −0 java/3.3/src/com/pubnub/api/Callback.java
  42. +1,274 −0 java/3.3/src/com/pubnub/api/Pubnub.java
  43. +28 −0 java/3.3/src/com/pubnub/api/PubnubException.java
  44. +267 −0 java/3.3/src/com/pubnub/examples/PubnubExample.java
  45. +384 −0 java/3.3/src/com/pubnub/tests/PubnubUnitTest.java
  46. +26 −0 java/3.3/src/com/pubnub/tests/PubnubUnitTestRunner.java
  47. BIN java/3.3/test/PubnubExample.jar
  48. BIN java/3.3/test/PubnubUnitTest.jar
File renamed without changes.
Binary file not shown.
Binary file not shown.
View
@@ -0,0 +1,40 @@
+<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>pubnub</groupId>
+ <artifactId>pubnub</artifactId>
+ <packaging>jar</packaging>
+ <version>3.1</version>
+ <name>pubnub</name>
+ <url>https://github.com/pubnub/pubnub-api/</url>
+ <build>
+ <sourceDirectory>${basedir}/src/</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20090211</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ning</groupId>
+ <artifactId>async-http-client</artifactId>
+ <version>1.6.5</version>
+ <classifier>shaded</classifier>
+ </dependency>
+ </dependencies>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+</project>
@@ -0,0 +1 @@
+*.class
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
View
@@ -0,0 +1,15 @@
+
+##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
+##### http://www.pubnub.com/account
+
+## PubNub 3.3 Real-time Cloud Push API - JAVA
+
+www.pubnub.com - PubNub Real-time Push Service in the Cloud.
+http://www.pubnub.com/tutorial/java-push-api
+
+Please reference the unit-tests and examples for usage on basic functionality,
+including presence(), here_now(), and detailedHistory().
+
+JDK 1.7 required to run the precompiled tests and examples in 3.3/test. Example usage:
+
+/opt/jdk1.7.0_04/bin/java -jar PubnubUnitTest.jar
View
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project basedir="." default="build" name="pubnub">
+ <property environment="env" />
+ <property name="debuglevel" value="source,lines,vars" />
+ <property name="target" value="1.5" />
+ <property name="source" value="1.5" />
+ <path id="pubnub.classpath">
+ <pathelement location="bin" />
+ <pathelement location="lib/async-http-client-1.6.5-shaded.jar" />
+ <pathelement location="lib/junit.jar" />
+ <pathelement location="lib/json.jar" />
+ <pathelement location="lib/slf4j-nop-1.6.2.jar" />
+ </path>
+ <target name="init">
+ <mkdir dir="bin" />
+ <copy includeemptydirs="false" todir="bin">
+ <fileset dir="src">
+ <exclude name="**/*.launch" />
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+ <target name="clean">
+ <delete dir="bin" />
+ </target>
+ <target depends="clean" name="cleanall" />
+ <target depends="build-subprojects,build-project,create-examples-jar,create-tests-jar" name="build" />
+ <target name="build-subprojects" />
+ <target depends="init" name="build-project">
+ <echo message="${ant.project.name}: ${ant.file}" />
+ <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
+ <src path="src" />
+ <classpath refid="pubnub.classpath" />
+ </javac>
+ </target>
+
+
+ <macrodef name="delete_old_jar">
+ <attribute name="jar.filename" />
+ <sequential>
+ <delete file="@{jar.filename}">
+ </delete>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="create_dirs">
+ <sequential>
+ <mkdir dir="jar_temp" />
+ <mkdir dir="jar_temp/META-INF" />
+ </sequential>
+ </macrodef>
+
+ <macrodef name="delete_temp_dirs">
+ <sequential>
+ <delete dir="jar_temp">
+ </delete>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="create_manifest">
+ <attribute name="jar.classname" />
+ <sequential>
+ <manifest file="jar_temp/META-INF/MANIFEST.MF">
+ <attribute name="Manifest-Version" value="1.0" />
+ <attribute name="Version" value="3.3" />
+ <attribute name="Company" value="Pubnub" />
+ <attribute name="Project" value="pubnub-api" />
+ <attribute name="Java-Version" value="${java.version}" />
+ <attribute name="Rsrc-Class-Path" value="./ org.hamcrest.core_1.1.0.v20090501071000.jar slf4j-nop-1.6.2.jar async-http-client-1.6.5-shaded.jar junit.jar json.jar" />
+ <attribute name="Class-Path" value="." />
+ <attribute name="Rsrc-Main-Class" value="@{jar.classname}" />
+ <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" />
+ </manifest>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="create_jar">
+ <attribute name="jar.filename" />
+ <sequential>
+ <jar destfile="test/@{jar.filename}" manifest="jar_temp/META-INF/MANIFEST.MF" basedir="jar_temp">
+ </jar>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="copy_class_files">
+ <sequential>
+ <copy todir="jar_temp">
+ <fileset dir="bin">
+ <include name="*/**" />
+ </fileset>
+ <fileset dir="lib">
+ <include name="*/**" />
+ </fileset>
+ </copy>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="create-jar">
+ <attribute name="jar.type" />
+ <attribute name="jar.classname" />
+ <attribute name="jar.filename" />
+
+
+ <sequential>
+ <delete_old_jar jar.filename="@{jar.filename}" />
+ <create_dirs />
+ <create_manifest jar.classname="@{jar.classname}" />
+ <copy_class_files />
+ <create_jar jar.filename="@{jar.filename}" />
+ <delete_temp_dirs />
+ </sequential>
+ </macrodef>
+
+ <target name="create-examples-jar">
+ <create-jar jar.type="examples" jar.classname="com.pubnub.examples.PubnubExample" jar.filename="PubnubExample.jar" />
+ </target>
+ <target name="create-tests-jar">
+ <create-jar jar.type="tests" jar.classname="com.pubnub.tests.PubnubUnitTestRunner" jar.filename="PubnubUnitTest.jar" />
+ </target>
+
+</project>
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
+package com.pubnub.api;
+
+public interface Callback {
+
+ public abstract boolean successCallback(String channel, Object message);
+
+ public abstract void errorCallback(String channel, Object message);
+
+ public abstract void connectCallback(String channel);
+
+ public abstract void reconnectCallback(String channel);
+
+ public abstract void disconnectCallback(String channel);
+
+}
Oops, something went wrong.

0 comments on commit df3ef71

Please sign in to comment.