diff --git a/.directory b/.directory
new file mode 100644
index 000000000..455d8a3ed
--- /dev/null
+++ b/.directory
@@ -0,0 +1,7 @@
+[Dolphin]
+Timestamp=2013,5,31,1,23,30
+Version=3
+ViewMode=2
+
+[Settings]
+HiddenFilesShown=true
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..641ab5991
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,44 @@
+# built application files
+*.apk
+*.ap_
+
+# files for the dex VM
+*.dex
+
+# Java class files
+*.class
+
+# generated files
+bin/
+gen/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Eclipse project files
+.classpath
+.project
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Intellij project files
+*.iml
+*.ipr
+*.iws
+.idea/
+
+*.class
+
+# gwt caches and compiled units #
+war/gwt_bree/
+gwt-unitCache/
+
+# boilerplate generated classes #
+.apt_generated/
+
+# more caches and things from deploy #
+war/WEB-INF/deploy/
+war/WEB-INF/classes/
+
+
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 000000000..27e454cc3
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,51 @@
+11-06-13 3.5.6
+. fixed socket timeout exception handling
+. make PNERR_HTTP_RC_ERROR public
+. encryption logic is made public for developers to integrate with their own logic
+. always honor retry interval
+. backwards compatible (3.1) encryption support
+. adding windowing feature to java clients
+
+08-27-13 3.5.5
+. better handling of double quoted strings
+. make auth key optional for audit
+. update encoding parameters for signature generation
+. debug jar and maven deployment
+
+07-11-13 3.5.4
+. fixed issue with PAM audit when auth key is set
+. fixed issue in cn1 where global headers were not getting added
+. fixed issue in PAM, where ttl 0 was being considered invalid
+
+07-09-13 3.5.3
+. added constructor for setting iv
+. beta1 of CN1 port
+. added constructor for setting PAM grant TTL (minutes)
+. migrate ULS* methods to PAM* methods
+. first version of scala console
+. fix ant debug-build from any source path
+
+07-01-13 3.5.2
+. Introduced PubnubError class object passing to errorCallback
+. ULS APIs
+. Consolidated CHANGELOG to root of repo
+. set origin feature
+. set cache-busting feature
+
+
+06-07-13
+. better handling in multithreaded environments
+. better debug log handling
+
+02-20-2013 - 800478550d9dfa19ae626ee7fd0f774f35254e1b
+. added additional versioning support for maven
+. jar refactor
+
+02-01-2013 - 8a686c91cb546787a6be7810b96b806c33cf96e7
+. client is now fully asyncronous
+. added enhanced multiplexed subscribe support
+. better error handling added to example app
+. improved keep-alive handling
+. support for chunked responses
+. improved logging
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..62c67adf4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+#PubNub Java-based APIs for core Java, Android, J2ME, BlackBerry.
+Learn more at http://www.pubnub.com
+
+## Migrating from 3.5.1 and older...
+
+3.5.2+ is backward compatible with 3.5.1. Some of the methods have been deprecated.
+You will see compiler warnings for the same. Please refer to java docs for alternate
+methods to be used.
+
+Its recommended to remove the usage of Deprecated methods as they will be removed in
+3.6.0 .
+
+
+## Subdirectory Description
+This repo contains the following platform-specific subdirectories:
+
+### Android
+Client for the Mobile Android OS
+
+### GWT
+Client for the GWT Platform
+
+### J2ME
+Client for the J2ME Mobile Platform
+
+### Blackberry
+Client for the Blackberry Mobile Platform
+
+### Java
+Everything else! Java development for POJOs, J2EE, J2SE, etc.
+
+### Java for Google App Engine
+See the Java subdir, and the GAE_3.3 tag
+
+### Codename One
+Easy amazing, fast, native mobile app development using Java™ for all platforms
+See the [codenameone](codenameone) subdir for client and example code.
diff --git a/VERSION b/VERSION
new file mode 100644
index 000000000..c49282585
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+3.5.6
diff --git a/android/CHANGELOG b/android/CHANGELOG
new file mode 100644
index 000000000..f1febed1b
--- /dev/null
+++ b/android/CHANGELOG
@@ -0,0 +1,5 @@
+03-18-13
+Fixing URL encoding bug in Android
+
+02-19-13 - ff0bf5d8cf5402983072e6f1666b6eb4e1a58926
+Moving 3.4 code into a new repo from the old repository @ cf8baca03090b6052fb11625e15bb0fb75d39fe3
diff --git a/android/LICENSE b/android/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/android/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/android/Pubnub-Android-3.5.6.jar b/android/Pubnub-Android-3.5.6.jar
new file mode 100644
index 000000000..910a1efaf
Binary files /dev/null and b/android/Pubnub-Android-3.5.6.jar differ
diff --git a/android/Pubnub-Android-Debug-3.5.6.jar b/android/Pubnub-Android-Debug-3.5.6.jar
new file mode 100644
index 000000000..910a1efaf
Binary files /dev/null and b/android/Pubnub-Android-Debug-3.5.6.jar differ
diff --git a/android/README.md b/android/README.md
new file mode 100644
index 000000000..848179df9
--- /dev/null
+++ b/android/README.md
@@ -0,0 +1,219 @@
+### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
+
+http://www.pubnub.com/account
+
+## PubNub 3.5 Real-time Cloud Push API - ANDROID
+
+PubNub is a Massively Scalable Real-time Service for Web and Mobile Games.
+This is a cloud-based service for broadcasting Real-time messages
+to thousands of web and mobile clients simultaneously.
+
+The PubNub Android client provides a superior alternative to C2DM for broadcasting messages to entire user base.
+C2DM is hard to implement, and it imposes artificial limits for you to reach your users quickly.
+C2DM is not recommended as it is a "broadcast" mechanism according to Google. C2DM is Slow, and limited to 1 message at a time.
+Use PubNub Instead!
+
+## Getting started with Pubnub in your app
+
+Checkout the [walkthrough video](https://vimeo.com/71554109) first!
+
+To use Pubnub, simply copy the Pubnub-Android-3.4.jar and bcprov-jdk15on-1.47.jar files in to your project's libs directory.
+These files can be found at pubnub/java/android/3.4/Pubnub-Android-3.4.jar and pubnub/java/java/3.4/libs/bcprov-jdk15on-1.47.jar.
+
+### PubNub Android Sample App
+
+This app demonstrates all PubNub features and functionality. It can be found in 3.4/examples/PubnubExample directory.
+
+### Pubnub Auto-subscribing, Auto-startup App
+This is a sample app which subscribes to channel **"hello_world"** on receiving the **android.intent.action.BOOT_COMPLETED** intent.
+The user is alerted about events like connect, message received etc. via notifications.
+
+Code for this app can be found in the 3.4/examples/SubscribeAtBoot directory.
+
+## Building the Pubnub library jar
+
+Pubnub library jar can be built by running following commands. ( Jar is already present in repository )
+```
+$ ant clean
+$ ant
+```
+
+Pubnub library jar with debug messages enabled can be built by running following commands
+```
+$ ant clean
+$ and debug-build
+```
+
+##Connection Durability: Reconnecting & Resuming when a connection is lost or changed
+
+As a mobile device may lose its connection under many different circumstances (IP change, roaming, etc), any current in-process subscribe operations can be forced
+to reconnect (and optionally catchup where left off) when any change has occured in the network environment. This is done by calling the
+**disconnectAndResubscribe()** method on the PubNub instance.
+
+The demo application has examples of setting up a broadcast receiver for the **ConnectivityManager.CONNECTIVITY_ACTION**.
+The **onReceive()** method is where it checks for certain (or any) network change conditions, and
+calls **disconnectAndResubscribe()** as needed.
+
+```java
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ this.registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context arg0, Intent intent) {
+ pubnub.disconnectAndResubscribe();
+ }
+
+ }, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION ));
+```
+
+This logic has been purposely left out of the core and documented in the example application, so that if you wish to
+add additional tests for monitoring a potential zombied subscribe connection, it is very easy to add your own custom logic within this
+given receiver template.
+
+When **disconnectAndResubscribe()** is called, either via the broadcast receiver or otherwise, it will retry maxRetries times
+to reconnect ever retryInterval seconds. You can set these variables with the **setRetryInterval(int milliseconds)** and **setMaxRetries** methods.
+
+If it **not able** to recover network within the given constraints, it will return an error response of [0, ERROR_MSG_STRING].
+
+**setResumeOnReconnect()** allows you to define the behaviour upon successful reconnect.
+
+If it **is able** to recover network, then the subscribe will "catchup", or resume where it left off before the interruption
+if isResumeOnReconnect() is true, otherwise, it will restart and grab only new messages since it reconnected.
+
+
+##Client API Summary
+
+###Init
+```java
+Pubnub pubnub = new Pubnub(
+ "demo", // PUBLISH_KEY (Optional, supply "" to disable)
+ "demo", // SUBSCRIBE_KEY (Required)
+ "", // SECRET_KEY (Optional, supply "" to disable)
+ "", // CIPHER_KEY (Optional, supply "" to disable)
+ false // SSL_ON?
+);
+```
+
+###Publish
+```java
+
+// Setup the argument Hash object to set the message and channel name
+
+Hashtable args = new Hashtable(2);
+
+String message = "Hello PubNub!";
+String message = "hello_world";
+
+args.put("message", message);
+args.put("channel", channel);
+
+// Publish It!
+
+pubnub.publish(args, new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " : " + message.toString());
+ }
+});
+
+```
+
+###Subscribe and Presence
+```java
+
+// Regular Subscribe
+
+Hashtable args = new Hashtable(1);
+
+args.put("channel", channel);
+
+pubnub.subscribe(args, new Callback() {
+ public void connectCallback(String channel) {
+ notifyUser("CONNECT on channel:" + channel);
+ }
+
+ public void disconnectCallback(String channel) {
+ notifyUser("DISCONNECT on channel:" + channel);
+ }
+
+ public void reconnectCallback(String channel) {
+ notifyUser("RECONNECT on channel:" + channel);
+ }
+
+ public void successCallback(String channel, Object message) {
+ notifyUser(channel + " " + message.toString());
+ }
+
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " " + message.toString());
+ }
+});
+
+// Presence
+
+pubnub.presence(channel, new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " : " + message.toString());
+ }
+});
+
+```
+
+###History
+```java
+pubnub.detailedHistory(channel, 2, new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " : " + message.toString());
+ }
+});
+```
+
+###Unsubscribe
+```java
+String channel = "goodbye_world";
+pubnub.unsubscribe(channel);
+```
+
+###Time
+```java
+ // Get server time
+ double time = pubnub.time();
+ System.out.println("Time : "+time);
+```
+
+###UUID
+```java
+ // Get UUID
+ System.out.println("UUID : "+Pubnub.uuid());
+```
+
+###Here Now
+
+```java
+pubnub.hereNow(channel, new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " : " + message.toString());
+ }
+});
+```
+
+
diff --git a/android/build.xml b/android/build.xml
new file mode 100644
index 000000000..54b09d0b9
--- /dev/null
+++ b/android/build.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/examples/PubnubExample/AndroidManifest.xml b/android/examples/PubnubExample/AndroidManifest.xml
new file mode 100644
index 000000000..816d1992e
--- /dev/null
+++ b/android/examples/PubnubExample/AndroidManifest.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/examples/PubnubExample/ic_launcher-web.png b/android/examples/PubnubExample/ic_launcher-web.png
new file mode 100644
index 000000000..424f26042
Binary files /dev/null and b/android/examples/PubnubExample/ic_launcher-web.png differ
diff --git a/android/examples/PubnubExample/libs/Pubnub-Android-3.5.6.jar b/android/examples/PubnubExample/libs/Pubnub-Android-3.5.6.jar
new file mode 100644
index 000000000..910a1efaf
Binary files /dev/null and b/android/examples/PubnubExample/libs/Pubnub-Android-3.5.6.jar differ
diff --git a/android/examples/PubnubExample/libs/android-support-v4.jar b/android/examples/PubnubExample/libs/android-support-v4.jar
new file mode 100644
index 000000000..6080877d4
Binary files /dev/null and b/android/examples/PubnubExample/libs/android-support-v4.jar differ
diff --git a/android/examples/PubnubExample/libs/bcprov-jdk15on-1.47.jar b/android/examples/PubnubExample/libs/bcprov-jdk15on-1.47.jar
new file mode 100644
index 000000000..0b80922e6
Binary files /dev/null and b/android/examples/PubnubExample/libs/bcprov-jdk15on-1.47.jar differ
diff --git a/android/examples/PubnubExample/proguard-project.txt b/android/examples/PubnubExample/proguard-project.txt
new file mode 100644
index 000000000..5b89420db
--- /dev/null
+++ b/android/examples/PubnubExample/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
\ No newline at end of file
diff --git a/android/examples/PubnubExample/project.properties b/android/examples/PubnubExample/project.properties
new file mode 100644
index 000000000..85aac5401
--- /dev/null
+++ b/android/examples/PubnubExample/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-8
diff --git a/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher.png b/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 000000000..0e79b184f
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher.png differ
diff --git a/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher_pubnub.png b/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher_pubnub.png
new file mode 100644
index 000000000..dae531896
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-hdpi/ic_launcher_pubnub.png differ
diff --git a/android/examples/PubnubExample/res/drawable-hdpi/pubnub_large.png b/android/examples/PubnubExample/res/drawable-hdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-hdpi/pubnub_large.png differ
diff --git a/android/examples/PubnubExample/res/drawable-ldpi/ic_launcher.png b/android/examples/PubnubExample/res/drawable-ldpi/ic_launcher.png
new file mode 100644
index 000000000..ebfac7d78
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-ldpi/ic_launcher.png differ
diff --git a/android/examples/PubnubExample/res/drawable-ldpi/pubnub_large.png b/android/examples/PubnubExample/res/drawable-ldpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-ldpi/pubnub_large.png differ
diff --git a/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher.png b/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 000000000..118344193
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher.png differ
diff --git a/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher_pubnub.png b/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher_pubnub.png
new file mode 100644
index 000000000..94ca3a50f
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-mdpi/ic_launcher_pubnub.png differ
diff --git a/android/examples/PubnubExample/res/drawable-mdpi/pubnub_large.png b/android/examples/PubnubExample/res/drawable-mdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-mdpi/pubnub_large.png differ
diff --git a/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher.png b/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..c8ab2a114
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher_pubnub.png b/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher_pubnub.png
new file mode 100644
index 000000000..1ed434174
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-xhdpi/ic_launcher_pubnub.png differ
diff --git a/android/examples/PubnubExample/res/drawable-xhdpi/pubnub_large.png b/android/examples/PubnubExample/res/drawable-xhdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-xhdpi/pubnub_large.png differ
diff --git a/android/examples/PubnubExample/res/drawable-xxhdpi/ic_launcher_pubnub.png b/android/examples/PubnubExample/res/drawable-xxhdpi/ic_launcher_pubnub.png
new file mode 100644
index 000000000..290fc06b6
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable-xxhdpi/ic_launcher_pubnub.png differ
diff --git a/android/examples/PubnubExample/res/drawable/icon.png b/android/examples/PubnubExample/res/drawable/icon.png
new file mode 100644
index 000000000..08ee50da9
Binary files /dev/null and b/android/examples/PubnubExample/res/drawable/icon.png differ
diff --git a/android/examples/PubnubExample/res/layout/usage.xml b/android/examples/PubnubExample/res/layout/usage.xml
new file mode 100644
index 000000000..867516d04
--- /dev/null
+++ b/android/examples/PubnubExample/res/layout/usage.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/examples/PubnubExample/res/menu/activity_main.xml b/android/examples/PubnubExample/res/menu/activity_main.xml
new file mode 100644
index 000000000..8a1c582d2
--- /dev/null
+++ b/android/examples/PubnubExample/res/menu/activity_main.xml
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/android/examples/PubnubExample/res/values/dimens.xml b/android/examples/PubnubExample/res/values/dimens.xml
new file mode 100644
index 000000000..a67ff7099
--- /dev/null
+++ b/android/examples/PubnubExample/res/values/dimens.xml
@@ -0,0 +1,12 @@
+
+
+ 300dip
+ 150dip
+ 100dip
+ 20dip
+ 30dip
+ 15dip
+ 11dip
+ 10dip
+ 20dip
+
diff --git a/android/examples/PubnubExample/res/values/strings.xml b/android/examples/PubnubExample/res/values/strings.xml
new file mode 100644
index 000000000..a870ddeca
--- /dev/null
+++ b/android/examples/PubnubExample/res/values/strings.xml
@@ -0,0 +1,40 @@
+
+
+
+ PubnubExample
+ Pubnub
+ Hello world!
+ Settings
+ History
+ Presence
+ Subscribe
+ Publish
+ History
+ Disconnect and Resubscribe
+ History
+ Toggle Catchup
+ Here Now
+ Message to Publish
+ Publish/Subscribe Test
+ Unsubscribe All
+ Welcome to the Pubnub Demo Console
+ Click Menu and select an action:
+ Subscribe
+ Publish
+ Presence
+ Detailed History
+ Here Now
+ Unsubscribe
+ Presence-Unsubscribe
+ Time
+ Disconnect-And-Resubscribe
+ Disconnect-And-Resubscribe with timetoken
+ Toggle Resume On Reconnect
+ Set MAX Retries
+ Set Retry Interval
+ Set Subscribe Timeout
+ Set Non Subscribe Timeout
+ Set Window Interval
+
+
+
\ No newline at end of file
diff --git a/android/examples/PubnubExample/res/values/styles.xml b/android/examples/PubnubExample/res/values/styles.xml
new file mode 100644
index 000000000..4a10ca492
--- /dev/null
+++ b/android/examples/PubnubExample/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/examples/PubnubExample/src/com/pubnub/examples/pubnubExample/MainActivity.java b/android/examples/PubnubExample/src/com/pubnub/examples/pubnubExample/MainActivity.java
new file mode 100644
index 000000000..6a25f8856
--- /dev/null
+++ b/android/examples/PubnubExample/src/com/pubnub/examples/pubnubExample/MainActivity.java
@@ -0,0 +1,633 @@
+package com.pubnub.examples.pubnubExample;
+
+import java.util.Hashtable;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.net.ConnectivityManager;
+import android.os.Bundle;
+import android.text.InputType;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class MainActivity extends Activity {
+ /*
+ * //Noise Test Pubnub pubnub = new
+ * Pubnub("pub-c-87f96934-8c44-4f8d-a35f-deaa2753f083",
+ * "sub-c-3a693cf8-7401-11e2-8b02-12313f022c90", "", false); String channel
+ * = "noise"; String channel = "a";
+ */
+
+ Pubnub pubnub = new Pubnub("demo", "demo", "", false);
+
+ private void notifyUser(Object message) {
+ try {
+ if (message instanceof JSONObject) {
+ final JSONObject obj = (JSONObject) message;
+ this.runOnUiThread(new Runnable() {
+ public void run() {
+ Toast.makeText(getApplicationContext(), obj.toString(),
+ Toast.LENGTH_LONG).show();
+
+ Log.i("Received msg : ", String.valueOf(obj));
+ }
+ });
+
+ } else if (message instanceof String) {
+ final String obj = (String) message;
+ this.runOnUiThread(new Runnable() {
+ public void run() {
+ Toast.makeText(getApplicationContext(), obj,
+ Toast.LENGTH_LONG).show();
+ Log.i("Received msg : ", obj.toString());
+ }
+ });
+
+ } else if (message instanceof JSONArray) {
+ final JSONArray obj = (JSONArray) message;
+ this.runOnUiThread(new Runnable() {
+ public void run() {
+ Toast.makeText(getApplicationContext(), obj.toString(),
+ Toast.LENGTH_LONG).show();
+ Log.i("Received msg : ", obj.toString());
+ }
+ });
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.usage);
+ this.registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context arg0, Intent intent) {
+ pubnub.disconnectAndResubscribe();
+
+ }
+
+ }, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
+
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.activity_main, menu);
+
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle item selection
+ switch (item.getItemId()) {
+
+ case R.id.option1:
+ subscribe();
+ return true;
+
+ case R.id.option2:
+ publish();
+ return true;
+
+ case R.id.option3:
+ presence();
+ return true;
+
+ case R.id.option4:
+ detailedHistory();
+ return true;
+
+ case R.id.option5:
+ hereNow();
+ return true;
+
+ case R.id.option6:
+ unsubscribe();
+ return true;
+
+ case R.id.option7:
+ presenceUnsubscribe();
+ return true;
+
+ case R.id.option8:
+ time();
+ return true;
+
+ case R.id.option9:
+ disconnectAndResubscribe();
+ return true;
+
+ case R.id.option10:
+ disconnectAndResubscribeWithTimetoken();
+ return true;
+
+ case R.id.option11:
+ toggleResumeOnReconnect();
+ return true;
+
+ case R.id.option12:
+ setMaxRetries();
+ return true;
+
+ case R.id.option13:
+ setRetryInterval();
+ return true;
+
+ case R.id.option14:
+ setSubscribeTimeout();
+ return true;
+
+ case R.id.option15:
+ setNonSubscribeTimeout();
+ return true;
+
+ case R.id.option16:
+ setWindowInterval();
+ return true;
+ default:
+ return super.onOptionsItemSelected(item);
+ }
+ }
+
+ private void setNonSubscribeTimeout() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Set Non Subscribe Timeout");
+ builder.setMessage("Enter timeout value in milliseconds");
+ final EditText edTimeout = new EditText(this);
+ edTimeout.setInputType(InputType.TYPE_CLASS_NUMBER);
+ builder.setView(edTimeout);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.setNonSubscribeTimeout(Integer
+ .parseInt(edTimeout.getText().toString()));
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void subscribe() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Subscribe");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Subscribe",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+
+ Hashtable args = new Hashtable(1);
+
+ String message = input.getText().toString();
+ args.put("channel", message);
+
+ try {
+ pubnub.subscribe(args, new Callback() {
+ @Override
+ public void connectCallback(String channel,
+ Object message) {
+ notifyUser("SUBSCRIBE : CONNECT on channel:"
+ + channel
+ + " : "
+ + message.getClass()
+ + " : "
+ + message.toString());
+ }
+ @Override
+ public void disconnectCallback(String channel,
+ Object message) {
+ notifyUser("SUBSCRIBE : DISCONNECT on channel:"
+ + channel
+ + " : "
+ + message.getClass()
+ + " : "
+ + message.toString());
+ }
+
+ @Override
+ public void reconnectCallback(String channel,
+ Object message) {
+ notifyUser("SUBSCRIBE : RECONNECT on channel:"
+ + channel
+ + " : "
+ + message.getClass()
+ + " : "
+ + message.toString());
+ }
+ @Override
+ public void successCallback(String channel,
+ Object message) {
+ notifyUser("SUBSCRIBE : " + channel + " : "
+ + message.getClass() + " : "
+ + message.toString());
+ }
+ @Override
+ public void errorCallback(String channel,
+ PubnubError error) {
+ notifyUser("SUBSCRIBE : ERROR on channel "
+ + channel + " : "
+ + error.toString());
+ }
+ });
+
+ } catch (Exception e) {
+
+ }
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+
+ }
+
+ private void _publish(final String channel) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Publish");
+ builder.setMessage("Enter message");
+ final EditText etMessage = new EditText(this);
+ builder.setView(etMessage);
+ builder.setPositiveButton("Publish",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Hashtable args = new Hashtable(2);
+
+ String message = etMessage.getText().toString();
+
+ if (args.get("message") == null) {
+ try {
+ Integer i = Integer.parseInt(message);
+ args.put("message", i);
+ } catch (Exception e) {
+
+ }
+ }
+ if (args.get("message") == null) {
+ try {
+ Double d = Double.parseDouble(message);
+ args.put("message", d);
+ } catch (Exception e) {
+
+ }
+ }
+ if (args.get("message") == null) {
+ try {
+ JSONArray js = new JSONArray(message);
+ args.put("message", js);
+ } catch (Exception e) {
+
+ }
+ }
+ if (args.get("message") == null) {
+ try {
+ JSONObject js = new JSONObject(message);
+ args.put("message", js);
+ } catch (Exception e) {
+
+ }
+ }
+ if (args.get("message") == null) {
+ args.put("message", message);
+ }
+
+ // Publish Message
+
+ args.put("channel", channel); // Channel Name
+
+ pubnub.publish(args, new Callback() {
+ @Override
+ public void successCallback(String channel,
+ Object message) {
+ notifyUser("PUBLISH : " + message);
+ }
+ @Override
+ public void errorCallback(String channel,
+ PubnubError error) {
+ notifyUser("PUBLISH : " + error);
+ }
+ });
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+
+ }
+
+ private void publish() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Publish ");
+ builder.setMessage("Enter channel name");
+ final EditText etChannel = new EditText(this);
+ builder.setView(etChannel);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ _publish(etChannel.getText().toString());
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void presence() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Presence");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Subscribe For Presence",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String channel = input.getText().toString();
+
+ try {
+ pubnub.presence(channel, new Callback() {
+ @Override
+ public void successCallback(String channel,
+ Object message) {
+ notifyUser("PRESENCE : " + channel + " : "
+ + message.getClass() + " : "
+ + message.toString());
+ }
+ @Override
+ public void errorCallback(String channel,
+ PubnubError error) {
+ notifyUser("PRESENCE : ERROR on channel "
+ + channel + " : "
+ + error.toString());
+ }
+ });
+
+ } catch (Exception e) {
+
+ }
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void detailedHistory() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Detailed History");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Get detailed history",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String channel = input.getText().toString();
+ pubnub.detailedHistory(channel, 2, new Callback() {
+ @Override
+ public void successCallback(String channel,
+ Object message) {
+ notifyUser("DETAILED HISTORY : " + message);
+ }
+ @Override
+ public void errorCallback(String channel,
+ PubnubError error) {
+ notifyUser("DETAILED HISTORY : " + error);
+ }
+ });
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void hereNow() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Here Now");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Get Here Now",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String channel = input.getText().toString();
+ pubnub.hereNow(channel, new Callback() {
+ @Override
+ public void successCallback(String channel,
+ Object message) {
+ notifyUser("HERE NOW : " + message);
+ }
+ @Override
+ public void errorCallback(String channel,
+ PubnubError error) {
+ notifyUser("HERE NOW : " + error);
+ }
+ });
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void unsubscribe() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Unsubscribe");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Unsubscribe",
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String channel = input.getText().toString();
+ pubnub.unsubscribe(channel);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void presenceUnsubscribe() {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Unsubscribe Presence");
+ builder.setMessage("Enter channel name");
+ final EditText input = new EditText(this);
+ builder.setView(input);
+ builder.setPositiveButton("Unsubscribe Presence",
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String channel = input.getText().toString();
+ pubnub.unsubscribePresence(channel);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void time() {
+ pubnub.time(new Callback() {
+ @Override
+ public void successCallback(String channel, Object message) {
+ notifyUser("TIME : " + message);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser("TIME : " + error);
+ }
+ });
+
+ }
+
+ private void disconnectAndResubscribe() {
+ pubnub.disconnectAndResubscribe();
+
+ }
+
+ private void setSubscribeTimeout() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Set Subscribe Timeout");
+ builder.setMessage("Enter timeout value in milliseconds");
+ final EditText edTimeout = new EditText(this);
+ edTimeout.setInputType(InputType.TYPE_CLASS_NUMBER);
+ builder.setView(edTimeout);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.setSubscribeTimeout(Integer.parseInt(edTimeout
+ .getText().toString()));
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+
+ }
+
+ private void setRetryInterval() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Set Retry Interval");
+ builder.setMessage("Enter retry interval in milliseconds");
+ final EditText edInterval = new EditText(this);
+ edInterval.setInputType(InputType.TYPE_CLASS_NUMBER);
+ builder.setView(edInterval);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.setRetryInterval(Integer.parseInt(edInterval
+ .getText().toString()));
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+ private void setWindowInterval() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Set Window Interval");
+ builder.setMessage("Enter Window interval in milliseconds");
+ final EditText edInterval = new EditText(this);
+ edInterval.setInputType(InputType.TYPE_CLASS_NUMBER);
+ builder.setView(edInterval);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.setWindowInterval(Integer.parseInt(edInterval
+ .getText().toString()));
+ }
+
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void toggleResumeOnReconnect() {
+ pubnub.setResumeOnReconnect(pubnub.isResumeOnReconnect() ? false : true);
+ notifyUser("RESUME ON RECONNECT : " + pubnub.isResumeOnReconnect());
+ }
+
+ private void setMaxRetries() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Set Max Retries");
+ builder.setMessage("Enter Max Retries");
+ final EditText edRetries = new EditText(this);
+ edRetries.setInputType(InputType.TYPE_CLASS_NUMBER);
+ builder.setView(edRetries);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.setMaxRetries(Integer.parseInt(edRetries
+ .getText().toString()));
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+
+ private void disconnectAndResubscribeWithTimetoken() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Disconnect and Resubscribe with timetoken");
+ builder.setMessage("Enter Timetoken");
+ final EditText edTimetoken = new EditText(this);
+ builder.setView(edTimetoken);
+ builder.setPositiveButton("Done",
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pubnub.disconnectAndResubscribeWithTimetoken(
+ edTimetoken.getText().toString());
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ }
+}
diff --git a/android/examples/SubscribeAtBoot/AndroidManifest.xml b/android/examples/SubscribeAtBoot/AndroidManifest.xml
new file mode 100644
index 000000000..feb2252c6
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/AndroidManifest.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/examples/SubscribeAtBoot/ic_launcher-web.png b/android/examples/SubscribeAtBoot/ic_launcher-web.png
new file mode 100644
index 000000000..a18cbb48c
Binary files /dev/null and b/android/examples/SubscribeAtBoot/ic_launcher-web.png differ
diff --git a/android/examples/SubscribeAtBoot/libs/Pubnub-Android-3.5.6.jar b/android/examples/SubscribeAtBoot/libs/Pubnub-Android-3.5.6.jar
new file mode 100644
index 000000000..910a1efaf
Binary files /dev/null and b/android/examples/SubscribeAtBoot/libs/Pubnub-Android-3.5.6.jar differ
diff --git a/android/examples/SubscribeAtBoot/libs/android-support-v4.jar b/android/examples/SubscribeAtBoot/libs/android-support-v4.jar
new file mode 100644
index 000000000..6080877d4
Binary files /dev/null and b/android/examples/SubscribeAtBoot/libs/android-support-v4.jar differ
diff --git a/android/examples/SubscribeAtBoot/proguard-project.txt b/android/examples/SubscribeAtBoot/proguard-project.txt
new file mode 100644
index 000000000..f2fe1559a
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/android/examples/SubscribeAtBoot/project.properties b/android/examples/SubscribeAtBoot/project.properties
new file mode 100644
index 000000000..0c9830a3b
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=Google Inc.:Google APIs:17
diff --git a/android/examples/SubscribeAtBoot/res/drawable-hdpi/ic_launcher.png b/android/examples/SubscribeAtBoot/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 000000000..131c6370a
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-hdpi/ic_launcher.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-hdpi/pubnub_large.png b/android/examples/SubscribeAtBoot/res/drawable-hdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-hdpi/pubnub_large.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-ldpi/pubnub_large.png b/android/examples/SubscribeAtBoot/res/drawable-ldpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-ldpi/pubnub_large.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-mdpi/ic_launcher.png b/android/examples/SubscribeAtBoot/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 000000000..068d9e4cb
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-mdpi/ic_launcher.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-mdpi/pubnub_large.png b/android/examples/SubscribeAtBoot/res/drawable-mdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-mdpi/pubnub_large.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-xhdpi/ic_launcher.png b/android/examples/SubscribeAtBoot/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..2e9dc7df7
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-xhdpi/pubnub_large.png b/android/examples/SubscribeAtBoot/res/drawable-xhdpi/pubnub_large.png
new file mode 100644
index 000000000..231910435
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-xhdpi/pubnub_large.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable-xxhdpi/ic_launcher.png b/android/examples/SubscribeAtBoot/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..783cd2c9b
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/android/examples/SubscribeAtBoot/res/drawable/icon.png b/android/examples/SubscribeAtBoot/res/drawable/icon.png
new file mode 100644
index 000000000..08ee50da9
Binary files /dev/null and b/android/examples/SubscribeAtBoot/res/drawable/icon.png differ
diff --git a/android/examples/SubscribeAtBoot/res/values/strings.xml b/android/examples/SubscribeAtBoot/res/values/strings.xml
new file mode 100644
index 000000000..ef18a1bcc
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+
+ SubscribeAtBoot
+
\ No newline at end of file
diff --git a/android/examples/SubscribeAtBoot/res/values/styles.xml b/android/examples/SubscribeAtBoot/res/values/styles.xml
new file mode 100644
index 000000000..4a10ca492
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/BootReceiver.java b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/BootReceiver.java
new file mode 100644
index 000000000..e0a44bbe8
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/BootReceiver.java
@@ -0,0 +1,18 @@
+package com.pubnub.examples.subscribeAtBoot;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+public class BootReceiver extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(Context context, Intent arg1) {
+ Log.i("PubnubService", "PubNub BootReceiver Starting");
+ Intent intent = new Intent(context, PubnubService.class);
+ context.startService(intent);
+ Log.i("PubnubService", "PubNub BootReceiver Started");
+ }
+
+}
diff --git a/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/HelloWorldActivity.java b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/HelloWorldActivity.java
new file mode 100644
index 000000000..021083b30
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/HelloWorldActivity.java
@@ -0,0 +1,23 @@
+package com.pubnub.examples.subscribeAtBoot;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+
+
+public class HelloWorldActivity extends Activity {
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // In new versions of Android, the service may not be activated unless an
+ // associated activity is run at least once. This empty activity serves
+ // that purpose
+
+ Intent serviceIntent = new Intent(this, PubnubService.class);
+ startService(serviceIntent);
+
+ Log.i("HelloWorldActivity", "PubNub Activity Started!");
+
+ }
+}
\ No newline at end of file
diff --git a/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/PubnubService.java b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/PubnubService.java
new file mode 100644
index 000000000..e2ef86b06
--- /dev/null
+++ b/android/examples/SubscribeAtBoot/src/com/pubnub/examples/subscribeAtBoot/PubnubService.java
@@ -0,0 +1,96 @@
+package com.pubnub.examples.subscribeAtBoot;
+
+import android.os.Handler;
+import android.os.Message;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubException;
+
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.util.Log;
+import android.widget.Toast;
+
+public class PubnubService extends Service {
+
+ String channel = "hello_world";
+ Pubnub pubnub = new Pubnub("demo", "demo", false);
+
+ private final Handler handler = new Handler() {
+ public void handleMessage(Message msg) {
+ String pnMsg = msg.obj.toString();
+
+ final Toast toast = Toast.makeText(getApplicationContext(), pnMsg, Toast.LENGTH_SHORT);
+ toast.show();
+
+ Handler handler = new Handler();
+ handler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ toast.cancel();
+ }
+ }, 200);
+
+ }
+ };
+
+ private void notifyUser(Object message) {
+
+ Message msg = handler.obtainMessage();
+
+ try {
+ final String obj = (String) message;
+ msg.obj = obj;
+ handler.sendMessage(msg);
+ Log.i("Received msg : ", obj.toString());
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void onCreate() {
+ super.onCreate();
+ Toast.makeText(this, "PubnubService created...", Toast.LENGTH_LONG).show();
+ Log.i("PUBNUB", "PubnubService created...");
+ try {
+ pubnub.subscribe(new String[] {channel}, new Callback() {
+ public void connectCallback(String channel) {
+ notifyUser("CONNECT on channel:" + channel);
+ }
+ public void disconnectCallback(String channel) {
+ notifyUser("DISCONNECT on channel:" + channel);
+ }
+ public void reconnectCallback(String channel) {
+ notifyUser("RECONNECT on channel:" + channel);
+ }
+ @Override
+ public void successCallback(String channel, Object message) {
+ notifyUser(channel + " " + message.toString());
+ }
+ @Override
+ public void errorCallback(String channel, Object message) {
+ notifyUser(channel + " " + message.toString());
+ }
+ });
+ } catch (PubnubException e) {
+
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ Toast.makeText(this, "PubnubService destroyed...", Toast.LENGTH_LONG).show();
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/android/libs/android-8.jar b/android/libs/android-8.jar
new file mode 100644
index 000000000..24ae5637d
Binary files /dev/null and b/android/libs/android-8.jar differ
diff --git a/android/res/drawable/icon.png b/android/res/drawable/icon.png
new file mode 100644
index 000000000..08ee50da9
Binary files /dev/null and b/android/res/drawable/icon.png differ
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml
new file mode 100644
index 000000000..6a2f2b38c
--- /dev/null
+++ b/android/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+
+ threefour
+
\ No newline at end of file
diff --git a/android/src/com/pubnub/api/Pubnub.java b/android/src/com/pubnub/api/Pubnub.java
new file mode 100644
index 000000000..7a1edb50d
--- /dev/null
+++ b/android/src/com/pubnub/api/Pubnub.java
@@ -0,0 +1,147 @@
+package com.pubnub.api;
+
+import java.util.UUID;
+
+/**
+ * Pubnub object facilitates querying channels for messages and listening on
+ * channels for presence/message events
+ *
+ * @author Pubnub
+ *
+ */
+
+public class Pubnub extends PubnubCore {
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param secret_key
+ * Secret Key
+ * @param cipher_key
+ * Cipher Key
+ * @param ssl_on
+ * SSL on ?
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
+ }
+
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param secret_key
+ * Secret Key
+ * @param ssl_on
+ * SSL on ?
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, "", ssl_on);
+ }
+
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ */
+ public Pubnub(String publish_key, String subscribe_key) {
+ super(publish_key, subscribe_key, "", "", false);
+ }
+
+ /**
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param ssl
+ */
+ public Pubnub(String publish_key, String subscribe_key, boolean ssl) {
+ super(publish_key, subscribe_key, "", "", ssl);
+ }
+
+ /**
+ * @param publish_key
+ * @param subscribe_key
+ * @param secret_key
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key) {
+ super(publish_key, subscribe_key, secret_key, "", false);
+ }
+
+ /**
+ *
+ * Constructor for Pubnub Class
+ *
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param secret_key
+ * Secret Key
+ * @param cipher_key
+ * Cipher Key
+ * @param ssl_on
+ * SSL enabled ?
+ * @param initialization_vector
+ * Initialization vector
+ */
+
+ public Pubnub(String publish_key, String subscribe_key,
+ String secret_key, String cipher_key, boolean ssl_on, String initialization_vector) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on, initialization_vector);
+ }
+
+ /**
+ * Sets value for UUID
+ *
+ * @param uuid
+ * UUID value for Pubnub client
+ */
+ public void setUUID(UUID uuid) {
+ this.UUID = uuid.toString();
+ }
+
+ protected String uuid() {
+ return java.util.UUID.randomUUID().toString();
+ }
+
+ /**
+ * This method sets timeout value for subscribe/presence. Default value is
+ * 310000 milliseconds i.e. 310 seconds
+ *
+ * @param timeout
+ * Timeout value in milliseconds for subscribe/presence
+ */
+ public void setSubscribeTimeout(int timeout) {
+ super.setSubscribeTimeout(timeout);
+ }
+
+ /**
+ * This method set timeout value for non subscribe operations like publish,
+ * history, hereNow. Default value is 15000 milliseconds i.e. 15 seconds.
+ *
+ * @param timeout
+ * Timeout value in milliseconds for Non subscribe operations
+ * like publish, history, hereNow
+ */
+ public void setNonSubscribeTimeout(int timeout) {
+ super.setNonSubscribeTimeout(timeout);
+ }
+
+ protected String getUserAgent() {
+ return "(Android " + android.os.Build.VERSION.RELEASE +
+ "; " + android.os.Build.MODEL +
+ " Build) PubNub-Java/Android/" + VERSION;
+ }
+}
diff --git a/android/srcLogging/com/pubnub/api/Logger.java b/android/srcLogging/com/pubnub/api/Logger.java
new file mode 100644
index 000000000..983c3fdb0
--- /dev/null
+++ b/android/srcLogging/com/pubnub/api/Logger.java
@@ -0,0 +1,24 @@
+package com.pubnub.api;
+
+import android.util.Log;
+
+public class Logger extends AbstractLogger {
+ Class _class;
+ public Logger(Class _class) {
+ super();
+ this._class = _class;
+ }
+
+ protected void nativeDebug(String s) {
+ Log.d(_class.getName(), s);
+ }
+ protected void nativeVerbose(String s) {
+ Log.v(_class.getName(), s);
+ }
+ protected void nativeError(String s) {
+ Log.e(_class.getName(), s);
+ }
+ protected void nativeInfo(String s) {
+ Log.i(_class.getName(), s );
+ }
+}
diff --git a/blackberry/CHANGELOG b/blackberry/CHANGELOG
new file mode 100644
index 000000000..1d3845441
--- /dev/null
+++ b/blackberry/CHANGELOG
@@ -0,0 +1,8 @@
+CHANGELOG
+
+02-12-2013 - 89e2be5e5f0fa872fcdf617a6c9af9ce30ae7807
+. client is now fully asyncronous
+. added enhanced multiplexed subscribe support
+. better error handling added to example app
+. improved keep-alive handling
+. support for chunked responses
diff --git a/blackberry/LICENSE b/blackberry/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/blackberry/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/blackberry/Pubnub-BlackBerry-3.5.6.jar b/blackberry/Pubnub-BlackBerry-3.5.6.jar
new file mode 100644
index 000000000..b61a12525
Binary files /dev/null and b/blackberry/Pubnub-BlackBerry-3.5.6.jar differ
diff --git a/blackberry/Pubnub-BlackBerry-Debug-3.5.6.jar b/blackberry/Pubnub-BlackBerry-Debug-3.5.6.jar
new file mode 100644
index 000000000..26d95a7af
Binary files /dev/null and b/blackberry/Pubnub-BlackBerry-Debug-3.5.6.jar differ
diff --git a/blackberry/README.md b/blackberry/README.md
new file mode 100644
index 000000000..52be85788
--- /dev/null
+++ b/blackberry/README.md
@@ -0,0 +1,107 @@
+##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
+##### http://www.pubnub.com/account
+
+## PubNub 3.5 Real-time Cloud Push API - BlackBerry
+
+www.pubnub.com - PubNub Real-time Push Service in the Cloud.
+
+Please reference the demo app source code for examples of supercharging your Blackberry app with PubNub!
+
+## Video Walkthrough
+Checkout the [video walkthrough](https://vimeo.com/70973189) before proceeding to get an idea of how it works.
+
+## Hello PubNub Demo App HOWTO
+
+Follow this HOWTO step-by-step to setup the demo PubNub app for Blackberry from within Eclipse.
+
+a. Open the Eclipse (Blackberry Java Plugin)
+
+b. Goto File -> New -> Blackberry Project
+
+
+
+c. Enter a project name ( for this example, we'll use PubnubExample ) and click Next
+
+
+
+Your screen should look similar to:
+
+
+
+d. Click "Link additional Source"
+
+e. Browse to and select ```java/blackberry/3.4/examples/PubnubExample/src``` and enter Folder name as src1
+
+Your screen should look similar to:
+
+
+
+f. Click "Finish"
+
+g. Select the Libraries tab
+
+h. Click "Add External JARs"
+
+i. Select ```bouncycastle.jar``` and ```Pubnub-Microedition-3.4.jar``` from ```pubnub-api/blackberry/3.4/libs```
+
+
+
+Your screen should look similar to:
+
+
+
+j. Go to the "Order and Export" tab and check the boxes against **bouncycastle.jar** and **Pubnub-Microedition-3.4.jar**.
+
+k. Click "Finish"
+
+Your screen should look similar to:
+
+
+
+and the "Project View" should look like this when "src1" and "Referenced Libraries" are expanded:
+
+
+
+l. Create a Run Configuration by clicking Run -> Run Configurations from the menu
+
+
+
+m. Select **Blackberry Simulator**, right-click, and select **New**
+
+
+
+You will now have access to some new tabs.
+
+n. Click the "Projects" tab
+
+o. Check the box against PubnubExample
+
+
+
+p. Click the "Simulator" tab, and confirm the **Launch Mobile Data System Connection Service (MDS-CS) with simulator** checkbox is selected
+
+q. Change the configuration name to PubnubExample
+
+r. Click "Apply"
+
+
+
+s. Right click PubnubExample in package explorer.
+
+t. Select **Run As** -> **Blackberry Simulator**
+
+
+
+This will start MDS on command prompt and Blackberry Simulator
+
+**NOTE**: MDS may need to be manually started by running run.bat located at ```Eclipse\plugins\net.rim.ejde.componentpack7.1.0_7.1.0.10\components\MDS```
+
+u. The MDS console will display debug information as the simulator phone boots.
+
+
+
+v. Once the simulator has booted, scroll to and select **PubnubExample** (it will have the default “App Window” icon)
+
+w. Run it, and select the menu button to see it run various PubNub for Blackberry API methods.
+
+
diff --git a/blackberry/build.xml b/blackberry/build.xml
new file mode 100644
index 000000000..571cd4335
--- /dev/null
+++ b/blackberry/build.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/blackberry/examples/PubnubExample/PubnubExample.cod b/blackberry/examples/PubnubExample/PubnubExample.cod
new file mode 100644
index 000000000..e66be6916
Binary files /dev/null and b/blackberry/examples/PubnubExample/PubnubExample.cod differ
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/AuthKeyConfig.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/AuthKeyConfig.java
new file mode 100644
index 000000000..ac35b9b26
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/AuthKeyConfig.java
@@ -0,0 +1,40 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Pubnub;
+
+public class AuthKeyConfig extends PubnubCommand {
+
+ public AuthKeyConfig(Pubnub pubnub) {
+ super(pubnub, "Auth Key Config");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtAuthKey = new BasicEditField("Auth Key : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtAuthKey);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Set Auth Key");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+
+ try {
+ _pubnub.setAuthKey(txtAuthKey.getText());
+ close();
+ } catch (Exception e) {
+
+ }
+ }});
+ }
+}
+
+
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DetailedHistory.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DetailedHistory.java
new file mode 100644
index 000000000..b4fb7bd57
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DetailedHistory.java
@@ -0,0 +1,47 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class DetailedHistory extends PubnubCommand {
+
+ public DetailedHistory(Pubnub pubnub) {
+ super(pubnub, "Detailed History");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ final BasicEditField txtCount = new BasicEditField("Count : ", "",20, BasicEditField.FILTER_INTEGER);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+ screen.add(txtCount);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Get Detailed History");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+ _pubnub.detailedHistory(txtChannel.toString(), Integer.parseInt(txtCount.toString()), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ close();
+ }
+ });
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DisconnectAndResubscribe.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DisconnectAndResubscribe.java
new file mode 100644
index 000000000..1d057b755
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/DisconnectAndResubscribe.java
@@ -0,0 +1,18 @@
+package com.pubnub.examples.blackberry;
+
+import com.pubnub.api.Pubnub;
+
+public class DisconnectAndResubscribe extends PubnubCommand {
+
+ public DisconnectAndResubscribe(Pubnub pubnub) {
+ super(pubnub, "Disconnect & Resubscribe");
+ }
+
+ protected void initScreen() {
+
+ }
+ public void handler() {
+ _pubnub.disconnectAndResubscribe();
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/HereNow.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/HereNow.java
new file mode 100644
index 000000000..204362a48
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/HereNow.java
@@ -0,0 +1,45 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class HereNow extends PubnubCommand {
+
+ public HereNow(Pubnub pubnub) {
+ super(pubnub, "Here Now");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Get Here Now Data");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+ _pubnub.hereNow(txtChannel.toString(), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ close();
+ }
+ });
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/History.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/History.java
new file mode 100644
index 000000000..58edb913a
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/History.java
@@ -0,0 +1,46 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class History extends PubnubCommand {
+
+ public History(Pubnub pubnub) {
+ super(pubnub, "History");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ final BasicEditField txtCount = new BasicEditField("Count : ", "",20, BasicEditField.FILTER_INTEGER);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+ screen.add(txtCount);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Get History");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+ _pubnub.history(txtChannel.toString(), Integer.parseInt(txtCount.toString()), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ close();
+ }
+ });
+ }
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Presence.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Presence.java
new file mode 100644
index 000000000..eadc6f740
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Presence.java
@@ -0,0 +1,52 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Presence extends PubnubCommand {
+
+ public Presence(Pubnub pubnub) {
+ super(pubnub, "Presence");
+ // TODO Auto-generated constructor stub
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Subscribe");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+
+ try {
+ _pubnub.presence(txtChannel.toString(), new Callback() {
+
+ public void successCallback(String channel, Object message) {
+ notifyUser("Channel " + channel + " : " + message.toString());
+ }
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser("Channel " + channel + " : " + error.toString());
+ }
+ });
+ close();
+
+ } catch (Exception e) {
+
+ }
+ }});
+ }
+
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Publish.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Publish.java
new file mode 100644
index 000000000..b0781b662
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Publish.java
@@ -0,0 +1,48 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Publish extends PubnubCommand {
+
+ public Publish(Pubnub pubnub) {
+ super(pubnub, "Publish");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ final BasicEditField txtMessage = new BasicEditField("Message : ", "",256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+ screen.add(txtMessage);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Publish");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+
+ _pubnub.publish(txtChannel.toString(), txtMessage.toString(), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ close();
+ }
+ });
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubCommand.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubCommand.java
new file mode 100644
index 000000000..007208e88
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubCommand.java
@@ -0,0 +1,89 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.command.Command;
+import net.rim.device.api.command.CommandHandler;
+import net.rim.device.api.command.ReadOnlyCommandMetadata;
+import net.rim.device.api.ui.MenuItem;
+import net.rim.device.api.ui.UiApplication;
+import net.rim.device.api.ui.component.Dialog;
+import net.rim.device.api.ui.container.MainScreen;
+import net.rim.device.api.util.StringProvider;
+
+import org.json.me.JSONArray;
+import org.json.me.JSONObject;
+
+import com.pubnub.api.Pubnub;
+
+public abstract class PubnubCommand {
+
+ protected Pubnub _pubnub;
+
+ protected MainScreen screen;
+
+ private UiApplication uiapp;
+
+ private MenuItem menuItem;
+
+
+
+ /**
+ * Presents a dialog to the user with a given message
+ *
+ * @param message
+ * The text to display
+ */
+ private void alertDialog(final String message) {
+ uiapp.invokeLater(new Runnable() {
+ public void run() {
+ Dialog.alert(message);
+ }
+ });
+ }
+
+ public PubnubCommand(Pubnub pubnub, String command) {
+ this._pubnub = pubnub;
+ this.uiapp = UiApplication.getUiApplication();
+ this.menuItem = new MenuItem(new StringProvider(command), 0x230010, 0);
+ this.menuItem.setCommand(new Command(new CommandHandler() {
+ public void execute(ReadOnlyCommandMetadata metadata, Object context) {
+ handler();
+ }
+ }));
+ }
+
+ protected void notifyUser(Object message) {
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ alertDialog(obj.toString());
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ alertDialog(obj.toString());
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ alertDialog(obj.toString());
+ }
+ } catch (Exception e) {
+
+ }
+
+ }
+
+ protected abstract void initScreen();
+
+ public void handler() {
+
+ if (screen == null)
+ initScreen();
+ uiapp.pushScreen(screen);
+
+ }
+
+ public MenuItem getMenuItem() {
+ return menuItem;
+ }
+
+ protected void close() {
+ this.uiapp.popScreen(screen);
+ }
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsole.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsole.java
new file mode 100644
index 000000000..df810637b
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsole.java
@@ -0,0 +1,33 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Screen;
+import net.rim.device.api.ui.UiApplication;
+
+/**
+ * This class extends the UiApplication class, providing a
+ * graphical user interface.
+ */
+public class PubnubDemoConsole extends UiApplication {
+ /**
+ * Entry point for application
+ * @param args Command line arguments (not used)
+ */
+ public static void main(String[] args) {
+
+ // Create a new instance of the application and make the currently
+ // running thread the application's event dispatch thread.
+ PubnubDemoConsole theApp = new PubnubDemoConsole();
+ theApp.enterEventDispatcher();
+ }
+
+
+ /**
+ * Creates a new PubnubExample object
+ */
+ public PubnubDemoConsole() {
+ Screen sc = new PubnubDemoConsoleScreen();
+ // Push a screen onto the UI stack for rendering.
+ pushScreen(sc);
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsoleScreen.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsoleScreen.java
new file mode 100644
index 000000000..e26b92e39
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/PubnubDemoConsoleScreen.java
@@ -0,0 +1,37 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Pubnub;
+
+/**
+ * A class extending the MainScreen class, which provides default standard
+ * behavior for BlackBerry GUI applications.
+ */
+public final class PubnubDemoConsoleScreen extends MainScreen {
+ String channel = "hello_world";
+ String[] channels = { "hello_world1", "hello_world2", "hello_world3",
+ "hello_world4"
+ };
+ Pubnub _pubnub = new Pubnub("demo","demo","demo", false);
+ /**
+ * Creates a new PubnubExampleScreen object
+ */
+ public PubnubDemoConsoleScreen() {
+ // Set the displayed title of the screen
+ setTitle("Pubnub Demo Console");
+ addMenuItem(new Publish(_pubnub).getMenuItem());
+ addMenuItem(new Subscribe(_pubnub).getMenuItem());
+ addMenuItem(new Presence(_pubnub).getMenuItem());
+ addMenuItem(new Unsubscribe(_pubnub).getMenuItem());
+ addMenuItem(new History(_pubnub).getMenuItem());
+ addMenuItem(new DetailedHistory(_pubnub).getMenuItem());
+ addMenuItem(new HereNow(_pubnub).getMenuItem());
+ addMenuItem(new AuthKeyConfig(_pubnub).getMenuItem());
+ addMenuItem(new DisconnectAndResubscribe(_pubnub).getMenuItem());
+ addMenuItem(new ToggleResumeOnReconnect(_pubnub).getMenuItem());
+ addMenuItem(new Time(_pubnub).getMenuItem());
+ }
+
+
+}
\ No newline at end of file
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Subscribe.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Subscribe.java
new file mode 100644
index 000000000..51dd48b8c
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Subscribe.java
@@ -0,0 +1,65 @@
+package com.pubnub.examples.blackberry;
+
+import java.util.Hashtable;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Subscribe extends PubnubCommand {
+
+ public Subscribe(Pubnub pubnub) {
+ super(pubnub, "Subscribe");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Subscribe");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+ Hashtable args = new Hashtable();
+ args.put("channel", txtChannel.toString());
+
+ try {
+ _pubnub.subscribe(args, new Callback() {
+ public void connectCallback(String channel) {
+ notifyUser("CONNECT on channel:" + channel);
+ }
+
+ public void disconnectCallback(String channel) {
+ notifyUser("DISCONNECT on channel:" + channel);
+ }
+
+ public void reconnectCallback(String channel) {
+ notifyUser("RECONNECT on channel:" + channel);
+ }
+
+ public void successCallback(String channel, Object message) {
+ notifyUser("Channel " + channel + " : " + message.toString());
+ }
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser("Channel " + channel + " : " + error.toString());
+ }
+ });
+ close();
+
+ } catch (Exception e) {
+
+ }
+ }});
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Time.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Time.java
new file mode 100644
index 000000000..bbeaaf6f0
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Time.java
@@ -0,0 +1,26 @@
+package com.pubnub.examples.blackberry;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Time extends PubnubCommand {
+
+ public Time(Pubnub pubnub) {
+ super(pubnub, "Time");
+ }
+
+ protected void initScreen() {
+ }
+ public void handler() {
+ _pubnub.time( new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(error.toString());
+ }
+ });
+ }
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/ToggleResumeOnReconnect.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/ToggleResumeOnReconnect.java
new file mode 100644
index 000000000..3eda0b4dc
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/ToggleResumeOnReconnect.java
@@ -0,0 +1,18 @@
+package com.pubnub.examples.blackberry;
+
+import com.pubnub.api.Pubnub;
+
+public class ToggleResumeOnReconnect extends PubnubCommand {
+
+ public ToggleResumeOnReconnect(Pubnub pubnub) {
+ super(pubnub, "Toggle Resume on Reconnect");
+ }
+
+ protected void initScreen() {
+
+ }
+ public void handler() {
+ _pubnub.setResumeOnReconnect((_pubnub.isResumeOnReconnect())?false:true);
+ }
+
+}
diff --git a/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Unsubscribe.java b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Unsubscribe.java
new file mode 100644
index 000000000..bb0b5706f
--- /dev/null
+++ b/blackberry/examples/PubnubExample/src/com/pubnub/examples/blackberry/Unsubscribe.java
@@ -0,0 +1,35 @@
+package com.pubnub.examples.blackberry;
+
+import net.rim.device.api.ui.Field;
+import net.rim.device.api.ui.FieldChangeListener;
+import net.rim.device.api.ui.component.BasicEditField;
+import net.rim.device.api.ui.component.ButtonField;
+import net.rim.device.api.ui.container.MainScreen;
+
+import com.pubnub.api.Pubnub;
+
+public class Unsubscribe extends PubnubCommand {
+
+ public Unsubscribe(Pubnub pubnub) {
+ super(pubnub, "Unsubscribe");
+ }
+
+ protected void initScreen() {
+ final BasicEditField txtChannel = new BasicEditField("Channel : ", "", 256, BasicEditField.FILTER_DEFAULT);
+ screen = new MainScreen();
+ screen.add(txtChannel);
+
+ ButtonField btn = new ButtonField();
+ btn.setLabel("Unsubscribe");
+ screen.add(btn);
+
+ btn.setChangeListener(new FieldChangeListener() {
+
+ public void fieldChanged(Field field, int context) {
+ _pubnub.unsubscribe(txtChannel.toString());
+ close();
+ }
+ });
+ }
+
+}
diff --git a/blackberry/libs/Pubnub-Microedition-3.4.jar b/blackberry/libs/Pubnub-Microedition-3.4.jar
new file mode 100644
index 000000000..0b99b5f6c
Binary files /dev/null and b/blackberry/libs/Pubnub-Microedition-3.4.jar differ
diff --git a/blackberry/libs/bouncycastle.jar b/blackberry/libs/bouncycastle.jar
new file mode 100644
index 000000000..516587c2d
Binary files /dev/null and b/blackberry/libs/bouncycastle.jar differ
diff --git a/blackberry/libs/net_rim_api.jar b/blackberry/libs/net_rim_api.jar
new file mode 100644
index 000000000..0303009db
Binary files /dev/null and b/blackberry/libs/net_rim_api.jar differ
diff --git a/blackberry/src/com/pubnub/api/Pubnub.java b/blackberry/src/com/pubnub/api/Pubnub.java
new file mode 100644
index 000000000..d274bf3bb
--- /dev/null
+++ b/blackberry/src/com/pubnub/api/Pubnub.java
@@ -0,0 +1,91 @@
+package com.pubnub.api;
+
+import org.bouncycastle.util.SecureRandom;
+
+
+public class Pubnub extends PubnubCore {
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, "", ssl_on);
+ }
+
+
+ public Pubnub(String publish_key, String subscribe_key) {
+ super(publish_key, subscribe_key, "", "", false);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, boolean ssl) {
+ super(publish_key, subscribe_key, "", "", ssl);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key) {
+ super(publish_key, subscribe_key, secret_key, "", false);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key,
+ String secret_key, String cipher_key, boolean ssl_on, String initialization_vector) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on, initialization_vector);
+ }
+
+ /**
+ * UUID
+ *
+ * 32 digit UUID generation at client side.
+ *
+ * @return String uuid.
+ */
+ public String uuid() {
+
+ String valueBeforeMD5;
+ String valueAfterMD5;
+ SecureRandom mySecureRand = new SecureRandom();
+ String s_id = String.valueOf(PubnubCore.class.hashCode());
+ StringBuffer sbValueBeforeMD5 = new StringBuffer();
+ try {
+ long time = System.currentTimeMillis();
+ long rand = 0;
+ rand = mySecureRand.nextLong();
+ sbValueBeforeMD5.append(s_id);
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(time));
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(rand));
+ valueBeforeMD5 = sbValueBeforeMD5.toString();
+ byte[] array = PubnubCrypto.md5(valueBeforeMD5);
+ StringBuffer sb = new StringBuffer();
+ for (int j = 0; j < array.length; ++j) {
+ int b = array[j] & 0xFF;
+ if (b < 0x10) {
+ sb.append('0');
+ }
+ sb.append(Integer.toHexString(b));
+ }
+ valueAfterMD5 = sb.toString();
+ String raw = valueAfterMD5.toUpperCase();
+ sb = new StringBuffer();
+ sb.append(raw.substring(0, 8));
+ sb.append("-");
+ sb.append(raw.substring(8, 12));
+ sb.append("-");
+ sb.append(raw.substring(12, 16));
+ sb.append("-");
+ sb.append(raw.substring(16, 20));
+ sb.append("-");
+ sb.append(raw.substring(20));
+ return sb.toString();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ protected String getUserAgent() {
+ return "Blackberry/" + VERSION;
+ }
+
+}
diff --git a/blackberry/tools/preverify b/blackberry/tools/preverify
new file mode 100755
index 000000000..6e4b51250
Binary files /dev/null and b/blackberry/tools/preverify differ
diff --git a/blackberry/tools/preverify.exe b/blackberry/tools/preverify.exe
new file mode 100644
index 000000000..8cdea8902
Binary files /dev/null and b/blackberry/tools/preverify.exe differ
diff --git a/blackberry/tools/preverify1.0 b/blackberry/tools/preverify1.0
new file mode 100755
index 000000000..fa9116e9c
Binary files /dev/null and b/blackberry/tools/preverify1.0 differ
diff --git a/blackberry/tools/preverify1.1 b/blackberry/tools/preverify1.1
new file mode 100755
index 000000000..3cc34a45e
Binary files /dev/null and b/blackberry/tools/preverify1.1 differ
diff --git a/build.xml b/build.xml
new file mode 100644
index 000000000..2f435e105
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/LICENSE b/codenameone/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/codenameone/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/codenameone/Pubnub-CodeNameOne-3.5.6.cn1lib b/codenameone/Pubnub-CodeNameOne-3.5.6.cn1lib
new file mode 100644
index 000000000..c43587b4f
Binary files /dev/null and b/codenameone/Pubnub-CodeNameOne-3.5.6.cn1lib differ
diff --git a/codenameone/Pubnub-CodeNameOne-Debug-3.5.6.cn1lib b/codenameone/Pubnub-CodeNameOne-Debug-3.5.6.cn1lib
new file mode 100644
index 000000000..88a5efa2d
Binary files /dev/null and b/codenameone/Pubnub-CodeNameOne-Debug-3.5.6.cn1lib differ
diff --git a/codenameone/PubnubClientSDK/Stubber.jar b/codenameone/PubnubClientSDK/Stubber.jar
new file mode 100644
index 000000000..0e082799a
Binary files /dev/null and b/codenameone/PubnubClientSDK/Stubber.jar differ
diff --git a/codenameone/PubnubClientSDK/build.xml b/codenameone/PubnubClientSDK/build.xml
new file mode 100644
index 000000000..ea58875a3
--- /dev/null
+++ b/codenameone/PubnubClientSDK/build.xml
@@ -0,0 +1,121 @@
+
+
+
+
+
+ Builds, tests, and runs the project PubnubClientSDK.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Currently testing a library project isn't supported
+
+
+
+ Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
+ code size and wider device support
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can't run a library project
+
+
+
+ You can't run a library project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/PubnubClientSDK/codenameone_library.properties b/codenameone/PubnubClientSDK/codenameone_library.properties
new file mode 100644
index 000000000..a80328da9
--- /dev/null
+++ b/codenameone/PubnubClientSDK/codenameone_library.properties
@@ -0,0 +1,4 @@
+#
+#Wed Jan 09 17:59:31 IST 2013
+codename1.languageLevel=5
+codename1.version=1.0
diff --git a/codenameone/PubnubClientSDK/lib/BouncyCastleCN1Lib.cn1lib b/codenameone/PubnubClientSDK/lib/BouncyCastleCN1Lib.cn1lib
new file mode 100644
index 000000000..9bcfd0ade
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/BouncyCastleCN1Lib.cn1lib differ
diff --git a/codenameone/PubnubClientSDK/lib/CLDC11.jar b/codenameone/PubnubClientSDK/lib/CLDC11.jar
new file mode 100644
index 000000000..93829d104
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/CLDC11.jar differ
diff --git a/codenameone/PubnubClientSDK/lib/CodenameOne.jar b/codenameone/PubnubClientSDK/lib/CodenameOne.jar
new file mode 100644
index 000000000..6721f10b4
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/CodenameOne.jar differ
diff --git a/codenameone/PubnubClientSDK/lib/CodenameOne_SRC.zip b/codenameone/PubnubClientSDK/lib/CodenameOne_SRC.zip
new file mode 100644
index 000000000..ac6d126f6
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/CodenameOne_SRC.zip differ
diff --git a/codenameone/PubnubClientSDK/lib/bccn1/bouncycastle.zip b/codenameone/PubnubClientSDK/lib/bccn1/bouncycastle.zip
new file mode 100644
index 000000000..be57701fd
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/bccn1/bouncycastle.zip differ
diff --git a/codenameone/PubnubClientSDK/lib/bccn1/manifest.properties b/codenameone/PubnubClientSDK/lib/bccn1/manifest.properties
new file mode 100644
index 000000000..4da354bc8
--- /dev/null
+++ b/codenameone/PubnubClientSDK/lib/bccn1/manifest.properties
@@ -0,0 +1,2 @@
+# Codename One libray manifest
+
diff --git a/codenameone/PubnubClientSDK/lib/bccn1/stubs.zip b/codenameone/PubnubClientSDK/lib/bccn1/stubs.zip
new file mode 100644
index 000000000..cabe7df44
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/bccn1/stubs.zip differ
diff --git a/codenameone/PubnubClientSDK/lib/json/json.zip b/codenameone/PubnubClientSDK/lib/json/json.zip
new file mode 100644
index 000000000..9293a9ea9
Binary files /dev/null and b/codenameone/PubnubClientSDK/lib/json/json.zip differ
diff --git a/codenameone/PubnubClientSDK/manifest.mf b/codenameone/PubnubClientSDK/manifest.mf
new file mode 100644
index 000000000..1574df4a2
--- /dev/null
+++ b/codenameone/PubnubClientSDK/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/codenameone/PubnubClientSDK/manifest.properties b/codenameone/PubnubClientSDK/manifest.properties
new file mode 100644
index 000000000..4da354bc8
--- /dev/null
+++ b/codenameone/PubnubClientSDK/manifest.properties
@@ -0,0 +1,2 @@
+# Codename One libray manifest
+
diff --git a/codenameone/PubnubClientSDK/native/.gitignore b/codenameone/PubnubClientSDK/native/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/native/android/.gitignore b/codenameone/PubnubClientSDK/native/android/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/native/ios/.gitignore b/codenameone/PubnubClientSDK/native/ios/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/native/j2me/.gitignore b/codenameone/PubnubClientSDK/native/j2me/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/native/rim/.gitignore b/codenameone/PubnubClientSDK/native/rim/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/native/win/.gitignore b/codenameone/PubnubClientSDK/native/win/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/nbproject/build-impl.xml b/codenameone/PubnubClientSDK/nbproject/build-impl.xml
new file mode 100644
index 000000000..ae935503a
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/build-impl.xml
@@ -0,0 +1,1400 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+
+
+
+
+
+ java -cp "${run.classpath.with.dist.jar}" ${main.class}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/PubnubClientSDK/nbproject/genfiles.properties b/codenameone/PubnubClientSDK/nbproject/genfiles.properties
new file mode 100644
index 000000000..798d1238b
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=65812561
+build.xml.script.CRC32=c17a4175
+build.xml.stylesheet.CRC32=28e38971@1.44.1.45
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=65812561
+nbproject/build-impl.xml.script.CRC32=d56d33ea
+nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
diff --git a/codenameone/PubnubClientSDK/nbproject/nativej2me.res b/codenameone/PubnubClientSDK/nbproject/nativej2me.res
new file mode 100644
index 000000000..6b33caf2c
Binary files /dev/null and b/codenameone/PubnubClientSDK/nbproject/nativej2me.res differ
diff --git a/codenameone/PubnubClientSDK/nbproject/private/config.properties b/codenameone/PubnubClientSDK/nbproject/private/config.properties
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/PubnubClientSDK/nbproject/private/private.properties b/codenameone/PubnubClientSDK/nbproject/private/private.properties
new file mode 100644
index 000000000..7ed94b3ed
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/private/private.properties
@@ -0,0 +1,7 @@
+application.args=com.mycompany.myapp.MyApplication
+compile.on.save=false
+do.depend=false
+do.jar=true
+javac.debug=true
+javadoc.preview=true
+user.properties.file=/home/workpn/.netbeans/7.3.1/build.properties
diff --git a/codenameone/PubnubClientSDK/nbproject/private/private.xml b/codenameone/PubnubClientSDK/nbproject/private/private.xml
new file mode 100644
index 000000000..8505fc191
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/private/private.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/codenameone/PubnubClientSDK/nbproject/project.properties b/codenameone/PubnubClientSDK/nbproject/project.properties
new file mode 100644
index 000000000..1eb0d2cf9
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/project.properties
@@ -0,0 +1,84 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=PubnubClientSDK
+application.vendor=Codename One
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/PubnubClientSDK.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.CLDC11.jar=lib/CLDC11.jar
+file.reference.CodenameOne.jar=lib/CodenameOne.jar
+file.reference.CodenameOne_SRC.zip=lib/CodenameOne_SRC.zip
+file.reference.bouncycastle.zip=lib/bccn1/bouncycastle.zip
+file.reference.json.zip=lib/json/json.zip
+file.reference.PubnubClientSDK-override=override
+includes=**
+jar.compress=false
+javac.classpath=\
+ ${file.reference.CLDC11.jar}:\
+ ${file.reference.CodenameOne.jar}:\
+ ${file.reference.CodenameOne_SRC.zip}:\
+ ${file.reference.PubnubClientSDK-override}:\
+ ${file.reference.json.zip}:\
+ ${file.reference.bouncycastle.zip}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=windows-1252
+src.dir=src
+test.src.dir=test
diff --git a/codenameone/PubnubClientSDK/nbproject/project.xml b/codenameone/PubnubClientSDK/nbproject/project.xml
new file mode 100644
index 000000000..f9948715c
--- /dev/null
+++ b/codenameone/PubnubClientSDK/nbproject/project.xml
@@ -0,0 +1,15 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ PubnubClientSDK
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/PubnubClientSDK/override/.gitignore b/codenameone/PubnubClientSDK/override/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/build.xml b/codenameone/build.xml
new file mode 100644
index 000000000..f92a0c234
--- /dev/null
+++ b/codenameone/build.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/examples/PubnubDevConsole/CodeNameOneBuildClient.jar b/codenameone/examples/PubnubDevConsole/CodeNameOneBuildClient.jar
new file mode 100644
index 000000000..7bb7c3bac
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/CodeNameOneBuildClient.jar differ
diff --git a/codenameone/examples/PubnubDevConsole/JavaSE.jar b/codenameone/examples/PubnubDevConsole/JavaSE.jar
new file mode 100644
index 000000000..0305fc261
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/JavaSE.jar differ
diff --git a/codenameone/examples/PubnubDevConsole/build.xml b/codenameone/examples/PubnubDevConsole/build.xml
new file mode 100644
index 000000000..bd64e5dac
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/build.xml
@@ -0,0 +1,425 @@
+
+
+
+
+
+
+ Builds, tests, and runs the project PubnubDevConsoleWithCn1lib.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
+ code size and wider device support
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/examples/PubnubDevConsole/codenameone_settings.properties b/codenameone/examples/PubnubDevConsole/codenameone_settings.properties
new file mode 100644
index 000000000..d1eee9d89
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/codenameone_settings.properties
@@ -0,0 +1,33 @@
+#
+#Wed Jul 18 15:45:51 IDT 2012
+codename1.vendor=CodenameOne
+codename1.displayName=PubnubDevConsoleWithCn1lib
+codename1.icon=icon.png
+codename1.ios.debug.certificatePassword=
+codename1.secondaryTitle=PubnubDevConsoleWithCn1lib
+codename1.version=1.0
+package=generated
+codename1.mainName=PubnubDevConsole
+codename1.ios.certificatePassword=
+codename1.ios.release.provision=
+codename1.rim.signtoolDb=
+codename1.ios.release.certificatePassword=
+codename1.ios.certificate=
+userClass=src/userclasses/StateMachine.java
+codename1.android.keystorePassword=
+codename1.ios.appid=Q5GHSKAL2F.com.pubnub.examples
+codename1.ios.release.certificate=
+codename1.j2me.nativeTheme=nbproject/nativej2me.res
+codename1.rim.signtoolCsk=
+codename1.ios.debug.certificate=
+mainForm=Main
+codename1.android.keystore=
+baseClass=src/generated/StateMachineBase.java
+guiResource=theme.res
+codename1.android.keystoreAlias=
+codename1.rim.certificatePassword=
+codename1.ios.provision=
+codename1.ios.debug.provision=
+codename1.packageName=com.pubnub.examples
+codename1.languageLevel=5
+codename1.arg.vserv.transition=3000
diff --git a/codenameone/examples/PubnubDevConsole/icon.png b/codenameone/examples/PubnubDevConsole/icon.png
new file mode 100644
index 000000000..381ad0425
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/icon.png differ
diff --git a/codenameone/examples/PubnubDevConsole/lib/BouncyCastleCN1Lib.cn1lib b/codenameone/examples/PubnubDevConsole/lib/BouncyCastleCN1Lib.cn1lib
new file mode 100644
index 000000000..9bcfd0ade
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/lib/BouncyCastleCN1Lib.cn1lib differ
diff --git a/codenameone/examples/PubnubDevConsole/lib/CLDC11.jar b/codenameone/examples/PubnubDevConsole/lib/CLDC11.jar
new file mode 100644
index 000000000..93829d104
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/lib/CLDC11.jar differ
diff --git a/codenameone/examples/PubnubDevConsole/lib/CodenameOne.jar b/codenameone/examples/PubnubDevConsole/lib/CodenameOne.jar
new file mode 100644
index 000000000..6721f10b4
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/lib/CodenameOne.jar differ
diff --git a/codenameone/examples/PubnubDevConsole/lib/CodenameOne_SRC.zip b/codenameone/examples/PubnubDevConsole/lib/CodenameOne_SRC.zip
new file mode 100644
index 000000000..ac6d126f6
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/lib/CodenameOne_SRC.zip differ
diff --git a/codenameone/examples/PubnubDevConsole/lib/json.cn1lib b/codenameone/examples/PubnubDevConsole/lib/json.cn1lib
new file mode 100644
index 000000000..58636ebd5
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/lib/json.cn1lib differ
diff --git a/codenameone/examples/PubnubDevConsole/manifest.mf b/codenameone/examples/PubnubDevConsole/manifest.mf
new file mode 100644
index 000000000..1574df4a2
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/build-impl.xml b/codenameone/examples/PubnubDevConsole/nbproject/build-impl.xml
new file mode 100644
index 000000000..e84f1fa91
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/build-impl.xml
@@ -0,0 +1,1400 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+
+
+
+
+
+ java -cp "${run.classpath.with.dist.jar}" ${main.class}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/genfiles.properties b/codenameone/examples/PubnubDevConsole/nbproject/genfiles.properties
new file mode 100644
index 000000000..798d1238b
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=65812561
+build.xml.script.CRC32=c17a4175
+build.xml.stylesheet.CRC32=28e38971@1.44.1.45
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=65812561
+nbproject/build-impl.xml.script.CRC32=d56d33ea
+nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/nativej2me.res b/codenameone/examples/PubnubDevConsole/nbproject/nativej2me.res
new file mode 100644
index 000000000..6b33caf2c
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/nbproject/nativej2me.res differ
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/private/config.properties b/codenameone/examples/PubnubDevConsole/nbproject/private/config.properties
new file mode 100644
index 000000000..e69de29bb
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/private/private.properties b/codenameone/examples/PubnubDevConsole/nbproject/private/private.properties
new file mode 100644
index 000000000..f51a09537
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/private/private.properties
@@ -0,0 +1,14 @@
+application.args=com.pubnub.examples.PubnubDevConsole
+compile.on.save=false
+do.depend=false
+do.jar=true
+file.reference.CLDC11.jar=/home/workpn/NetBeansProjects/PubnubDevConsole/lib/CLDC11.jar
+file.reference.CodenameOne.jar=/home/workpn/NetBeansProjects/PubnubDevConsole/lib/CodenameOne.jar
+file.reference.CodenameOne_SRC.zip=/home/workpn/NetBeansProjects/PubnubDevConsole/lib/CodenameOne_SRC.zip
+file.reference.impl-cls=/home/workpn/NetBeansProjects/PubnubDevConsole/lib/impl/cls
+file.reference.impl-stubs=/home/workpn/NetBeansProjects/PubnubDevConsole/lib/impl/stubs
+file.reference.JavaSE.jar=/home/workpn/NetBeansProjects/PubnubDevConsole/JavaSE.jar
+file.reference.PubnubDevConsoleWithCn1lib-override=/home/workpn/NetBeansProjects/PubnubDevConsole/override
+javac.debug=true
+javadoc.preview=true
+user.properties.file=/home/workpn/.netbeans/7.3.1/build.properties
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/private/private.xml b/codenameone/examples/PubnubDevConsole/nbproject/private/private.xml
new file mode 100644
index 000000000..8505fc191
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/private/private.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/project.properties b/codenameone/examples/PubnubDevConsole/nbproject/project.properties
new file mode 100644
index 000000000..0a94e1ef5
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/project.properties
@@ -0,0 +1,87 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=PubnubDevConsole
+application.vendor=Codename One
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/PubnubDevConsole.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.CLDC11.jar=lib/CLDC11.jar
+file.reference.CodenameOne.jar=lib/CodenameOne.jar
+file.reference.CodenameOne_SRC.zip=lib/CodenameOne_SRC.zip
+file.reference.PubnubDevConsoleWithCn1lib-override=override
+file.reference.impl-cls=lib/impl/cls
+file.reference.impl-stubs=lib/impl/stubs
+file.reference.JavaSE.jar=JavaSE.jar
+includes=**
+jar.compress=false
+javac.classpath=\
+ ${file.reference.CLDC11.jar}:\
+ ${file.reference.CodenameOne.jar}:\
+ ${file.reference.CodenameOne_SRC.zip}:\
+ ${file.reference.PubnubDevConsoleWithCn1lib-override}:\
+ ${file.reference.impl-cls}:\
+ ${file.reference.impl-stubs}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${file.reference.JavaSE.jar}:\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=com.codename1.impl.javase.Simulator
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+ ${file.reference.JavaSE.jar}:\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=windows-1252
+src.dir=src
+test.src.dir=test
diff --git a/codenameone/examples/PubnubDevConsole/nbproject/project.xml b/codenameone/examples/PubnubDevConsole/nbproject/project.xml
new file mode 100644
index 000000000..da24cf8f3
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/nbproject/project.xml
@@ -0,0 +1,15 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ PubnubDevConsole
+
+
+
+
+
+
+
+
+
diff --git a/codenameone/examples/PubnubDevConsole/src/com/pubnub/examples/PubnubDevConsole.java b/codenameone/examples/PubnubDevConsole/src/com/pubnub/examples/PubnubDevConsole.java
new file mode 100644
index 000000000..92c93efc4
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/src/com/pubnub/examples/PubnubDevConsole.java
@@ -0,0 +1,29 @@
+package com.pubnub.examples;
+
+
+import com.codename1.ui.Display;
+import com.codename1.ui.Form;
+import userclasses.StateMachine;
+
+public class PubnubDevConsole {
+
+ private Form current;
+
+ public void init(Object context) {
+ }
+
+ public void start() {
+ if (current != null) {
+ current.show();
+ return;
+ }
+ new StateMachine("/theme");
+ }
+
+ public void stop() {
+ current = Display.getInstance().getCurrent();
+ }
+
+ public void destroy() {
+ }
+}
diff --git a/codenameone/examples/PubnubDevConsole/src/generated/StateMachineBase.java b/codenameone/examples/PubnubDevConsole/src/generated/StateMachineBase.java
new file mode 100644
index 000000000..bd605592f
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/src/generated/StateMachineBase.java
@@ -0,0 +1,1279 @@
+/**
+ * This class contains generated code from the Codename One Designer, DO NOT MODIFY!
+ * This class is designed for subclassing that way the code generator can overwrite it
+ * anytime without erasing your changes which should exist in a subclass!
+ * For details about this file and how it works please read this blog post:
+ * http://codenameone.blogspot.com/2010/10/ui-builder-class-how-to-actually-use.html
+*/
+package generated;
+
+import com.codename1.ui.*;
+import com.codename1.ui.util.*;
+import com.codename1.ui.plaf.*;
+import com.codename1.ui.events.*;
+
+public abstract class StateMachineBase extends UIBuilder {
+ private Container aboutToShowThisContainer;
+ /**
+ * this method should be used to initialize variables instead of
+ * the constructor/class scope to avoid race conditions
+ */
+ /**
+ * @deprecated use the version that accepts a resource as an argument instead
+
+ **/
+ protected void initVars() {}
+
+ protected void initVars(Resources res) {}
+
+ public StateMachineBase(Resources res, String resPath, boolean loadTheme) {
+ startApp(res, resPath, loadTheme);
+ }
+
+ public Container startApp(Resources res, String resPath, boolean loadTheme) {
+ initVars();
+ UIBuilder.registerCustomComponent("Button", com.codename1.ui.Button.class);
+ UIBuilder.registerCustomComponent("Form", com.codename1.ui.Form.class);
+ UIBuilder.registerCustomComponent("Label", com.codename1.ui.Label.class);
+ UIBuilder.registerCustomComponent("TextArea", com.codename1.ui.TextArea.class);
+ UIBuilder.registerCustomComponent("TextField", com.codename1.ui.TextField.class);
+ if (loadTheme) {
+ if (res == null) {
+ try {
+ if (resPath.endsWith(".res")) {
+ res = Resources.open(resPath);
+ System.out.println("Warning: you should construct the state machine without the .res extension to allow theme overlays");
+ } else {
+ res = Resources.openLayered(resPath);
+ }
+ } catch (java.io.IOException err) {
+ err.printStackTrace();
+ }
+ }
+ initTheme(res);
+ }
+ if (res != null) {
+ setResourceFilePath(resPath);
+ setResourceFile(res);
+ initVars(res);
+ return showForm(getFirstFormName(), null);
+ } else {
+ Form f = (Form)createContainer(resPath, getFirstFormName());
+ initVars(fetchResourceFile());
+ beforeShow(f);
+ f.show();
+ postShow(f);
+ return f;
+ }
+ }
+
+ protected String getFirstFormName() {
+ return "GUI 1";
+ }
+
+ public Container createWidget(Resources res, String resPath, boolean loadTheme) {
+ initVars();
+ UIBuilder.registerCustomComponent("Button", com.codename1.ui.Button.class);
+ UIBuilder.registerCustomComponent("Form", com.codename1.ui.Form.class);
+ UIBuilder.registerCustomComponent("Label", com.codename1.ui.Label.class);
+ UIBuilder.registerCustomComponent("TextArea", com.codename1.ui.TextArea.class);
+ UIBuilder.registerCustomComponent("TextField", com.codename1.ui.TextField.class);
+ if (loadTheme) {
+ if (res == null) {
+ try {
+ res = Resources.openLayered(resPath);
+ } catch (java.io.IOException err) {
+ err.printStackTrace();
+ }
+ }
+ initTheme(res);
+ }
+ return createContainer(resPath, "GUI 1");
+ }
+
+ protected void initTheme(Resources res) {
+ String[] themes = res.getThemeResourceNames();
+ if (themes != null && themes.length > 0) {
+ UIManager.getInstance().setThemeProps(res.getTheme(themes[0]));
+ }
+ }
+
+ public StateMachineBase() {
+ }
+
+ public StateMachineBase(String resPath) {
+ this(null, resPath, true);
+ }
+
+ public StateMachineBase(Resources res) {
+ this(res, null, true);
+ }
+
+ public StateMachineBase(String resPath, boolean loadTheme) {
+ this(null, resPath, loadTheme);
+ }
+
+ public StateMachineBase(Resources res, boolean loadTheme) {
+ this(res, null, loadTheme);
+ }
+
+ public com.codename1.ui.Button findBtnHereNowOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnHereNowOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnHereNowOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnHereNowOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnHereNowOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextArea findTxtPublishMessage(Component root) {
+ return (com.codename1.ui.TextArea)findByName("txtPublishMessage", root);
+ }
+
+ public com.codename1.ui.TextArea findTxtPublishMessage() {
+ com.codename1.ui.TextArea cmp = (com.codename1.ui.TextArea)findByName("txtPublishMessage", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextArea)findByName("txtPublishMessage", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextArea findTxtPublishChannel(Component root) {
+ return (com.codename1.ui.TextArea)findByName("txtPublishChannel", root);
+ }
+
+ public com.codename1.ui.TextArea findTxtPublishChannel() {
+ com.codename1.ui.TextArea cmp = (com.codename1.ui.TextArea)findByName("txtPublishChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextArea)findByName("txtPublishChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton6(Component root) {
+ return (com.codename1.ui.Button)findByName("Button6", root);
+ }
+
+ public com.codename1.ui.Button findButton6() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button6", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button6", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Label findChannel(Component root) {
+ return (com.codename1.ui.Label)findByName("Channel", root);
+ }
+
+ public com.codename1.ui.Label findChannel() {
+ com.codename1.ui.Label cmp = (com.codename1.ui.Label)findByName("Channel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Label)findByName("Channel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton5(Component root) {
+ return (com.codename1.ui.Button)findByName("Button5", root);
+ }
+
+ public com.codename1.ui.Button findButton5() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button5", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button5", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton4(Component root) {
+ return (com.codename1.ui.Button)findByName("Button4", root);
+ }
+
+ public com.codename1.ui.Button findButton4() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button4", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button4", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton3(Component root) {
+ return (com.codename1.ui.Button)findByName("Button3", root);
+ }
+
+ public com.codename1.ui.Button findButton3() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button3", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button3", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton2(Component root) {
+ return (com.codename1.ui.Button)findByName("Button2", root);
+ }
+
+ public com.codename1.ui.Button findButton2() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button2", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button2", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnUnsubscribeOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnUnsubscribeOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnUnsubscribeOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnUnsubscribeOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnUnsubscribeOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnPresenceOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnPresenceOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnPresenceOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnPresenceOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnPresenceOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnPublish(Component root) {
+ return (com.codename1.ui.Button)findByName("btnPublish", root);
+ }
+
+ public com.codename1.ui.Button findBtnPublish() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnPublish", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnPublish", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findButton(Component root) {
+ return (com.codename1.ui.Button)findByName("Button", root);
+ }
+
+ public com.codename1.ui.Button findButton() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("Button", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("Button", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextField findTxtUnsubscribePresenceChannel(Component root) {
+ return (com.codename1.ui.TextField)findByName("txtUnsubscribePresenceChannel", root);
+ }
+
+ public com.codename1.ui.TextField findTxtUnsubscribePresenceChannel() {
+ com.codename1.ui.TextField cmp = (com.codename1.ui.TextField)findByName("txtUnsubscribePresenceChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextField)findByName("txtUnsubscribePresenceChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Label findLabel1(Component root) {
+ return (com.codename1.ui.Label)findByName("Label1", root);
+ }
+
+ public com.codename1.ui.Label findLabel1() {
+ com.codename1.ui.Label cmp = (com.codename1.ui.Label)findByName("Label1", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Label)findByName("Label1", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextField findTxtHistoryChannel(Component root) {
+ return (com.codename1.ui.TextField)findByName("txtHistoryChannel", root);
+ }
+
+ public com.codename1.ui.TextField findTxtHistoryChannel() {
+ com.codename1.ui.TextField cmp = (com.codename1.ui.TextField)findByName("txtHistoryChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextField)findByName("txtHistoryChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnDar(Component root) {
+ return (com.codename1.ui.Button)findByName("btnDar", root);
+ }
+
+ public com.codename1.ui.Button findBtnDar() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnDar", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnDar", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextField findTxtPresenceChannel(Component root) {
+ return (com.codename1.ui.TextField)findByName("txtPresenceChannel", root);
+ }
+
+ public com.codename1.ui.TextField findTxtPresenceChannel() {
+ com.codename1.ui.TextField cmp = (com.codename1.ui.TextField)findByName("txtPresenceChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextField)findByName("txtPresenceChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnUnsubscribePresenceOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnUnsubscribePresenceOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnUnsubscribePresenceOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnUnsubscribePresenceOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnUnsubscribePresenceOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnPublishOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnPublishOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnPublishOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnPublishOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnPublishOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnHistoryOk(Component root) {
+ return (com.codename1.ui.Button)findByName("btnHistoryOk", root);
+ }
+
+ public com.codename1.ui.Button findBtnHistoryOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnHistoryOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnHistoryOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Label findLabel(Component root) {
+ return (com.codename1.ui.Label)findByName("label", root);
+ }
+
+ public com.codename1.ui.Label findLabel() {
+ com.codename1.ui.Label cmp = (com.codename1.ui.Label)findByName("label", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Label)findByName("label", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextField findTxtUnsubscribeChannel(Component root) {
+ return (com.codename1.ui.TextField)findByName("txtUnsubscribeChannel", root);
+ }
+
+ public com.codename1.ui.TextField findTxtUnsubscribeChannel() {
+ com.codename1.ui.TextField cmp = (com.codename1.ui.TextField)findByName("txtUnsubscribeChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextField)findByName("txtUnsubscribeChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextField findTxtSubscribeChannel(Component root) {
+ return (com.codename1.ui.TextField)findByName("txtSubscribeChannel", root);
+ }
+
+ public com.codename1.ui.TextField findTxtSubscribeChannel() {
+ com.codename1.ui.TextField cmp = (com.codename1.ui.TextField)findByName("txtSubscribeChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextField)findByName("txtSubscribeChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.TextArea findTxtHereNowChannel(Component root) {
+ return (com.codename1.ui.TextArea)findByName("txtHereNowChannel", root);
+ }
+
+ public com.codename1.ui.TextArea findTxtHereNowChannel() {
+ com.codename1.ui.TextArea cmp = (com.codename1.ui.TextArea)findByName("txtHereNowChannel", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.TextArea)findByName("txtHereNowChannel", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findBtnTime(Component root) {
+ return (com.codename1.ui.Button)findByName("btnTime", root);
+ }
+
+ public com.codename1.ui.Button findBtnTime() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("btnTime", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("btnTime", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public com.codename1.ui.Button findTxtSubscribeOk(Component root) {
+ return (com.codename1.ui.Button)findByName("txtSubscribeOk", root);
+ }
+
+ public com.codename1.ui.Button findTxtSubscribeOk() {
+ com.codename1.ui.Button cmp = (com.codename1.ui.Button)findByName("txtSubscribeOk", Display.getInstance().getCurrent());
+ if (cmp == null && aboutToShowThisContainer != null) {
+ cmp = (com.codename1.ui.Button)findByName("txtSubscribeOk", aboutToShowThisContainer);
+ }
+ return cmp;
+ }
+
+ public static final int COMMAND_GUI1HereNow = 5;
+ public static final int COMMAND_SubscribeSubscribe = 9;
+ public static final int COMMAND_GUI1Unsubscribe = 6;
+ public static final int COMMAND_GUI1History = 4;
+ public static final int COMMAND_GUI1Subscribe = 2;
+ public static final int COMMAND_UnsubscribePresenceUnsubscribeFromPresenceEvents = 11;
+ public static final int COMMAND_GUI1UnsubscribePresence = 7;
+ public static final int COMMAND_GUI1Time = 8;
+ public static final int COMMAND_GUI1Presence = 3;
+ public static final int COMMAND_GUI1Publish = 1;
+ public static final int COMMAND_HereNowGetHereNowData = 10;
+
+ protected boolean onGUI1HereNow() {
+ return false;
+ }
+
+ protected boolean onSubscribeSubscribe() {
+ return false;
+ }
+
+ protected boolean onGUI1Unsubscribe() {
+ return false;
+ }
+
+ protected boolean onGUI1History() {
+ return false;
+ }
+
+ protected boolean onGUI1Subscribe() {
+ return false;
+ }
+
+ protected boolean onUnsubscribePresenceUnsubscribeFromPresenceEvents() {
+ return false;
+ }
+
+ protected boolean onGUI1UnsubscribePresence() {
+ return false;
+ }
+
+ protected boolean onGUI1Time() {
+ return false;
+ }
+
+ protected boolean onGUI1Presence() {
+ return false;
+ }
+
+ protected boolean onGUI1Publish() {
+ return false;
+ }
+
+ protected boolean onHereNowGetHereNowData() {
+ return false;
+ }
+
+ protected void processCommand(ActionEvent ev, Command cmd) {
+ switch (cmd.getId()) {
+ case COMMAND_GUI1HereNow:
+ if (onGUI1HereNow()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_SubscribeSubscribe:
+ if (onSubscribeSubscribe()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1Unsubscribe:
+ if (onGUI1Unsubscribe()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1History:
+ if (onGUI1History()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1Subscribe:
+ if (onGUI1Subscribe()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_UnsubscribePresenceUnsubscribeFromPresenceEvents:
+ if (onUnsubscribePresenceUnsubscribeFromPresenceEvents()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1UnsubscribePresence:
+ if (onGUI1UnsubscribePresence()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1Time:
+ if (onGUI1Time()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1Presence:
+ if (onGUI1Presence()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_GUI1Publish:
+ if (onGUI1Publish()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ case COMMAND_HereNowGetHereNowData:
+ if (onHereNowGetHereNowData()) {
+ ev.consume();
+ return;
+ }
+ break;
+
+ }
+ if (ev.getComponent() != null) {
+ handleComponentAction(ev.getComponent(), ev);
+ }
+ }
+
+ protected void exitForm(Form f) {
+ if ("Presence".equals(f.getName())) {
+ exitPresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(f.getName())) {
+ exitGUI1(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(f.getName())) {
+ exitUnsubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(f.getName())) {
+ exitHistory(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(f.getName())) {
+ exitSubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(f.getName())) {
+ exitUnsubscribePresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(f.getName())) {
+ exitHereNow(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(f.getName())) {
+ exitPublish(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void exitPresence(Form f) {
+ }
+
+
+ protected void exitGUI1(Form f) {
+ }
+
+
+ protected void exitUnsubscribe(Form f) {
+ }
+
+
+ protected void exitHistory(Form f) {
+ }
+
+
+ protected void exitSubscribe(Form f) {
+ }
+
+
+ protected void exitUnsubscribePresence(Form f) {
+ }
+
+
+ protected void exitHereNow(Form f) {
+ }
+
+
+ protected void exitPublish(Form f) {
+ }
+
+ protected void beforeShow(Form f) {
+ aboutToShowThisContainer = f;
+ if ("Presence".equals(f.getName())) {
+ beforePresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(f.getName())) {
+ beforeGUI1(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(f.getName())) {
+ beforeUnsubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(f.getName())) {
+ beforeHistory(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(f.getName())) {
+ beforeSubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(f.getName())) {
+ beforeUnsubscribePresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(f.getName())) {
+ beforeHereNow(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(f.getName())) {
+ beforePublish(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void beforePresence(Form f) {
+ }
+
+
+ protected void beforeGUI1(Form f) {
+ }
+
+
+ protected void beforeUnsubscribe(Form f) {
+ }
+
+
+ protected void beforeHistory(Form f) {
+ }
+
+
+ protected void beforeSubscribe(Form f) {
+ }
+
+
+ protected void beforeUnsubscribePresence(Form f) {
+ }
+
+
+ protected void beforeHereNow(Form f) {
+ }
+
+
+ protected void beforePublish(Form f) {
+ }
+
+ protected void beforeShowContainer(Container c) {
+ aboutToShowThisContainer = c;
+ if ("Presence".equals(c.getName())) {
+ beforeContainerPresence(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(c.getName())) {
+ beforeContainerGUI1(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(c.getName())) {
+ beforeContainerUnsubscribe(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(c.getName())) {
+ beforeContainerHistory(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(c.getName())) {
+ beforeContainerSubscribe(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(c.getName())) {
+ beforeContainerUnsubscribePresence(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(c.getName())) {
+ beforeContainerHereNow(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(c.getName())) {
+ beforeContainerPublish(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void beforeContainerPresence(Container c) {
+ }
+
+
+ protected void beforeContainerGUI1(Container c) {
+ }
+
+
+ protected void beforeContainerUnsubscribe(Container c) {
+ }
+
+
+ protected void beforeContainerHistory(Container c) {
+ }
+
+
+ protected void beforeContainerSubscribe(Container c) {
+ }
+
+
+ protected void beforeContainerUnsubscribePresence(Container c) {
+ }
+
+
+ protected void beforeContainerHereNow(Container c) {
+ }
+
+
+ protected void beforeContainerPublish(Container c) {
+ }
+
+ protected void postShow(Form f) {
+ if ("Presence".equals(f.getName())) {
+ postPresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(f.getName())) {
+ postGUI1(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(f.getName())) {
+ postUnsubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(f.getName())) {
+ postHistory(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(f.getName())) {
+ postSubscribe(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(f.getName())) {
+ postUnsubscribePresence(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(f.getName())) {
+ postHereNow(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(f.getName())) {
+ postPublish(f);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void postPresence(Form f) {
+ }
+
+
+ protected void postGUI1(Form f) {
+ }
+
+
+ protected void postUnsubscribe(Form f) {
+ }
+
+
+ protected void postHistory(Form f) {
+ }
+
+
+ protected void postSubscribe(Form f) {
+ }
+
+
+ protected void postUnsubscribePresence(Form f) {
+ }
+
+
+ protected void postHereNow(Form f) {
+ }
+
+
+ protected void postPublish(Form f) {
+ }
+
+ protected void postShowContainer(Container c) {
+ if ("Presence".equals(c.getName())) {
+ postContainerPresence(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(c.getName())) {
+ postContainerGUI1(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(c.getName())) {
+ postContainerUnsubscribe(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(c.getName())) {
+ postContainerHistory(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(c.getName())) {
+ postContainerSubscribe(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(c.getName())) {
+ postContainerUnsubscribePresence(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(c.getName())) {
+ postContainerHereNow(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(c.getName())) {
+ postContainerPublish(c);
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void postContainerPresence(Container c) {
+ }
+
+
+ protected void postContainerGUI1(Container c) {
+ }
+
+
+ protected void postContainerUnsubscribe(Container c) {
+ }
+
+
+ protected void postContainerHistory(Container c) {
+ }
+
+
+ protected void postContainerSubscribe(Container c) {
+ }
+
+
+ protected void postContainerUnsubscribePresence(Container c) {
+ }
+
+
+ protected void postContainerHereNow(Container c) {
+ }
+
+
+ protected void postContainerPublish(Container c) {
+ }
+
+ protected void onCreateRoot(String rootName) {
+ if ("Presence".equals(rootName)) {
+ onCreatePresence();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("GUI 1".equals(rootName)) {
+ onCreateGUI1();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Unsubscribe".equals(rootName)) {
+ onCreateUnsubscribe();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("History".equals(rootName)) {
+ onCreateHistory();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Subscribe".equals(rootName)) {
+ onCreateSubscribe();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("UnsubscribePresence".equals(rootName)) {
+ onCreateUnsubscribePresence();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Here Now".equals(rootName)) {
+ onCreateHereNow();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ if ("Publish".equals(rootName)) {
+ onCreatePublish();
+ aboutToShowThisContainer = null;
+ return;
+ }
+
+ }
+
+
+ protected void onCreatePresence() {
+ }
+
+
+ protected void onCreateGUI1() {
+ }
+
+
+ protected void onCreateUnsubscribe() {
+ }
+
+
+ protected void onCreateHistory() {
+ }
+
+
+ protected void onCreateSubscribe() {
+ }
+
+
+ protected void onCreateUnsubscribePresence() {
+ }
+
+
+ protected void onCreateHereNow() {
+ }
+
+
+ protected void onCreatePublish() {
+ }
+
+ protected void handleComponentAction(Component c, ActionEvent event) {
+ Container rootContainerAncestor = getRootAncestor(c);
+ if (rootContainerAncestor == null) return;
+ String rootContainerName = rootContainerAncestor.getName();
+ if (c.getParent().getLeadParent() != null) {
+ c = c.getParent().getLeadParent();
+ }
+ if (rootContainerName == null) return;
+ if (rootContainerName.equals("Presence")) {
+ if ("txtPresenceChannel".equals(c.getName())) {
+ onPresence_TxtPresenceChannelAction(c, event);
+ return;
+ }
+ if ("btnPresenceOk".equals(c.getName())) {
+ onPresence_BtnPresenceOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("GUI 1")) {
+ if ("Button".equals(c.getName())) {
+ onGUI1_ButtonAction(c, event);
+ return;
+ }
+ if ("btnPublish".equals(c.getName())) {
+ onGUI1_BtnPublishAction(c, event);
+ return;
+ }
+ if ("Button2".equals(c.getName())) {
+ onGUI1_Button2Action(c, event);
+ return;
+ }
+ if ("Button3".equals(c.getName())) {
+ onGUI1_Button3Action(c, event);
+ return;
+ }
+ if ("Button4".equals(c.getName())) {
+ onGUI1_Button4Action(c, event);
+ return;
+ }
+ if ("Button5".equals(c.getName())) {
+ onGUI1_Button5Action(c, event);
+ return;
+ }
+ if ("Button6".equals(c.getName())) {
+ onGUI1_Button6Action(c, event);
+ return;
+ }
+ if ("btnTime".equals(c.getName())) {
+ onGUI1_BtnTimeAction(c, event);
+ return;
+ }
+ if ("btnDar".equals(c.getName())) {
+ onGUI1_BtnDarAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("Unsubscribe")) {
+ if ("txtUnsubscribeChannel".equals(c.getName())) {
+ onUnsubscribe_TxtUnsubscribeChannelAction(c, event);
+ return;
+ }
+ if ("btnUnsubscribeOk".equals(c.getName())) {
+ onUnsubscribe_BtnUnsubscribeOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("History")) {
+ if ("txtHistoryChannel".equals(c.getName())) {
+ onHistory_TxtHistoryChannelAction(c, event);
+ return;
+ }
+ if ("btnHistoryOk".equals(c.getName())) {
+ onHistory_BtnHistoryOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("Subscribe")) {
+ if ("txtSubscribeChannel".equals(c.getName())) {
+ onSubscribe_TxtSubscribeChannelAction(c, event);
+ return;
+ }
+ if ("txtSubscribeOk".equals(c.getName())) {
+ onSubscribe_TxtSubscribeOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("UnsubscribePresence")) {
+ if ("txtUnsubscribePresenceChannel".equals(c.getName())) {
+ onUnsubscribePresence_TxtUnsubscribePresenceChannelAction(c, event);
+ return;
+ }
+ if ("btnUnsubscribePresenceOk".equals(c.getName())) {
+ onUnsubscribePresence_BtnUnsubscribePresenceOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("Here Now")) {
+ if ("txtHereNowChannel".equals(c.getName())) {
+ onHereNow_TxtHereNowChannelAction(c, event);
+ return;
+ }
+ if ("btnHereNowOk".equals(c.getName())) {
+ onHereNow_BtnHereNowOkAction(c, event);
+ return;
+ }
+ }
+ if (rootContainerName.equals("Publish")) {
+ if ("txtPublishChannel".equals(c.getName())) {
+ onPublish_TxtPublishChannelAction(c, event);
+ return;
+ }
+ if ("txtPublishMessage".equals(c.getName())) {
+ onPublish_TxtPublishMessageAction(c, event);
+ return;
+ }
+ if ("btnPublishOk".equals(c.getName())) {
+ onPublish_BtnPublishOkAction(c, event);
+ return;
+ }
+ }
+ }
+
+ protected void onPresence_TxtPresenceChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onPresence_BtnPresenceOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_ButtonAction(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_BtnPublishAction(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_Button2Action(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_Button3Action(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_Button4Action(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_Button5Action(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_Button6Action(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_BtnTimeAction(Component c, ActionEvent event) {
+ }
+
+ protected void onGUI1_BtnDarAction(Component c, ActionEvent event) {
+ }
+
+ protected void onUnsubscribe_TxtUnsubscribeChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onUnsubscribe_BtnUnsubscribeOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onHistory_TxtHistoryChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onHistory_BtnHistoryOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onSubscribe_TxtSubscribeChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onSubscribe_TxtSubscribeOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onUnsubscribePresence_TxtUnsubscribePresenceChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onUnsubscribePresence_BtnUnsubscribePresenceOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onHereNow_TxtHereNowChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onHereNow_BtnHereNowOkAction(Component c, ActionEvent event) {
+ }
+
+ protected void onPublish_TxtPublishChannelAction(Component c, ActionEvent event) {
+ }
+
+ protected void onPublish_TxtPublishMessageAction(Component c, ActionEvent event) {
+ }
+
+ protected void onPublish_BtnPublishOkAction(Component c, ActionEvent event) {
+ }
+
+}
diff --git a/codenameone/examples/PubnubDevConsole/src/theme.res b/codenameone/examples/PubnubDevConsole/src/theme.res
new file mode 100644
index 000000000..aac9dade0
Binary files /dev/null and b/codenameone/examples/PubnubDevConsole/src/theme.res differ
diff --git a/codenameone/examples/PubnubDevConsole/src/userclasses/StateMachine.java b/codenameone/examples/PubnubDevConsole/src/userclasses/StateMachine.java
new file mode 100644
index 000000000..04478aefc
--- /dev/null
+++ b/codenameone/examples/PubnubDevConsole/src/userclasses/StateMachine.java
@@ -0,0 +1,166 @@
+/**
+ * Your application code goes here
+ */
+
+package userclasses;
+
+import generated.StateMachineBase;
+import com.codename1.ui.*;
+import com.codename1.ui.events.*;
+import com.codename1.ui.util.Resources;
+
+import com.pubnub.api.*;
+
+
+/**
+ *
+ * @author Your name here
+ */
+public class StateMachine extends StateMachineBase {
+ Pubnub pubnub;
+ public StateMachine(String resFile) {
+ super(resFile);
+ // do not modify, write code in initVars and initialize class members there,
+ // the constructor might be invoked too late due to race conditions that might occur
+ }
+
+ /**
+ * this method should be used to initialize variables instead of
+ * the constructor/class scope to avoid race conditions
+ */
+ protected void initVars(Resources res) {
+ pubnub = new Pubnub("demo", "demo");
+ }
+
+
+
+
+ @Override
+ protected void onPublish_BtnPublishOkAction(Component c, ActionEvent event) {
+ String channel = findTxtPublishChannel().getText();
+ String message = findTxtPublishMessage().getText();
+ pubnub.publish(channel, message, new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("Publish", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("Publish", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+ }
+
+ @Override
+ protected void onUnsubscribePresence_BtnUnsubscribePresenceOkAction(Component c, ActionEvent event) {
+ String channel = findTxtUnsubscribePresenceChannel().getText();
+ pubnub.unsubscribePresence(channel);
+ }
+
+ @Override
+ protected void onUnsubscribe_BtnUnsubscribeOkAction(Component c, ActionEvent event) {
+ String channel = findTxtUnsubscribeChannel().getText();
+ pubnub.unsubscribe(channel);
+ }
+
+ @Override
+ protected void onSubscribe_TxtSubscribeOkAction(Component c, ActionEvent event) {
+ try {
+ String channel = findTxtSubscribeChannel().getText();
+
+ pubnub.subscribe(channel , new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("Subscribe", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("Subscribe", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+ } catch (PubnubException ex) {
+
+ }
+
+ }
+
+ @Override
+ protected void onPresence_TxtPresenceChannelAction(Component c, ActionEvent event) {
+ try {
+ String channel = findTxtPresenceChannel().getText();
+
+ pubnub.presence(channel , new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("Presence", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("Presence", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+ } catch (PubnubException ex) {
+
+ }
+
+ }
+
+ @Override
+ protected void onHistory_BtnHistoryOkAction(Component c, ActionEvent event) {
+ String channel = findTxtHistoryChannel().getText();
+ pubnub.history(channel, 1, new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("History", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("History", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+
+ }
+
+ @Override
+ protected void onHereNow_TxtHereNowChannelAction(Component c, ActionEvent event) {
+ String channel = findTxtHereNowChannel().getText();
+ pubnub.hereNow(channel, new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("Here Now", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("Here Now", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+
+ }
+
+
+ @Override
+ protected void onGUI1_BtnTimeAction(Component c, ActionEvent event) {
+ pubnub.time(new Callback() {
+
+ @Override
+ public void successCallback(String channel, Object message) {
+ new Dialog().show("Time", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ @Override
+ public void errorCallback(String channel, PubnubError message) {
+ new Dialog().show("Time", message.toString() , Dialog.TYPE_INFO, null, "Ok", null);
+ }
+ });
+
+ }
+
+ @Override
+ protected void onGUI1_BtnDarAction(Component c, ActionEvent event) {
+ pubnub.disconnectAndResubscribe();;
+ }
+}
diff --git a/codenameone/json.cn1lib b/codenameone/json.cn1lib
new file mode 100644
index 000000000..58636ebd5
Binary files /dev/null and b/codenameone/json.cn1lib differ
diff --git a/codenameone/src/com/codename1/io/PubnubCn1Connection.java b/codenameone/src/com/codename1/io/PubnubCn1Connection.java
new file mode 100644
index 000000000..c18faea7e
--- /dev/null
+++ b/codenameone/src/com/codename1/io/PubnubCn1Connection.java
@@ -0,0 +1,78 @@
+package com.codename1.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import com.codename1.impl.CodenameOneImplementation;
+import com.pubnub.api.HttpUtil;
+import java.io.UnsupportedEncodingException;
+//import java.util.logging.Level;
+//import java.util.logging.Logger;
+
+public class PubnubCn1Connection {
+
+ private CodenameOneImplementation impl = Util.getImplementation();
+ private Object connection = null;
+ private InputStream input = null;
+
+ private byte[] data = null;
+
+ public PubnubCn1Response fetch(String url, int timeout, Hashtable _headers) throws UnsupportedEncodingException, IOException {
+ int rc = 0;
+ String page = null;
+ int contentLength = 0;
+
+ while (HttpUtil.isRedirect(rc) || rc == 0) {
+ try {
+ connection = impl.connect(url, true, false, timeout);
+ } catch (IOException ex) {
+ throw ex;
+ }
+ impl.setPostRequest(connection, false);
+
+ if (_headers != null) {
+ Enumeration e = _headers.keys();
+ while (e.hasMoreElements()) {
+ String k = (String) e.nextElement();
+ String value = (String) _headers.get(k);
+ impl.setHeader(connection, k, value);
+ }
+ }
+ try {
+ rc = impl.getResponseCode(connection);
+ } catch (IOException ex) {
+ throw ex;
+ }
+ if (HttpUtil.isRedirect(rc)) {
+ String uri;
+ try {
+ uri = impl.getHeaderField("location", connection);
+ } catch (IOException ex) {
+ throw ex;
+ }
+ if (!(uri.startsWith("https://") || uri.startsWith("https://"))) {
+ url = Util.relativeToAbsolute(url, uri);
+ } else {
+ url = uri;
+ }
+ }
+ }
+ contentLength = impl.getContentLength(connection);
+ try {
+ input = impl.openInputStream(connection);
+ data = Util.readInputStream(input);
+ input.close();
+ } catch (IOException ex) {
+ return new PubnubCn1Response(rc, ex.getMessage() );
+ }
+
+ input = null;
+
+ return new PubnubCn1Response(rc, new String(data, "UTF-8"));
+ }
+
+ public void disconnect() {
+ }
+}
diff --git a/codenameone/src/com/codename1/io/PubnubCn1Response.java b/codenameone/src/com/codename1/io/PubnubCn1Response.java
new file mode 100644
index 000000000..d14d9fb67
--- /dev/null
+++ b/codenameone/src/com/codename1/io/PubnubCn1Response.java
@@ -0,0 +1,17 @@
+package com.codename1.io;
+
+public class PubnubCn1Response {
+ private String response;
+ private int responseStatusCode;
+ public String getResponse() {
+ return response;
+ }
+ public int getResponseStatusCode() {
+ return responseStatusCode;
+ }
+ public PubnubCn1Response(int responseStatusCode, String response) {
+ this.response = response;
+ this.responseStatusCode = responseStatusCode;
+ }
+}
+
diff --git a/codenameone/src/com/pubnub/api/HttpClientCore.java b/codenameone/src/com/pubnub/api/HttpClientCore.java
new file mode 100644
index 000000000..cce79d152
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/HttpClientCore.java
@@ -0,0 +1,105 @@
+package com.pubnub.api;
+
+import static com.pubnub.api.PubnubError.*;
+import static com.pubnub.api.PubnubError.getErrorObject;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import com.codename1.impl.CodenameOneImplementation;
+import com.codename1.io.*;
+import org.json.*;
+
+class HttpClientCore extends HttpClient {
+
+
+ PubnubCn1Connection connection;
+ private int requestTimeout = 310000;
+ private int connectionTimeout = 5000;
+
+
+ protected static Logger log = new Logger(Worker.class);
+
+ private void init() {
+ connection = new PubnubCn1Connection();
+ }
+
+ public HttpClientCore(int connectionTimeout, int requestTimeout, Hashtable headers) {
+ init();
+ this.setRequestTimeout(requestTimeout);
+ this.setConnectionTimeout(connectionTimeout);
+ this._headers = headers;
+ }
+
+ public int getRequestTimeout() {
+ return requestTimeout;
+ }
+
+ public void setRequestTimeout(int requestTimeout) {
+ this.requestTimeout = requestTimeout;
+ }
+
+ public int getConnectionTimeout() {
+ return connectionTimeout;
+ }
+
+ public void setConnectionTimeout(int connectionTimeout) {
+ this.connectionTimeout = connectionTimeout;
+ }
+
+ public HttpResponse fetch(String url) throws PubnubException, IOException {
+ return fetch(url, null);
+ }
+
+ public synchronized HttpResponse fetch(String url, Hashtable headers)
+ throws PubnubException, IOException {
+ IOException excp = null;
+ PubnubCn1Response pcr = null;
+ try {
+ pcr = connection.fetch(url, requestTimeout, PubnubUtil.hashtableClone(headers,_headers));
+ } catch (IOException ex) {
+ excp = ex;
+ }
+ String page = pcr.getResponse();
+ switch (pcr.getResponseStatusCode()) {
+ case HttpUtil.HTTP_FORBIDDEN:
+ throw new PubnubException(getErrorObject(PNERROBJ_FORBIDDEN, page));
+ case HttpUtil.HTTP_UNAUTHORIZED:
+ throw new PubnubException(getErrorObject(PNERROBJ_UNAUTHORIZED, page));
+ case HttpUtil.HTTP_BAD_REQUEST:
+ try {
+ JSONArray jsarr = new JSONArray(page);
+ String error = jsarr.get(1).toString();
+ throw new PubnubException(getErrorObject(PNERROBJ_BAD_REQUEST, 1, error));
+ } catch (JSONException e) {
+ JSONObject jso;
+ try {
+ jso = new JSONObject(page);
+ throw new PubnubException(getErrorObject(PNERROBJ_BAD_REQUEST, 2, jso.toString()));
+ } catch (JSONException e1) {
+ throw new PubnubException(getErrorObject(PNERROBJ_INVALID_JSON, 2));
+ }
+ }
+ case HttpUtil.HTTP_BAD_GATEWAY:
+ throw new PubnubException(getErrorObject(PNERROBJ_BAD_GATEWAY, url));
+ case HttpUtil.HTTP_CLIENT_TIMEOUT:
+ throw new PubnubException(getErrorObject(PNERROBJ_CLIENT_TIMEOUT, url));
+ case HttpUtil.HTTP_GATEWAY_TIMEOUT:
+ throw new PubnubException(getErrorObject(PNERROBJ_GATEWAY_TIMEOUT, url));
+ case HttpUtil.HTTP_INTERNAL_ERROR:
+ throw new PubnubException(getErrorObject(PNERROBJ_INTERNAL_ERROR, url));
+ default:
+ if (excp != null) throw excp;
+ break;
+ }
+ return new HttpResponse(pcr.getResponseStatusCode(), pcr.getResponse());
+ }
+
+ public void shutdown() {
+ if (connection != null) connection.disconnect();
+ }
+}
+
diff --git a/codenameone/src/com/pubnub/api/Logger.java b/codenameone/src/com/pubnub/api/Logger.java
new file mode 100644
index 000000000..1f6575107
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/Logger.java
@@ -0,0 +1,59 @@
+package com.pubnub.api;
+
+import com.codename1.io.Log;
+
+class Cn1Logger {
+
+ private Log log;
+
+ public Cn1Logger(Class c) {
+ Log log = Log.getInstance();
+ }
+
+ public void debug(String s) {
+ log.p(s, Log.DEBUG);
+ }
+
+ public void trace(String s) {
+ log.p(s,Log.INFO);
+ }
+
+ public void error(String s) {
+ log.p(s,Log.ERROR);
+ }
+
+ public void info(String s) {
+ log.p(s,Log.INFO);
+ }
+}
+
+class Logger extends AbstractLogger {
+
+ private Class _class;
+ private Cn1Logger log;
+
+ public Logger(Class _class) {
+ this._class = _class;
+ this.log = new Cn1Logger(this._class);
+ }
+
+ @Override
+ protected void nativeDebug(String s) {
+ log.debug(s);
+ }
+
+ @Override
+ protected void nativeVerbose(String s) {
+ log.trace(s);
+ }
+
+ @Override
+ protected void nativeError(String s) {
+ log.error(s);
+ }
+
+ @Override
+ protected void nativeInfo(String s) {
+ log.info(s);
+ }
+}
diff --git a/codenameone/src/com/pubnub/api/NonSubscribeManager.java b/codenameone/src/com/pubnub/api/NonSubscribeManager.java
new file mode 100644
index 000000000..fb1060b68
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/NonSubscribeManager.java
@@ -0,0 +1,13 @@
+package com.pubnub.api;
+
+class NonSubscribeManager extends AbstractNonSubscribeManager {
+
+ public NonSubscribeManager(String name, int connectionTimeout,
+ int requestTimeout) {
+ super(name, connectionTimeout, requestTimeout);
+ }
+
+ public void clearRequestQueue() {
+ _waiting.clear();
+ }
+}
diff --git a/codenameone/src/com/pubnub/api/Pubnub.java b/codenameone/src/com/pubnub/api/Pubnub.java
new file mode 100644
index 000000000..594b78a81
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/Pubnub.java
@@ -0,0 +1,555 @@
+package com.pubnub.api;
+
+
+import java.util.Hashtable;
+import java.util.Random;
+
+/**
+ * Pubnub object facilitates querying channels for messages and listening on
+ * channels for presence/message events
+ *
+ * @author Pubnub
+ *
+ */
+
+public class Pubnub extends PubnubCore {
+
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param secret_key
+ * Secret Key
+ * @param cipher_key
+ * Cipher Key
+ * @param ssl_on
+ * SSL on ?
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
+ }
+
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param secret_key
+ * Secret Key
+ * @param ssl_on
+ * SSL on ?
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, "", ssl_on);
+ }
+
+ /**
+ * Pubnub Constructor
+ *
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ */
+ public Pubnub(String publish_key, String subscribe_key) {
+ super(publish_key, subscribe_key, "", "", false);
+ }
+
+ /**
+ * @param publish_key
+ * Publish Key
+ * @param subscribe_key
+ * Subscribe Key
+ * @param ssl
+ */
+ public Pubnub(String publish_key, String subscribe_key, boolean ssl) {
+ super(publish_key, subscribe_key, "", "", ssl);
+ }
+
+ /**
+ * @param publish_key
+ * @param subscribe_key
+ * @param secret_key
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key) {
+ super(publish_key, subscribe_key, secret_key, "", false);
+ }
+
+ /**
+ * Sets value for UUID
+ *
+ * @param uuid
+ * UUID value for Pubnub client
+ */
+ public void setUUID(String uuid) {
+ this.UUID = uuid.toString();
+ }
+
+ protected String uuid() {
+
+ String valueBeforeMD5;
+ String valueAfterMD5;
+ Random mySecureRand = new Random();
+ String s_id = String.valueOf(PubnubCore.class.hashCode());
+ StringBuffer sbValueBeforeMD5 = new StringBuffer();
+ try {
+ long time = System.currentTimeMillis();
+ long rand = 0;
+ rand = mySecureRand.nextLong();
+ sbValueBeforeMD5.append(s_id);
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(time));
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(rand));
+ valueBeforeMD5 = sbValueBeforeMD5.toString();
+ byte[] array = PubnubCrypto.md5(valueBeforeMD5);
+ StringBuffer sb = new StringBuffer();
+ for (int j = 0; j < array.length; ++j) {
+ int b = array[j] & 0xFF;
+ if (b < 0x10) {
+ sb.append('0');
+ }
+ sb.append(Integer.toHexString(b));
+ }
+ valueAfterMD5 = sb.toString();
+ String raw = valueAfterMD5.toUpperCase();
+ sb = new StringBuffer();
+ sb.append(raw.substring(0, 8));
+ sb.append("-");
+ sb.append(raw.substring(8, 12));
+ sb.append("-");
+ sb.append(raw.substring(12, 16));
+ sb.append("-");
+ sb.append(raw.substring(16, 20));
+ sb.append("-");
+ sb.append(raw.substring(20));
+ return sb.toString();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * This method sets timeout value for subscribe/presence. Default value is
+ * 310000 milliseconds i.e. 310 seconds
+ *
+ * @param timeout
+ * Timeout value in milliseconds for subscribe/presence
+ */
+ public void setSubscribeTimeout(int timeout) {
+ super.setSubscribeTimeout(timeout);
+ }
+
+ /**
+ * This method returns timeout value for subscribe/presence.
+ *
+ * @return Timeout value in milliseconds for subscribe/presence
+ */
+ public int getSubscribeTimeout() {
+ return super.getSubscribeTimeout();
+ }
+
+ /**
+ * This method set timeout value for non subscribe operations like publish,
+ * history, hereNow. Default value is 15000 milliseconds i.e. 15 seconds.
+ *
+ * @param timeout
+ * Timeout value in milliseconds for Non subscribe operations
+ * like publish, history, hereNow
+ */
+ public void setNonSubscribeTimeout(int timeout) {
+ super.setNonSubscribeTimeout(timeout);
+ }
+ /**
+ * This method returns timeout value for non subscribe operations like publish, history, hereNow
+ *
+ * @return Timeout value in milliseconds for for Non subscribe operations like publish, history, hereNow
+ */
+ public int getNonSubscribeTimeout() {
+ return super.getNonSubscribeTimeout();
+ }
+
+ protected String getUserAgent() {
+ return "Java/" + VERSION;
+ }
+
+ /**
+ * Send a message to a channel.
+ *
+ * @param args
+ * Hashtable containing channel name, message.
+ * @param callback
+ * object of sub class of Callback class
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ * accepting Hashtable as arguments have been deprecated.
+ */
+ @Deprecated
+ @Override
+ public void publish(Hashtable args, Callback callback) {
+ super.publish(args, callback);
+ }
+
+ /**
+ * Send a message to a channel.
+ *
+ * @param args
+ * Hashtable containing channel name, message, callback
+ * @deprecated As of version 3.5.2 . Will be removed in 3.6.0 . Methods
+ * accepting Hashtable as arguments have been deprecated.
+ *
+ */
+ @Deprecated
+ @Override
+ public void publish(Hashtable args) {
+ super.publish(args);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param count
+ * Upper limit on number of messages to be returned
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, long start, long end, int count, boolean reverse, Callback callback)}
+ */
+ @Deprecated
+ @Override
+ public void detailedHistory(final String channel, long start, long end,
+ int count, boolean reverse, final Callback callback) {
+ super.detailedHistory(channel, start, end, count, reverse, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param count
+ * Upper limit on number of messages to be returned
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ */
+ public void history(final String channel, long start, long end, int count,
+ boolean reverse, final Callback callback) {
+ super.detailedHistory(channel, start, end, count, reverse, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, long start, boolean reverse, Callback callback)}
+ */
+ @Deprecated
+ @Override
+ public void detailedHistory(String channel, long start, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, start, reverse, callback);
+ }
+
+ /**
+ *
+ * Read history for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ */
+ public void history(String channel, long start, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, start, reverse, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, long start, long end, Callback callback)}
+ */
+ @Deprecated
+ @Override
+ public void detailedHistory(String channel, long start, long end,
+ Callback callback) {
+ super.detailedHistory(channel, start, end, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param callback
+ * Callback
+ */
+
+ public void history(String channel, long start, long end, Callback callback) {
+ super.detailedHistory(channel, start, end, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, long start, long end, boolean reverse, Callback callback)}
+ */
+ @Deprecated
+ @Override
+ public void detailedHistory(String channel, long start, long end,
+ boolean reverse, Callback callback) {
+ super.detailedHistory(channel, start, end, reverse, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param start
+ * Start time
+ * @param end
+ * End time
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ */
+ public void history(String channel, long start, long end, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, start, end, reverse, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param count
+ * Upper limit on number of messages to be returned
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, int count, boolean reverse, Callback callback)}
+ */
+ @Deprecated
+ @Override
+ public void detailedHistory(String channel, int count, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, count, reverse, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param count
+ * Upper limit on number of messages to be returned
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ */
+ public void history(String channel, int count, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, count, reverse, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, boolean reverse, Callback callback)}
+ */
+ @Deprecated
+ public void detailedHistory(String channel, boolean reverse,
+ Callback callback) {
+ super.detailedHistory(channel, reverse, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param reverse
+ * True if messages need to be in reverse order
+ * @param callback
+ * Callback
+ */
+
+ public void history(String channel, boolean reverse, Callback callback) {
+ super.detailedHistory(channel, reverse, callback);
+ }
+
+ /**
+ *
+ * Read DetailedHistory for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param count
+ * Maximum number of messages
+ * @param callback
+ * Callback object
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Replaced
+ * by
+ * {@link #history(String channel, int count, Callback callback)}
+ */
+ @Deprecated
+ public void detailedHistory(String channel, int count, Callback callback) {
+ super.detailedHistory(channel, count, callback);
+ }
+
+ /**
+ *
+ * Read History for a channel.
+ *
+ * @param channel
+ * Channel name for which detailed history is required
+ * @param count
+ * Maximum number of messages
+ * @param callback
+ * Callback object
+ */
+ @Override
+ public void history(String channel, int count, Callback callback) {
+ super.detailedHistory(channel, count, callback);
+ }
+
+ /**
+ * Unsubscribe/Disconnect from channel.
+ *
+ * @param args
+ * Hashtable containing channel name.
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ * accepting Hashtable as arguments have been deprecated.
+ */
+ @Deprecated
+ public void unsubscribe(Hashtable args) {
+ String[] channelList = (String[]) args.get("channels");
+ if (channelList == null) {
+ channelList = new String[] { (String) args.get("channel") };
+ }
+ unsubscribe(channelList);
+ }
+
+ /**
+ *
+ * Listen for a message on a channel.
+ *
+ * @param args
+ * Hashtable containing channel name
+ * @param callback
+ * Callback
+ * @exception PubnubException
+ * Throws PubnubException if Callback is null
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 .
+ */
+ @Deprecated
+ public void subscribe(Hashtable args, Callback callback)
+ throws PubnubException {
+ args.put("callback", callback);
+ super.subscribe(args);
+ }
+
+ /**
+ *
+ * Listen for a message on a channel.
+ *
+ * @param args
+ * Hashtable containing channel name, callback
+ * @exception PubnubException
+ * Throws PubnubException if Callback is null
+ * @deprecated as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ * accepting Hashtable as arguments have been deprecated.
+ */
+ @Deprecated
+ public void subscribe(Hashtable args) throws PubnubException {
+ super.subscribe(args);
+ }
+
+
+}
diff --git a/codenameone/src/com/pubnub/api/PubnubCrypto.java b/codenameone/src/com/pubnub/api/PubnubCrypto.java
new file mode 100644
index 000000000..c620d9739
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/PubnubCrypto.java
@@ -0,0 +1,13 @@
+package com.pubnub.api;
+
+class PubnubCrypto extends PubnubCryptoCore {
+
+ public PubnubCrypto(String CIPHER_KEY) {
+ super(CIPHER_KEY);
+ }
+
+ public PubnubCrypto(String CIPHER_KEY, String INITIALIZATION_VECTOR) {
+ super(CIPHER_KEY, INITIALIZATION_VECTOR);
+ }
+
+}
diff --git a/codenameone/src/com/pubnub/api/PubnubUtil.java b/codenameone/src/com/pubnub/api/PubnubUtil.java
new file mode 100644
index 000000000..2261873b6
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/PubnubUtil.java
@@ -0,0 +1,50 @@
+package com.pubnub.api;
+
+import com.codename1.io.Util;
+import org.json.*;
+
+/**
+ * PubnubUtil class provides utility methods like urlEncode etc
+ * @author Pubnub
+ *
+ */
+public class PubnubUtil extends PubnubUtilCore {
+
+ /**
+ * Returns encoded String
+ *
+ * @param sUrl
+ * , input string
+ * @return , encoded string
+ */
+ public static String urlEncode(String sUrl) {
+ return Util.encodeUrl(sUrl);
+ }
+ /**
+ * Convert input String to JSONObject, JSONArray, or String
+ *
+ * @param str
+ * JSON data in string format
+ *
+ * @return JSONArray or JSONObject or String
+ */
+ static Object stringToJSON(String str) {
+ try {
+ return new JSONArray(str);
+ } catch (JSONException e) {
+ }
+ try {
+ return new JSONObject(str);
+ } catch (JSONException ex) {
+ }
+ try {
+ return Integer.parseInt(str);
+ } catch (Exception ex) {
+ }
+ try {
+ return Double.parseDouble(str);
+ } catch (Exception ex) {
+ }
+ return str;
+ }
+}
diff --git a/codenameone/src/com/pubnub/api/SubscribeManager.java b/codenameone/src/com/pubnub/api/SubscribeManager.java
new file mode 100644
index 000000000..a1916237a
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/SubscribeManager.java
@@ -0,0 +1,13 @@
+package com.pubnub.api;
+
+class SubscribeManager extends AbstractSubscribeManager {
+
+ public SubscribeManager(String name, int connectionTimeout,
+ int requestTimeout) {
+ super(name, connectionTimeout, requestTimeout);
+ }
+
+ public void clearRequestQueue() {
+ _waiting.clear();
+ }
+}
diff --git a/codenameone/src/com/pubnub/api/SubscribeWorker.java b/codenameone/src/com/pubnub/api/SubscribeWorker.java
new file mode 100644
index 000000000..aeead6794
--- /dev/null
+++ b/codenameone/src/com/pubnub/api/SubscribeWorker.java
@@ -0,0 +1,113 @@
+package com.pubnub.api;
+
+//import java.net.SocketTimeoutException;
+import java.util.Hashtable;
+import java.util.Vector;
+import static com.pubnub.api.PubnubError.*;
+
+class SubscribeWorker extends AbstractSubscribeWorker {
+ private Exception excp = null;
+ SubscribeWorker(Vector _requestQueue, int connectionTimeout,
+ int requestTimeout, int maxRetries, int retryInterval, Hashtable headers) {
+ super(_requestQueue, connectionTimeout, requestTimeout,
+ maxRetries, retryInterval, headers);
+ }
+
+ SubscribeWorker(Vector _requestQueue, int connectionTimeout,
+ int requestTimeout, int maxRetries, int retryInterval, int windowInterval, Hashtable headers) {
+ super(_requestQueue, connectionTimeout, requestTimeout,
+ maxRetries, retryInterval, windowInterval, headers);
+ }
+ void process(HttpRequest hreq) {
+ HttpResponse hresp = null;
+ int currentRetryAttempt = (hreq.isDar())?1:maxRetries;
+ log.verbose("disconnectAndResubscribe is " + hreq.isDar());
+ if (hreq.getWorker() != null) {
+ log.verbose("Request placed by worker " + hreq.getWorker().getThread().getName());
+ if (hreq.getWorker()._die) {
+ log.verbose("The thread which placed the request has died, so ignore the request : " + hreq.getWorker().getThread().getName());
+ return;
+ }
+ }
+ if (!hreq.isSubzero() && windowInterval != 0) {
+ try {
+ Thread.sleep(windowInterval);
+ } catch (InterruptedException e) {
+ }
+ }
+ hreq.setWorker(this);
+ while (!_die && currentRetryAttempt <= maxRetries) {
+ try {
+ log.debug(hreq.getUrl());
+ hresp = httpclient.fetch(hreq.getUrl(), hreq.getHeaders());
+ if (hresp != null
+ && HttpUtil.checkResponseSuccess(hresp
+ .getStatusCode())) {
+ currentRetryAttempt = 1;
+ break;
+ }
+ } /*catch (SocketTimeoutException e) {
+ log.verbose("No Traffic , Read Timeout Exception in Fetch : " + e.toString());
+ if (_die) {
+ log.verbose("Asked to Die, Don't do back from DAR processing");
+ break;
+ }
+ if (hreq.isDar()) {
+ hreq.getResponseHandler().handleBackFromDar(hreq);
+ return;
+ }
+ break;
+
+ } */catch (PubnubException e) {
+ excp = e;
+ switch (e.getPubnubError().errorCode) {
+ case PNERR_FORBIDDEN:
+ case PNERR_UNAUTHORIZED:
+ log.verbose("Authentication Failure : " + e.toString());
+ currentRetryAttempt++;
+ break;
+ default:
+ log.verbose("Retry Attempt : " + ((currentRetryAttempt == maxRetries)?"last":currentRetryAttempt)
+ + " Exception in Fetch : " + e.toString());
+ currentRetryAttempt++;
+ break;
+ }
+
+ } catch (Exception e) {
+ excp = e;
+ log.verbose("Retry Attempt : " + ((currentRetryAttempt == maxRetries)?"last":currentRetryAttempt)
+ + " Exception in Fetch : " + e.toString());
+ currentRetryAttempt++;
+ }
+
+ try {
+ Thread.sleep(retryInterval);
+ } catch (InterruptedException e) {
+ }
+ }
+ if (!_die) {
+ if (hresp == null) {
+ log.debug("Error in fetching url : " + hreq.getUrl());
+ if (hreq.isDar()) {
+ log.verbose("Exhausted number of retries");
+ hreq.getResponseHandler().handleTimeout(hreq);
+ } else {
+
+ if (excp != null && excp instanceof PubnubException && ((PubnubException) excp).getPubnubError() != null) {
+ hreq.getResponseHandler().handleError(hreq, ((PubnubException) excp).getPubnubError());
+ } else {
+ hreq.getResponseHandler().handleError(hreq, getErrorObject(PNERROBJ_HTTP_ERROR, 1));
+ }
+ }
+ return;
+ }
+ log.debug(hresp.getResponse());
+ hreq.getResponseHandler().handleResponse(hreq, hresp.getResponse());
+ }
+
+ }
+
+ public void shutdown() {
+ if (httpclient != null) httpclient.shutdown();
+ }
+}
diff --git a/gwt/3.3/api/PubnubGwt.jar b/gwt/3.3/api/PubnubGwt.jar
new file mode 100644
index 000000000..4b394808e
Binary files /dev/null and b/gwt/3.3/api/PubnubGwt.jar differ
diff --git a/gwt/3.3/api/build.xml b/gwt/3.3/api/build.xml
new file mode 100644
index 000000000..bfa8ff98b
--- /dev/null
+++ b/gwt/3.3/api/build.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gwt/3.3/api/src/com/pubnub/gwt/api/Pubnub.gwt.xml b/gwt/3.3/api/src/com/pubnub/gwt/api/Pubnub.gwt.xml
new file mode 100644
index 000000000..6b47b7e5a
--- /dev/null
+++ b/gwt/3.3/api/src/com/pubnub/gwt/api/Pubnub.gwt.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gwt/3.3/api/src/com/pubnub/gwt/api/client/Callback.java b/gwt/3.3/api/src/com/pubnub/gwt/api/client/Callback.java
new file mode 100644
index 000000000..0c9dd76da
--- /dev/null
+++ b/gwt/3.3/api/src/com/pubnub/gwt/api/client/Callback.java
@@ -0,0 +1,20 @@
+/**
+ *
+ */
+package com.pubnub.gwt.api.client;
+
+/**
+ * @author Pubnub
+ *
+ */
+public abstract class Callback {
+ public void callback(String channel, Object message) {}
+
+ public void error(String channel, Object message) {}
+
+ public void connect(String channel) {}
+
+ public void reconnect(String channel) {}
+
+ public void disconnect(String channel) {}
+}
diff --git a/gwt/3.3/api/src/com/pubnub/gwt/api/client/Pubnub.java b/gwt/3.3/api/src/com/pubnub/gwt/api/client/Pubnub.java
new file mode 100644
index 000000000..09659e2a1
--- /dev/null
+++ b/gwt/3.3/api/src/com/pubnub/gwt/api/client/Pubnub.java
@@ -0,0 +1,212 @@
+/**
+ *
+ */
+package com.pubnub.gwt.api.client;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.json.client.JSONArray;
+import com.google.gwt.json.client.JSONObject;
+import com.pubnub.gwt.api.client.Callback;
+
+/**
+ * @author Pubnub
+ *
+ */
+public class Pubnub extends JavaScriptObject {
+ protected Pubnub() {
+ }
+ private native void alert(String message) /*-{
+ alert(message);
+ }-*/;
+ private static native Pubnub _init(String origin, String pubkey, String subkey, boolean ssl) /*-{
+ if (ssl)
+ ssl_setting = "on";
+ else
+ ssl_setting = "off";
+
+ p = $wnd.PUBNUB.init({
+ 'publish_key' : pubkey,
+ 'subscribe_key' : subkey,
+ 'ssl' : ssl_setting,
+ 'origin' : origin,
+ });
+ return p;
+
+ }-*/;
+
+ private static native void _time(Callback cb) /*-{
+ $wnd.PUBNUB.time(
+ function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)("", message.toString());
+ }
+ );
+ }-*/;
+
+ private final native void _uuid(Callback cb) /*-{
+ this.uuid(
+ function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)("", message);
+ }
+ );
+ }-*/;
+ private final native String _uuid() /*-{
+ return this.uuid();
+ }-*/;
+
+ private final native void _publish(String channel, String obj, Callback cb) /*-{
+
+
+ this.publish({
+ "channel" : channel,
+ "message" : eval("(" + obj + ")"),
+ "callback" : function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ }
+ });
+ }-*/;
+
+ private final native void _publishStr(String channel, String obj, Callback cb) /*-{
+ this.publish({
+ "channel" : channel,
+ "message" : obj,
+ "callback" : function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ }
+ });
+
+}-*/;
+
+ private final native void _subscribe(String channel, Callback cb)/*-{
+ this.subscribe({
+ "channel" : channel,
+ "callback" : function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ },
+ "error" : function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::error(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ },
+ "connect" : function(){
+ cb.@com.pubnub.gwt.api.client.Callback::connect(Ljava/lang/String;)(channel);
+ },
+ "reconnect" : function(){
+ cb.@com.pubnub.gwt.api.client.Callback::reconnect(Ljava/lang/String;)(channel);
+ },
+ "disconnect" : function(){
+ cb.@com.pubnub.gwt.api.client.Callback::disconnect(Ljava/lang/String;)(channel);
+ },
+ });
+ }-*/;
+
+ private native final void _history(String channel, int limit, Callback cb) /*-{
+ return this.history({
+ "channel" : channel,
+ "limit" : limit,
+ "callback" : function(message) {
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ }
+ });
+ }-*/;
+
+ private native final void _unsubscribe(String channel) /*-{
+ this.unsubscribe({
+ "channel" : channel
+ });
+ }-*/;
+
+ private native final void _here_now(String channel, Callback cb) /*-{
+ this.here_now({
+ "channel" : channel,
+ "callback" : function(message){
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ }
+ });
+ }-*/;
+
+ private native final void _detailedHistory(String channel, String start, String end, int count, boolean reverse, Callback cb) /*-{
+ param = {"channel" : channel};
+ if ( start != "-1")
+ param["start"] = start;
+ if ( end != "-1")
+ param["end"] = end;
+
+ if (count > -1)
+ param["count"] = count;
+
+ param["reverse"] = reverse;
+
+ param["callback"] = function(message) {
+ cb.@com.pubnub.gwt.api.client.Callback::callback(Ljava/lang/String;Ljava/lang/Object;)(channel, message);
+ };
+
+ this.detailedHistory(param);
+ }-*/;
+
+ //=================== Public Methods
+
+ public static Pubnub init() {
+ return _init("pubsub.pubnub.com", "demo", "demo", true);
+ }
+
+ public static Pubnub init(String pubkey, String subkey, boolean ssl) {
+ return _init("pubsub.pubnub.com", pubkey, subkey, ssl);
+ }
+ public static Pubnub init(String origin, String pubkey, String subkey, boolean ssl) {
+ return _init(origin, pubkey, subkey, ssl);
+ }
+ public final void time(Callback cb) {
+ _time(cb);
+ }
+
+ public final void uuid(Callback cb) {
+ _uuid(cb);
+ }
+ public final String uuid() {
+ return _uuid();
+ }
+
+ public final void publish(String channel, JSONObject obj, Callback cb) {
+ _publish(channel, obj.toString(), cb);
+ }
+
+ public final void publish(String channel, String obj, Callback cb) {
+ _publishStr(channel, obj, cb);
+ }
+
+ public final void publish(String channel, JSONArray obj, Callback cb) {
+ _publish(channel, obj.toString(), cb);
+ }
+
+ public final void subscribe(String channel, Callback cb) {
+ _subscribe(channel, cb);
+ }
+
+ public final void unsubscribe(String channel) {
+ _unsubscribe(channel);
+ }
+
+ public final void presence(String channel, Callback cb) {
+ _subscribe(channel + "-pnpres", cb);
+ }
+
+ public final void here_now(String channel, Callback cb) {
+ _here_now(channel, cb);
+ }
+
+ public final void history(String channel, int limit, Callback cb) {
+ _history(channel, limit, cb);
+ }
+
+ public final void detailedHistory(String channel, long start, long end, int count, boolean reverse, Callback cb) {
+ _detailedHistory(channel, String.valueOf(start), String.valueOf(end), count, reverse, cb);
+ }
+
+ public final void detailedHistory(String channel, long start, boolean reverse, Callback cb) {
+ _detailedHistory(channel, String.valueOf(start), "-1", -1, reverse, cb);
+
+ }
+
+ public final void detailedHistory(String channel, int count, Callback cb) {
+ _detailedHistory(channel, "-1", "-1", count, false, cb);
+
+ }
+}
diff --git a/gwt/3.3/examples/PubnubExample/.gwt/.gwt-log b/gwt/3.3/examples/PubnubExample/.gwt/.gwt-log
new file mode 100644
index 000000000..0e3159d0f
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/.gwt/.gwt-log
@@ -0,0 +1,2570 @@
+Module location: file:/home/workpn/workspace/PublishExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
+Rebinding com.google.gwt.resources.client.CommonResources.Bundle
+ Adding '1' new generated units
+ Removing invalidated units
+Module location: file:/home/workpn/workspace/PublishExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
+Rebinding com.google.gwt.resources.client.CommonResources.Bundle
+ Adding '1' new generated units
+ Removing invalidated units
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Validating newly compiled units
+ [ERROR] Errors in 'file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/client/PubnubExample.java'
+ [ERROR] Line 294: Duplicate local variable lbl
+ [ERROR] Line 298: CheckBox cannot be resolved to a type
+ [ERROR] Line 302: Syntax error, insert ";" to complete LocalVariableDeclarationStatement
+ [ERROR] Line 302: btn cannot be resolved
+ [ERROR] Line 303: btn cannot be resolved
+ [ERROR] Line 304: btn cannot be resolved
+ [ERROR] Line 315: btn cannot be resolved
+Removing invalidated units
+Finding entry point classes
+ [ERROR] Unable to find type 'com.pubnub.gwt.examples.client.PubnubExample'
+ [ERROR] Hint: Previous compiler errors may have made this type unavailable
+ [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Validating newly compiled units
+ [ERROR] Errors in 'file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/client/PubnubExample.java'
+ [ERROR] Line 294: Duplicate local variable lbl
+ [ERROR] Line 298: CheckBox cannot be resolved to a type
+ [ERROR] Line 302: Syntax error, insert ";" to complete LocalVariableDeclarationStatement
+ [ERROR] Line 302: btn cannot be resolved
+ [ERROR] Line 303: btn cannot be resolved
+ [ERROR] Line 304: btn cannot be resolved
+ [ERROR] Line 315: btn cannot be resolved
+Removing invalidated units
+Finding entry point classes
+ [ERROR] Unable to find type 'com.pubnub.gwt.examples.client.PubnubExample'
+ [ERROR] Hint: Previous compiler errors may have made this type unavailable
+ [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
+Module location: file:/home/workpn/workspace/PubnubExample/src/com/pubnub/gwt/examples/PublishExample.gwt.xml
+Loading inherited module 'com.google.gwt.user.User'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/User.gwt.xml
+ Loading inherited module 'com.google.gwt.canvas.Canvas'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/Canvas.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.canvas.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/canvas/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/Core.gwt.xml
+ Loading inherited module 'com.google.gwt.dev.jjs.intrinsic.Intrinsic'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/dev/jjs/intrinsic/Intrinsic.gwt.xml
+ Loading inherited module 'com.google.gwt.lang.LongLib'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-dev.jar!/com/google/gwt/lang/LongLib.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/Emulation.gwt.xml
+ Loading inherited module 'com.google.gwt.logging.LogImpl'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/logging/LogImpl.gwt.xml
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/xhr/XMLHttpRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CompilerParameters'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CompilerParameters.gwt.xml
+ Loading inherited module 'com.google.gwt.core.EmulateJsStack'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/EmulateJsStack.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.AsyncFragmentLoader'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/AsyncFragmentLoader.gwt.xml
+ Loading inherited module 'com.google.gwt.core.XSLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/XSLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.core.CrossSiteIframeLinker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CrossSiteIframeLinker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/UserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.EmulationWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/emul/EmulationWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.emul.Emulation'
+ Module 'com.google.gwt.emul.Emulation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.CoreWithUserAgent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/core/CoreWithUserAgent.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/text/Text.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/EventBase.gwt.xml
+ Loading inherited module 'com.google.web.bindery.event.Event'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/web/bindery/event/Event.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.DomEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/DomEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.dom.TouchEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/dom/TouchEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.event.logical.LogicalEvent'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/event/logical/LogicalEvent.gwt.xml
+ Loading inherited module 'com.google.gwt.event.EventBase'
+ Module 'com.google.gwt.event.EventBase' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/animation/Animation.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/editor/Editor.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'javax.validation.Validation'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/javax/validation/Validation.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/resources/Resources.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/http/HTTP.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.jsonp.Jsonp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/jsonp/Jsonp.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.layout.Layout'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/layout/Layout.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.animation.Animation'
+ Module 'com.google.gwt.animation.Animation' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.Media'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/Media.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.media.dom.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/media/dom/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.touch.Touch'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/touch/Touch.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.uibinder.UiBinder'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/uibinder/UiBinder.gwt.xml
+ Loading inherited module 'com.google.gwt.resources.Resources'
+ Module 'com.google.gwt.resources.Resources' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.AsyncProxy'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/AsyncProxy.gwt.xml
+ Loading inherited module 'com.google.gwt.user.RemoteService'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RemoteService.gwt.xml
+ Loading inherited module 'com.google.gwt.http.HTTP'
+ Module 'com.google.gwt.http.HTTP' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DocumentRoot'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DocumentRoot.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.DOM'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/DOM.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Window.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.HTTPRequest'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/HTTPRequest.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.xhr.XMLHttpRequest'
+ Module 'com.google.gwt.xhr.XMLHttpRequest' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.History'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/History.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.i18n.I18N'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/i18n/I18N.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safehtml/SafeHtml.gwt.xml
+ Loading inherited module 'com.google.gwt.regexp.RegExp'
+ Module 'com.google.gwt.regexp.RegExp' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Popup'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Popup.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Form'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Form.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.TextBox'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/TextBox.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Focus'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Focus.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ImageBundle'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ImageBundle.gwt.xml
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ClippedImage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ClippedImage'
+ Module 'com.google.gwt.user.ClippedImage' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.RichText'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/RichText.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.SplitPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/SplitPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.CaptionPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/CaptionPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Window'
+ Module 'com.google.gwt.user.Window' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Tree'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Tree.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.Hyperlink'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/Hyperlink.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.FileUpload'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/FileUpload.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ResizeLayoutPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ResizeLayoutPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.ScrollPanel'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/ScrollPanel.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.datepicker.DatePicker'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/datepicker/DatePicker.gwt.xml
+ Loading inherited module 'com.google.gwt.user.cellview.CellView'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/cellview/CellView.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.cell.Cell'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/cell/Cell.gwt.xml
+ Loading inherited module 'com.google.gwt.dom.DOM'
+ Module 'com.google.gwt.dom.DOM' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.text.Text'
+ Module 'com.google.gwt.text.Text' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.editor.Editor'
+ Module 'com.google.gwt.editor.Editor' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.view.View'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/view/View.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.safecss.SafeCss'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/safecss/SafeCss.gwt.xml
+ Loading inherited module 'com.google.gwt.safehtml.SafeHtml'
+ Module 'com.google.gwt.safehtml.SafeHtml' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.storage.Storage'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/storage/Storage.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.user.UserAgent'
+ Module 'com.google.gwt.user.UserAgent' has already been loaded and will be skipped
+Loading inherited module 'com.google.gwt.user.theme.clean.Clean'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/user/theme/clean/Clean.gwt.xml
+Loading inherited module 'com.pubnub.gwt.api.Pubnub'
+ Module location: jar:file:/home/workpn/Desktop/PubnubGwt.jar!/com/pubnub/gwt/api/Pubnub.gwt.xml
+ Loading inherited module 'com.google.gwt.user.User'
+ Module 'com.google.gwt.user.User' has already been loaded and will be skipped
+ Loading inherited module 'com.google.gwt.json.JSON'
+ Module location: jar:file:/usr/local/eclipse3.6_helios/plugins/com.google.gwt.eclipse.sdkbundle_2.3.0.r36v201105191508/gwt-2.3.0/gwt-user.jar!/com/google/gwt/json/JSON.gwt.xml
+ Loading inherited module 'com.google.gwt.core.Core'
+ Module 'com.google.gwt.core.Core' has already been loaded and will be skipped
+Public resources found in...
+Translatable source found in...
+Removing invalidated units
+Finding entry point classes
+Rebinding com.google.gwt.i18n.client.impl.LocaleInfoImpl
+ Invoking generator com.google.gwt.i18n.rebind.LocaleInfoGenerator
+ Processing interface com.google.gwt.i18n.client.constants.NumberConstantsImpl
+ Generating method body for percentPattern()
+ Generating method body for zeroDigit()
+ Generating method body for scientificPattern()
+ Generating method body for decimalSeparator()
+ Generating method body for notANumber()
+ Generating method body for minusSign()
+ Generating method body for infinity()
+ Generating method body for exponentialSymbol()
+ Generating method body for plusSign()
+ Generating method body for currencyPattern()
+ Generating method body for monetaryGroupingSeparator()
+ Generating method body for groupingSeparator()
+ Generating method body for perMill()
+ Generating method body for monetarySeparator()
+ Generating method body for decimalPattern()
+ Generating method body for percent()
+ Generating method body for defCurrencyCode()
+ Adding '3' new generated units
+ Removing invalidated units
diff --git a/gwt/3.3/examples/PubnubExample/build.xml b/gwt/3.3/examples/PubnubExample/build.xml
new file mode 100644
index 000000000..70452ccb2
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/build.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gwt/3.3/examples/PubnubExample/pubnubexample.war b/gwt/3.3/examples/PubnubExample/pubnubexample.war
new file mode 100644
index 000000000..5648d4f6f
Binary files /dev/null and b/gwt/3.3/examples/PubnubExample/pubnubexample.war differ
diff --git a/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/PubnubExample.gwt.xml b/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/PubnubExample.gwt.xml
new file mode 100644
index 000000000..dce555208
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/PubnubExample.gwt.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/client/PubnubExample.java b/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/client/PubnubExample.java
new file mode 100644
index 000000000..d10bfc29b
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/src/com/pubnub/gwt/examples/client/PubnubExample.java
@@ -0,0 +1,408 @@
+package com.pubnub.gwt.examples.client;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.json.client.*;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.KeyUpHandler;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.pubnub.gwt.api.client.Callback;
+import com.pubnub.gwt.api.client.Pubnub;
+import com.google.gwt.user.client.ui.TabLayoutPanel;
+import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.user.client.ui.TextArea;
+import com.google.gwt.user.client.ui.TabPanel;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+
+class ExamplePanel extends VerticalPanel {
+ private HTML html = null;
+ private int noOfLines = 0;
+ private LinkedList responses = new LinkedList();
+
+ class ExampleCb extends Callback {
+
+ private native String toStr(Object message) /*-{
+ return JSON.stringify(message);
+ }-*/;
+ @Override
+ public void callback(String channel, Object message) {
+ html.setHTML("");
+ responses.offer(toStr(message));
+ if (noOfLines <= 4)
+ noOfLines++;
+ else
+ responses.poll();
+
+ for (String response : responses) {
+ html.setHTML(response + "
" + html.getHTML());
+ }
+ }
+
+ }
+
+ public ExamplePanel(HTML html) {
+ super();
+ this.html = html;
+ this.add(html);
+ this.setSize("6cm", "5cm");
+ html.setHeight("400px");
+ html.setWidth("750px");
+
+ }
+ public void clearHTML() {
+ html.setHTML("");
+ responses.clear();
+ noOfLines = 0;
+ }
+
+}
+
+/**
+ * Entry point classes define onModuleLoad().
+ */
+public class PubnubExample implements EntryPoint {
+ /**
+ * The message displayed to the user when the server cannot be reached or
+ * returns an error.
+ */
+ private static final String SERVER_ERROR = "An error occurred while "
+ + "attempting to contact the server. Please check your network "
+ + "connection and try again.";
+
+
+ public static native final void alert(Object message) /*-{
+ alert(message);
+ }-*/;
+
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad() {
+ final Pubnub pubnub;
+ pubnub = Pubnub.init();
+ final Label errorLabel = new Label();
+
+
+ // Add the nameField and sendButton to the RootPanel"
+ // Use RootPanel.get() to get the entire body element
+ RootPanel rootPanel = RootPanel.get("nameFieldContainer");
+ RootPanel.get("errorLabelContainer").add(errorLabel);
+
+ final TabPanel tabPanel = new TabPanel();
+ rootPanel.add(tabPanel, 10, 66);
+
+ final ExamplePanel panelHereNow = new ExamplePanel(new HTML("", true));
+ final ExamplePanel panelSubscribe = new ExamplePanel(new HTML("", true));
+ final ExamplePanel panelTimeUuid = new ExamplePanel(new HTML("", true));
+ final ExamplePanel panelDetailedHistory = new ExamplePanel(new HTML("", true));
+ final ExamplePanel panelHistory = new ExamplePanel(new HTML("", true));
+ final ExamplePanel panelPublish = new ExamplePanel(new HTML("", true));
+
+ tabPanel.add(panelPublish, "Publish", false);
+ tabPanel.add(panelHistory, "History", false);
+ tabPanel.add(panelDetailedHistory, "Detailed History", false);
+ tabPanel.add(panelSubscribe, "Subscribe & Presence", false);
+ tabPanel.add(panelHereNow, "Here Now", false);
+ tabPanel.add(panelTimeUuid, "Time & UUID", false);
+
+
+ HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
+ rootPanel.add(horizontalPanel_1, 20, 16);
+ horizontalPanel_1.setWidth("750px");
+ horizontalPanel_1.setSpacing(10);
+
+ Label lblNewLabel_1 = new Label("Channel");
+ horizontalPanel_1.add(lblNewLabel_1);
+ horizontalPanel_1.setCellVerticalAlignment(lblNewLabel_1, HasVerticalAlignment.ALIGN_MIDDLE);
+ horizontalPanel_1.setCellHorizontalAlignment(lblNewLabel_1, HasHorizontalAlignment.ALIGN_CENTER);
+
+ final TextBox txtChannel = new TextBox();
+ txtChannel.setText("gwt_test");
+ horizontalPanel_1.add(txtChannel);
+ txtChannel.setWidth("175px");
+
+ class ClearHandler implements ClickHandler {
+ public void onClick(ClickEvent event) {
+ for (int i = 0; i < tabPanel.getWidgetCount(); i++) {
+ ExamplePanel ep = (ExamplePanel)tabPanel.getWidget(i);
+ if (ep.isVisible()) {
+ ep.clearHTML();
+ }
+ }
+ }
+ }
+
+ Button btnClearConsole = new Button("Clear Console");
+ horizontalPanel_1.add(btnClearConsole);
+ btnClearConsole.addClickHandler(new ClearHandler());
+
+
+
+ setupPublishPanel(pubnub, panelPublish, txtChannel);
+ setupSubscribePanel(pubnub, panelSubscribe, txtChannel);
+ setupHistoryPanel(pubnub, panelHistory, txtChannel);
+ setupDetailedHistoryPanel(pubnub, panelDetailedHistory, txtChannel);
+ setupHereNowPanel(pubnub, panelHereNow, txtChannel);
+ setupTimeUuidPanel(pubnub, panelTimeUuid, txtChannel);
+
+ tabPanel.selectTab(0);
+
+ }
+ private void setupTimeUuidPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+
+ Button btn = new Button("Get Time & UUID");
+ horizontalPanel.add(btn);
+ btn.setWidth("125px");
+
+ class Handler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ pubnub.time(cb);
+ pubnub.uuid(cb);
+ }
+ }
+ btn.addClickHandler(new Handler());
+
+ }
+
+ private void setupHereNowPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+
+ Button btn = new Button("Get Here Now Data");
+ horizontalPanel.add(btn);
+ btn.setWidth("175px");
+
+ class Handler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ pubnub.here_now(channel, cb);
+ }
+ }
+ btn.addClickHandler(new Handler());
+
+ }
+
+
+ private void setupDetailedHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+ Label lbl = new Label();
+ lbl.setText("Count");
+ horizontalPanel.add(lbl);
+ horizontalPanel.setCellVerticalAlignment(lbl, HasVerticalAlignment.ALIGN_MIDDLE);
+
+ final TextBox txtcount = new TextBox();
+ horizontalPanel.add(txtcount);
+ txtcount.setWidth("20px");
+ txtcount.setText("10");
+
+ Label lblstart = new Label();
+ lblstart.setText("Start Time");
+ horizontalPanel.add(lblstart);
+ horizontalPanel.setCellVerticalAlignment(lblstart, HasVerticalAlignment.ALIGN_MIDDLE);
+
+ final TextBox txtstart = new TextBox();
+ horizontalPanel.add(txtstart);
+ txtstart.setWidth("100px");
+ txtstart.setText("");
+
+ Label lblend = new Label();
+ lblend.setText("End Time");
+ horizontalPanel.add(lblend);
+ horizontalPanel.setCellVerticalAlignment(lblend, HasVerticalAlignment.ALIGN_MIDDLE);
+
+ final TextBox txtend = new TextBox();
+ horizontalPanel.add(txtend);
+ txtend.setWidth("100px");
+ txtend.setText("");
+
+ final CheckBox checkbox = new CheckBox();
+ checkbox.setText("Reverse ?");
+ horizontalPanel.add(checkbox);
+
+ Button btn = new Button("Detailed History");
+ horizontalPanel.add(btn);
+ btn.setWidth("125px");
+
+ class Handler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ Integer count = 10;
+ Integer start = -1;
+ Integer end = -1;
+ String startstr = txtstart.getText();
+ String endstr = txtend.getText();
+
+ try {
+ count = Integer.parseInt(txtcount.getText());
+ } catch (NumberFormatException e) {
+ PubnubExample.alert("Count should be integer");
+ return;
+ }
+
+ if (startstr.length() != 0) {
+ try {
+ start = Integer.parseInt(startstr);
+ } catch (NumberFormatException e) {
+ PubnubExample.alert("Start time should be long");
+ return;
+ }
+ }
+ if (endstr.length() != 0) {
+ try {
+ end = Integer.parseInt(endstr);
+ } catch (NumberFormatException e) {
+ PubnubExample.alert("Start time should be long");
+ return;
+ }
+ }
+ boolean reverse = checkbox.getValue();
+
+ pubnub.detailedHistory(channel, start, end, count, reverse, cb);
+ }
+ }
+ btn.addClickHandler(new Handler());
+ }
+
+ private void setupHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+ Label lbl = new Label();
+ lbl.setText("Limit");
+ horizontalPanel.add(lbl);
+ horizontalPanel.setCellVerticalAlignment(lbl, HasVerticalAlignment.ALIGN_MIDDLE);
+
+ final TextBox txt = new TextBox();
+ horizontalPanel.add(txt);
+ txt.setWidth("20px");
+ txt.setText("1");
+
+
+ Button btn = new Button("Get History");
+ horizontalPanel.add(btn);
+ btn.setWidth("125px");
+
+ class Handler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ String count = txt.getText();
+ pubnub.history(channel,Integer.parseInt(count), cb);
+ }
+ }
+ btn.addClickHandler(new Handler());
+ }
+
+ private void setupPublishPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+ Label lbl = new Label();
+ lbl.setText("Message");
+ horizontalPanel.add(lbl);
+
+ final TextBox txt = new TextBox();
+ horizontalPanel.add(txt);
+ txt.setWidth("300px");
+
+ Button btn = new Button("Publish");
+ horizontalPanel.add(btn);
+ btn.setWidth("85px");
+
+ class PublishHandler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ String msg = txt.getText();
+ pubnub.publish(channel, msg, cb);
+ }
+ }
+ btn.addClickHandler(new PublishHandler());
+ }
+
+ private void setupSubscribePanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
+ HorizontalPanel horizontalPanel = new HorizontalPanel();
+ horizontalPanel.setSpacing(10);
+ panel.add(horizontalPanel);
+
+
+ final Button btn = new Button("Subscribe");
+ horizontalPanel.add(btn);
+ btn.setWidth("85px");
+
+ final Button btnUnsub = new Button("Unsubscribe");
+ horizontalPanel.add(btnUnsub);
+ btnUnsub.setWidth("85px");
+
+ final Label lbl = new Label();
+ lbl.setText("Not Connected");
+ lbl.setWidth("100px");
+ horizontalPanel.add(lbl);
+
+ class SubscribeHandler implements ClickHandler {
+ ExamplePanel.ExampleCb cb = panel. new ExampleCb();
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ pubnub.subscribe(channel, cb);
+ pubnub.presence(channel, cb);
+ btn.setEnabled(false);
+ btnUnsub.setEnabled(true);
+ lbl.setText("Connected");
+ }
+ }
+ class UnsubscribeHandler implements ClickHandler {
+
+ public void onClick(ClickEvent event) {
+ String channel = txtChannel.getText();
+ pubnub.unsubscribe(channel);
+ btn.setEnabled(true);
+ btnUnsub.setEnabled(false);
+ lbl.setText("Not Connected");
+ }
+ }
+ btn.addClickHandler(new SubscribeHandler());
+ btnUnsub.addClickHandler(new UnsubscribeHandler());
+
+ }
+}
diff --git a/gwt/3.3/examples/PubnubExample/war/PubnubExample.css b/gwt/3.3/examples/PubnubExample/war/PubnubExample.css
new file mode 100644
index 000000000..7aca7ac7b
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/war/PubnubExample.css
@@ -0,0 +1,34 @@
+/** Add css rules here for your application. */
+
+
+/** Example rules used by the template application (remove for your app) */
+h1 {
+ font-size: 2em;
+ font-weight: bold;
+ color: #777777;
+ margin: 40px 0px 70px;
+ text-align: center;
+}
+
+.sendButton {
+ display: block;
+ font-size: 16pt;
+}
+
+/** Most GWT widgets already have a style name defined */
+.gwt-DialogBox {
+ width: 400px;
+}
+
+.dialogVPanel {
+ margin: 5px;
+}
+
+.serverResponseLabelError {
+ color: red;
+}
+
+/** Set ids using widget.getElement().setId("idOfElement") */
+#closeButton {
+ margin: 15px 6px 6px;
+}
diff --git a/gwt/3.3/examples/PubnubExample/war/PubnubExample.html b/gwt/3.3/examples/PubnubExample/war/PubnubExample.html
new file mode 100644
index 000000000..dccfceb69
--- /dev/null
+++ b/gwt/3.3/examples/PubnubExample/war/PubnubExample.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pubnub Example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Google Web Toolkit software and sample code developed by Google
+is licensed under the Apache License, v. 2.0. Other software included
+in this distribution is provided under other licenses, as listed in the
+Included Software and Licenses section at the bottom of this page.
+Source code for software included in this distribution is available
+from the
+Google Web Toolkit
+project or as otherwise indicated at the bottom of this page.
+
+
+
Please note that the executable version of the Google Web Toolkit
+distributed by Google will communicate with Google's servers to check
+for available updates. If updates are available, you will receive the
+option to install them.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+
2. Grant of Copyright License.
+Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+
3. Grant of Patent License.
+Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+
+
4. Redistribution.
+You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+
You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+
+
You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+
+
You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+
+
If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+
5. Submission of Contributions.
+Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+
6. Trademarks.
+This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+
7. Disclaimer of Warranty.
+Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+
8. Limitation of Liability.
+In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+
9. Accepting Warranty or Additional Liability.
+While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+
+
+
License Information regarding Bundled Third-Party Software
+
+
The following third party software is distributed with Google Web
+Toolkit and is provided under other licenses and/or has source available
+from other locations. Where "gwt-dev.jar" is listed, substitute in the
+name of the jar corresponding to your platform, e.g. "gwt-dev-linux.jar".
+
+
+
+
+
Package
+
License
+
Source Code Availability
+
+
+
Apache Tomcat
+
Apache License v. 2.0 (above)
+
tomcat.apache.org; modifications are at org/apache/tomcat/ within gwt-dev.jar
+ code.google.com/p/protobuf;
+ binary modifications consist of package-rebasing. The rebased classes are rooted at com/google/gwt/dev/protobuf/ within gwt-dev.jar
+
+
+
+
+
+
+
diff --git a/gwt/3.3/lib/gwt-2.3.0/about.html b/gwt/3.3/lib/gwt-2.3.0/about.html
new file mode 100644
index 000000000..5e94bb6d7
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/about.html
@@ -0,0 +1,106 @@
+
+
+
+ Google Web Toolkit 2.3.0
+
+
+
+
+
+ For source availability and license information see COPYING.html.
+
+
+
+
+
+
diff --git a/gwt/3.3/lib/gwt-2.3.0/about.txt b/gwt/3.3/lib/gwt-2.3.0/about.txt
new file mode 100644
index 000000000..ea03ac6d3
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/about.txt
@@ -0,0 +1,25 @@
+Google Web Toolkit 2.3.0
+(svn revision tags/2.3.0-rc1@10074)
+Copyright (c) Google, Inc. 2009. All rights reserved.
+Visit Google Code (http://code.google.com/webtoolkit/).
+
+This product includes software developed by:
+ - The Apache Software Foundation (http://www.apache.org/).
+ - Tomcat (http://tomcat.apache.org/) with modifications
+ - Tapestry (http://tapestry.apache.org/)
+ - The Eclipse Foundation (http://www.eclipse.org/).
+ - Java Development Tools (http://www.eclipse.org/jdt/)
+ - Standard Widget Toolkit (http://www.eclipse.org/swt/) with modifications
+ - The JFreeChart project (http://www.jfree.org/jfreechart/)
+ - Mort Bay Consulting (http://www.mortbay.com/)
+ - Jetty 6.1.11 (http://mortbay.org/jetty/)
+ - The Mozilla Foundation (http://www.mozilla.org/).
+ - Mozilla 1.7.12 (http://www.mozilla.org/releases/mozilla1.7.12/)
+ - Rhino (http://www.mozilla.org/rhino/) with modifications
+ - ObjectWeb (http://www.objectweb.org/)
+ - ASM (http://asm.objectweb.org/) with modifications
+ - The OpenQA Project (http://openqa.org/)
+ - Selenium-RC (http://selenium-rc.openqa.org/)
+ - The Protobuf Project (http://code.google.com/p/protobuf/) with modifications
+
+For source availability and license information see COPYING.
diff --git a/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer b/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer
new file mode 100644
index 000000000..8672c6fc8
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer
@@ -0,0 +1,3 @@
+#!/bin/sh
+APPDIR=`dirname $0`;
+java -Dcom.google.gwt.junit.reportPath="$1" -cp "$APPDIR/gwt-dev.jar" com.google.gwt.dev.RunWebApp -port auto $APPDIR/gwt-benchmark-viewer.war;
diff --git a/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer.cmd b/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer.cmd
new file mode 100644
index 000000000..beef709f3
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/benchmarkViewer.cmd
@@ -0,0 +1 @@
+@java -Dcom.google.gwt.junit.reportPath="%1" -cp "%~dp0/gwt-dev.jar" com.google.gwt.dev.RunWebApp -port auto %~dp0/gwt-benchmark-viewer.war
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-api-checker.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-api-checker.jar
new file mode 100644
index 000000000..cde278365
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-api-checker.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-benchmark-viewer.war b/gwt/3.3/lib/gwt-2.3.0/gwt-benchmark-viewer.war
new file mode 100644
index 000000000..b5129f85e
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-benchmark-viewer.war differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-dev.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-dev.jar
new file mode 100644
index 000000000..f23fad2f5
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-dev.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-ll.dll b/gwt/3.3/lib/gwt-2.3.0/gwt-ll.dll
new file mode 100644
index 000000000..49a0a1fc4
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-ll.dll differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-module.dtd b/gwt/3.3/lib/gwt-2.3.0/gwt-module.dtd
new file mode 100644
index 000000000..10c66145f
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/gwt-module.dtd
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-servlet-deps.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-servlet-deps.jar
new file mode 100644
index 000000000..2bb885fa8
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-servlet-deps.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-servlet.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-servlet.jar
new file mode 100644
index 000000000..c3b158c92
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-servlet.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-soyc-vis.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-soyc-vis.jar
new file mode 100644
index 000000000..47440681d
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-soyc-vis.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/gwt-user.jar b/gwt/3.3/lib/gwt-2.3.0/gwt-user.jar
new file mode 100644
index 000000000..94ee03a8a
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/gwt-user.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/i18nCreator b/gwt/3.3/lib/gwt-2.3.0/i18nCreator
new file mode 100644
index 000000000..f4d4a334b
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/i18nCreator
@@ -0,0 +1,3 @@
+#!/bin/sh
+HOMEDIR=`dirname $0`;
+java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar com.google.gwt.i18n.tools.I18NCreator "$@";
diff --git a/gwt/3.3/lib/gwt-2.3.0/i18nCreator.cmd b/gwt/3.3/lib/gwt-2.3.0/i18nCreator.cmd
new file mode 100644
index 000000000..39128dfc9
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/i18nCreator.cmd
@@ -0,0 +1 @@
+@java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev.jar" com.google.gwt.i18n.tools.I18NCreator %*
diff --git a/gwt/3.3/lib/gwt-2.3.0/release_notes.html b/gwt/3.3/lib/gwt-2.3.0/release_notes.html
new file mode 100644
index 000000000..801a1b6f7
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/release_notes.html
@@ -0,0 +1,29 @@
+
+
+
+ Google Web Toolkit Release Notes
+
+
+
+
+
Google Web Toolkit Release Notes
+
+ Release notes for the
+ Latest Version
+ and Older Versions
+ can be found on the GWT project hosting website.
+
+
+
diff --git a/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA-sources.jar b/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA-sources.jar
new file mode 100644
index 000000000..43611a2a5
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA-sources.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA.jar b/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA.jar
new file mode 100644
index 000000000..1ff2dd718
Binary files /dev/null and b/gwt/3.3/lib/gwt-2.3.0/validation-api-1.0.0.GA.jar differ
diff --git a/gwt/3.3/lib/gwt-2.3.0/webAppCreator b/gwt/3.3/lib/gwt-2.3.0/webAppCreator
new file mode 100644
index 000000000..782ab693f
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/webAppCreator
@@ -0,0 +1,3 @@
+#!/bin/sh
+HOMEDIR=`dirname $0`;
+java -cp $HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar com.google.gwt.user.tools.WebAppCreator "$@";
diff --git a/gwt/3.3/lib/gwt-2.3.0/webAppCreator.cmd b/gwt/3.3/lib/gwt-2.3.0/webAppCreator.cmd
new file mode 100644
index 000000000..ccf83930b
--- /dev/null
+++ b/gwt/3.3/lib/gwt-2.3.0/webAppCreator.cmd
@@ -0,0 +1 @@
+@java -cp "%~dp0\gwt-user.jar;%~dp0\gwt-dev.jar" com.google.gwt.user.tools.WebAppCreator %*
diff --git a/gwt/3.3/lib/slf4j-nop-1.6.2.jar b/gwt/3.3/lib/slf4j-nop-1.6.2.jar
new file mode 100644
index 000000000..4805e76fa
Binary files /dev/null and b/gwt/3.3/lib/slf4j-nop-1.6.2.jar differ
diff --git a/gwt/3.3/pom.xml b/gwt/3.3/pom.xml
new file mode 100644
index 000000000..063fcd71e
--- /dev/null
+++ b/gwt/3.3/pom.xml
@@ -0,0 +1,40 @@
+
+ 4.0.0
+ pubnub
+ pubnub
+ jar
+ 3.1
+ pubnub
+ https://github.com/pubnub/pubnub-api/
+
+ ${basedir}/src/
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+ 1.5
+ 1.5
+
+
+
+
+
+
+ org.json
+ json
+ 20090211
+
+
+ com.ning
+ async-http-client
+ 1.6.5
+ shaded
+
+
+
+ UTF-8
+
+
diff --git a/gwt/3.3/src/org/json/.gitignore b/gwt/3.3/src/org/json/.gitignore
new file mode 100644
index 000000000..5241a7220
--- /dev/null
+++ b/gwt/3.3/src/org/json/.gitignore
@@ -0,0 +1 @@
+*.class
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/CDL.java b/gwt/3.3/src/org/json/CDL.java
new file mode 100644
index 000000000..389270f0e
--- /dev/null
+++ b/gwt/3.3/src/org/json/CDL.java
@@ -0,0 +1,279 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * This provides static methods to convert comma delimited text into a
+ * JSONArray, and to covert a JSONArray into comma delimited text. Comma
+ * delimited text is a very popular format for data interchange. It is
+ * understood by most database, spreadsheet, and organizer programs.
+ *
+ * Each row of text represents a row in a table or a data record. Each row
+ * ends with a NEWLINE character. Each row contains one or more values.
+ * Values are separated by commas. A value can contain any character except
+ * for comma, unless is is wrapped in single quotes or double quotes.
+ *
+ * The first row usually contains the names of the columns.
+ *
+ * A comma delimited list can be converted into a JSONArray of JSONObjects.
+ * The names for the elements in the JSONObjects can be taken from the names
+ * in the first row.
+ * @author JSON.org
+ * @version 2009-09-11
+ */
+public class CDL {
+
+ /**
+ * Get the next value. The value can be wrapped in quotes. The value can
+ * be empty.
+ * @param x A JSONTokener of the source text.
+ * @return The value string, or null if empty.
+ * @throws JSONException if the quoted string is badly formed.
+ */
+ private static String getValue(JSONTokener x) throws JSONException {
+ char c;
+ char q;
+ StringBuffer sb;
+ do {
+ c = x.next();
+ } while (c == ' ' || c == '\t');
+ switch (c) {
+ case 0:
+ return null;
+ case '"':
+ case '\'':
+ q = c;
+ sb = new StringBuffer();
+ for (;;) {
+ c = x.next();
+ if (c == q) {
+ break;
+ }
+ if (c == 0 || c == '\n' || c == '\r') {
+ throw x.syntaxError("Missing close quote '" + q + "'.");
+ }
+ sb.append(c);
+ }
+ return sb.toString();
+ case ',':
+ x.back();
+ return "";
+ default:
+ x.back();
+ return x.nextTo(',');
+ }
+ }
+
+ /**
+ * Produce a JSONArray of strings from a row of comma delimited values.
+ * @param x A JSONTokener of the source text.
+ * @return A JSONArray of strings.
+ * @throws JSONException
+ */
+ public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
+ JSONArray ja = new JSONArray();
+ for (;;) {
+ String value = getValue(x);
+ char c = x.next();
+ if (value == null ||
+ (ja.length() == 0 && value.length() == 0 && c != ',')) {
+ return null;
+ }
+ ja.put(value);
+ for (;;) {
+ if (c == ',') {
+ break;
+ }
+ if (c != ' ') {
+ if (c == '\n' || c == '\r' || c == 0) {
+ return ja;
+ }
+ throw x.syntaxError("Bad character '" + c + "' (" +
+ (int)c + ").");
+ }
+ c = x.next();
+ }
+ }
+ }
+
+ /**
+ * Produce a JSONObject from a row of comma delimited text, using a
+ * parallel JSONArray of strings to provides the names of the elements.
+ * @param names A JSONArray of names. This is commonly obtained from the
+ * first row of a comma delimited text file using the rowToJSONArray
+ * method.
+ * @param x A JSONTokener of the source text.
+ * @return A JSONObject combining the names and values.
+ * @throws JSONException
+ */
+ public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x)
+ throws JSONException {
+ JSONArray ja = rowToJSONArray(x);
+ return ja != null ? ja.toJSONObject(names) : null;
+ }
+
+ /**
+ * Produce a JSONArray of JSONObjects from a comma delimited text string,
+ * using the first row as a source of names.
+ * @param string The comma delimited text.
+ * @return A JSONArray of JSONObjects.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(String string) throws JSONException {
+ return toJSONArray(new JSONTokener(string));
+ }
+
+ /**
+ * Produce a JSONArray of JSONObjects from a comma delimited text string,
+ * using the first row as a source of names.
+ * @param x The JSONTokener containing the comma delimited text.
+ * @return A JSONArray of JSONObjects.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(JSONTokener x) throws JSONException {
+ return toJSONArray(rowToJSONArray(x), x);
+ }
+
+ /**
+ * Produce a JSONArray of JSONObjects from a comma delimited text string
+ * using a supplied JSONArray as the source of element names.
+ * @param names A JSONArray of strings.
+ * @param string The comma delimited text.
+ * @return A JSONArray of JSONObjects.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(JSONArray names, String string)
+ throws JSONException {
+ return toJSONArray(names, new JSONTokener(string));
+ }
+
+ /**
+ * Produce a JSONArray of JSONObjects from a comma delimited text string
+ * using a supplied JSONArray as the source of element names.
+ * @param names A JSONArray of strings.
+ * @param x A JSONTokener of the source text.
+ * @return A JSONArray of JSONObjects.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(JSONArray names, JSONTokener x)
+ throws JSONException {
+ if (names == null || names.length() == 0) {
+ return null;
+ }
+ JSONArray ja = new JSONArray();
+ for (;;) {
+ JSONObject jo = rowToJSONObject(names, x);
+ if (jo == null) {
+ break;
+ }
+ ja.put(jo);
+ }
+ if (ja.length() == 0) {
+ return null;
+ }
+ return ja;
+ }
+
+
+ /**
+ * Produce a comma delimited text row from a JSONArray. Values containing
+ * the comma character will be quoted. Troublesome characters may be
+ * removed.
+ * @param ja A JSONArray of strings.
+ * @return A string ending in NEWLINE.
+ */
+ public static String rowToString(JSONArray ja) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < ja.length(); i += 1) {
+ if (i > 0) {
+ sb.append(',');
+ }
+ Object o = ja.opt(i);
+ if (o != null) {
+ String s = o.toString();
+ if (s.length() > 0 && (s.indexOf(',') >= 0 || s.indexOf('\n') >= 0 ||
+ s.indexOf('\r') >= 0 || s.indexOf(0) >= 0 ||
+ s.charAt(0) == '"')) {
+ sb.append('"');
+ int length = s.length();
+ for (int j = 0; j < length; j += 1) {
+ char c = s.charAt(j);
+ if (c >= ' ' && c != '"') {
+ sb.append(c);
+ }
+ }
+ sb.append('"');
+ } else {
+ sb.append(s);
+ }
+ }
+ }
+ sb.append('\n');
+ return sb.toString();
+ }
+
+ /**
+ * Produce a comma delimited text from a JSONArray of JSONObjects. The
+ * first row will be a list of names obtained by inspecting the first
+ * JSONObject.
+ * @param ja A JSONArray of JSONObjects.
+ * @return A comma delimited text.
+ * @throws JSONException
+ */
+ public static String toString(JSONArray ja) throws JSONException {
+ JSONObject jo = ja.optJSONObject(0);
+ if (jo != null) {
+ JSONArray names = jo.names();
+ if (names != null) {
+ return rowToString(names) + toString(names, ja);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Produce a comma delimited text from a JSONArray of JSONObjects using
+ * a provided list of names. The list of names is not included in the
+ * output.
+ * @param names A JSONArray of strings.
+ * @param ja A JSONArray of JSONObjects.
+ * @return A comma delimited text.
+ * @throws JSONException
+ */
+ public static String toString(JSONArray names, JSONArray ja)
+ throws JSONException {
+ if (names == null || names.length() == 0) {
+ return null;
+ }
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < ja.length(); i += 1) {
+ JSONObject jo = ja.optJSONObject(i);
+ if (jo != null) {
+ sb.append(rowToString(jo.toJSONArray(names)));
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/gwt/3.3/src/org/json/Cookie.java b/gwt/3.3/src/org/json/Cookie.java
new file mode 100644
index 000000000..52a1d1a03
--- /dev/null
+++ b/gwt/3.3/src/org/json/Cookie.java
@@ -0,0 +1,169 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * Convert a web browser cookie specification to a JSONObject and back.
+ * JSON and Cookies are both notations for name/value pairs.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class Cookie {
+
+ /**
+ * Produce a copy of a string in which the characters '+', '%', '=', ';'
+ * and control characters are replaced with "%hh". This is a gentle form
+ * of URL encoding, attempting to cause as little distortion to the
+ * string as possible. The characters '=' and ';' are meta characters in
+ * cookies. By convention, they are escaped using the URL-encoding. This is
+ * only a convention, not a standard. Often, cookies are expected to have
+ * encoded values. We encode '=' and ';' because we must. We encode '%' and
+ * '+' because they are meta characters in URL encoding.
+ * @param string The source string.
+ * @return The escaped result.
+ */
+ public static String escape(String string) {
+ char c;
+ String s = string.trim();
+ StringBuffer sb = new StringBuffer();
+ int len = s.length();
+ for (int i = 0; i < len; i += 1) {
+ c = s.charAt(i);
+ if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') {
+ sb.append('%');
+ sb.append(Character.forDigit((char)((c >>> 4) & 0x0f), 16));
+ sb.append(Character.forDigit((char)(c & 0x0f), 16));
+ } else {
+ sb.append(c);
+ }
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * Convert a cookie specification string into a JSONObject. The string
+ * will contain a name value pair separated by '='. The name and the value
+ * will be unescaped, possibly converting '+' and '%' sequences. The
+ * cookie properties may follow, separated by ';', also represented as
+ * name=value (except the secure property, which does not have a value).
+ * The name will be stored under the key "name", and the value will be
+ * stored under the key "value". This method does not do checking or
+ * validation of the parameters. It only converts the cookie string into
+ * a JSONObject.
+ * @param string The cookie specification string.
+ * @return A JSONObject containing "name", "value", and possibly other
+ * members.
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(String string) throws JSONException {
+ String n;
+ JSONObject o = new JSONObject();
+ Object v;
+ JSONTokener x = new JSONTokener(string);
+ o.put("name", x.nextTo('='));
+ x.next('=');
+ o.put("value", x.nextTo(';'));
+ x.next();
+ while (x.more()) {
+ n = unescape(x.nextTo("=;"));
+ if (x.next() != '=') {
+ if (n.equals("secure")) {
+ v = Boolean.TRUE;
+ } else {
+ throw x.syntaxError("Missing '=' in cookie parameter.");
+ }
+ } else {
+ v = unescape(x.nextTo(';'));
+ x.next();
+ }
+ o.put(n, v);
+ }
+ return o;
+ }
+
+
+ /**
+ * Convert a JSONObject into a cookie specification string. The JSONObject
+ * must contain "name" and "value" members.
+ * If the JSONObject contains "expires", "domain", "path", or "secure"
+ * members, they will be appended to the cookie specification string.
+ * All other members are ignored.
+ * @param o A JSONObject
+ * @return A cookie specification string
+ * @throws JSONException
+ */
+ public static String toString(JSONObject o) throws JSONException {
+ StringBuffer sb = new StringBuffer();
+
+ sb.append(escape(o.getString("name")));
+ sb.append("=");
+ sb.append(escape(o.getString("value")));
+ if (o.has("expires")) {
+ sb.append(";expires=");
+ sb.append(o.getString("expires"));
+ }
+ if (o.has("domain")) {
+ sb.append(";domain=");
+ sb.append(escape(o.getString("domain")));
+ }
+ if (o.has("path")) {
+ sb.append(";path=");
+ sb.append(escape(o.getString("path")));
+ }
+ if (o.optBoolean("secure")) {
+ sb.append(";secure");
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Convert %hh sequences to single characters, and
+ * convert plus to space.
+ * @param s A string that may contain
+ * + (plus) and
+ * %hh sequences.
+ * @return The unescaped string.
+ */
+ public static String unescape(String s) {
+ int len = s.length();
+ StringBuffer b = new StringBuffer();
+ for (int i = 0; i < len; ++i) {
+ char c = s.charAt(i);
+ if (c == '+') {
+ c = ' ';
+ } else if (c == '%' && i + 2 < len) {
+ int d = JSONTokener.dehexchar(s.charAt(i + 1));
+ int e = JSONTokener.dehexchar(s.charAt(i + 2));
+ if (d >= 0 && e >= 0) {
+ c = (char)(d * 16 + e);
+ i += 2;
+ }
+ }
+ b.append(c);
+ }
+ return b.toString();
+ }
+}
diff --git a/gwt/3.3/src/org/json/CookieList.java b/gwt/3.3/src/org/json/CookieList.java
new file mode 100644
index 000000000..3219ede6f
--- /dev/null
+++ b/gwt/3.3/src/org/json/CookieList.java
@@ -0,0 +1,90 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert a web browser cookie list string to a JSONObject and back.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class CookieList {
+
+ /**
+ * Convert a cookie list into a JSONObject. A cookie list is a sequence
+ * of name/value pairs. The names are separated from the values by '='.
+ * The pairs are separated by ';'. The names and the values
+ * will be unescaped, possibly converting '+' and '%' sequences.
+ *
+ * To add a cookie to a cooklist,
+ * cookielistJSONObject.put(cookieJSONObject.getString("name"),
+ * cookieJSONObject.getString("value"));
+ * @param string A cookie list string
+ * @return A JSONObject
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(String string) throws JSONException {
+ JSONObject o = new JSONObject();
+ JSONTokener x = new JSONTokener(string);
+ while (x.more()) {
+ String name = Cookie.unescape(x.nextTo('='));
+ x.next('=');
+ o.put(name, Cookie.unescape(x.nextTo(';')));
+ x.next();
+ }
+ return o;
+ }
+
+
+ /**
+ * Convert a JSONObject into a cookie list. A cookie list is a sequence
+ * of name/value pairs. The names are separated from the values by '='.
+ * The pairs are separated by ';'. The characters '%', '+', '=', and ';'
+ * in the names and values are replaced by "%hh".
+ * @param o A JSONObject
+ * @return A cookie list string
+ * @throws JSONException
+ */
+ public static String toString(JSONObject o) throws JSONException {
+ boolean b = false;
+ Iterator keys = o.keys();
+ String s;
+ StringBuffer sb = new StringBuffer();
+ while (keys.hasNext()) {
+ s = keys.next().toString();
+ if (!o.isNull(s)) {
+ if (b) {
+ sb.append(';');
+ }
+ sb.append(Cookie.escape(s));
+ sb.append("=");
+ sb.append(Cookie.escape(o.getString(s)));
+ b = true;
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/gwt/3.3/src/org/json/HTTP.java b/gwt/3.3/src/org/json/HTTP.java
new file mode 100644
index 000000000..e4f301cab
--- /dev/null
+++ b/gwt/3.3/src/org/json/HTTP.java
@@ -0,0 +1,163 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert an HTTP header to a JSONObject and back.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class HTTP {
+
+ /** Carriage return/line feed. */
+ public static final String CRLF = "\r\n";
+
+ /**
+ * Convert an HTTP header string into a JSONObject. It can be a request
+ * header or a response header. A request header will contain
+ *
+ * It does no further checking or conversion. It does not parse dates.
+ * It does not do '%' transforms on URLs.
+ * @param string An HTTP header string.
+ * @return A JSONObject containing the elements and attributes
+ * of the XML string.
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(String string) throws JSONException {
+ JSONObject o = new JSONObject();
+ HTTPTokener x = new HTTPTokener(string);
+ String t;
+
+ t = x.nextToken();
+ if (t.toUpperCase().startsWith("HTTP")) {
+
+// Response
+
+ o.put("HTTP-Version", t);
+ o.put("Status-Code", x.nextToken());
+ o.put("Reason-Phrase", x.nextTo('\0'));
+ x.next();
+
+ } else {
+
+// Request
+
+ o.put("Method", t);
+ o.put("Request-URI", x.nextToken());
+ o.put("HTTP-Version", x.nextToken());
+ }
+
+// Fields
+
+ while (x.more()) {
+ String name = x.nextTo(':');
+ x.next(':');
+ o.put(name, x.nextTo('\0'));
+ x.next();
+ }
+ return o;
+ }
+
+
+ /**
+ * Convert a JSONObject into an HTTP header. A request header must contain
+ *
+ * Any other members of the JSONObject will be output as HTTP fields.
+ * The result will end with two CRLF pairs.
+ * @param o A JSONObject
+ * @return An HTTP header string.
+ * @throws JSONException if the object does not contain enough
+ * information.
+ */
+ public static String toString(JSONObject o) throws JSONException {
+ Iterator keys = o.keys();
+ String s;
+ StringBuffer sb = new StringBuffer();
+ if (o.has("Status-Code") && o.has("Reason-Phrase")) {
+ sb.append(o.getString("HTTP-Version"));
+ sb.append(' ');
+ sb.append(o.getString("Status-Code"));
+ sb.append(' ');
+ sb.append(o.getString("Reason-Phrase"));
+ } else if (o.has("Method") && o.has("Request-URI")) {
+ sb.append(o.getString("Method"));
+ sb.append(' ');
+ sb.append('"');
+ sb.append(o.getString("Request-URI"));
+ sb.append('"');
+ sb.append(' ');
+ sb.append(o.getString("HTTP-Version"));
+ } else {
+ throw new JSONException("Not enough material for an HTTP header.");
+ }
+ sb.append(CRLF);
+ while (keys.hasNext()) {
+ s = keys.next().toString();
+ if (!s.equals("HTTP-Version") && !s.equals("Status-Code") &&
+ !s.equals("Reason-Phrase") && !s.equals("Method") &&
+ !s.equals("Request-URI") && !o.isNull(s)) {
+ sb.append(s);
+ sb.append(": ");
+ sb.append(o.getString(s));
+ sb.append(CRLF);
+ }
+ }
+ sb.append(CRLF);
+ return sb.toString();
+ }
+}
diff --git a/gwt/3.3/src/org/json/HTTPTokener.java b/gwt/3.3/src/org/json/HTTPTokener.java
new file mode 100644
index 000000000..397f7707e
--- /dev/null
+++ b/gwt/3.3/src/org/json/HTTPTokener.java
@@ -0,0 +1,77 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * The HTTPTokener extends the JSONTokener to provide additional methods
+ * for the parsing of HTTP headers.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class HTTPTokener extends JSONTokener {
+
+ /**
+ * Construct an HTTPTokener from a string.
+ * @param s A source string.
+ */
+ public HTTPTokener(String s) {
+ super(s);
+ }
+
+
+ /**
+ * Get the next token or string. This is used in parsing HTTP headers.
+ * @throws JSONException
+ * @return A String.
+ */
+ public String nextToken() throws JSONException {
+ char c;
+ char q;
+ StringBuffer sb = new StringBuffer();
+ do {
+ c = next();
+ } while (Character.isWhitespace(c));
+ if (c == '"' || c == '\'') {
+ q = c;
+ for (;;) {
+ c = next();
+ if (c < ' ') {
+ throw syntaxError("Unterminated string.");
+ }
+ if (c == q) {
+ return sb.toString();
+ }
+ sb.append(c);
+ }
+ }
+ for (;;) {
+ if (c == 0 || Character.isWhitespace(c)) {
+ return sb.toString();
+ }
+ sb.append(c);
+ c = next();
+ }
+ }
+}
diff --git a/gwt/3.3/src/org/json/JSONArray.java b/gwt/3.3/src/org/json/JSONArray.java
new file mode 100644
index 000000000..2b8d0c2ea
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONArray.java
@@ -0,0 +1,918 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * A JSONArray is an ordered sequence of values. Its external text form is a
+ * string wrapped in square brackets with commas separating the values. The
+ * internal form is an object having get and opt
+ * methods for accessing the values by index, and put methods for
+ * adding or replacing values. The values can be any of these types:
+ * Boolean, JSONArray, JSONObject,
+ * Number, String, or the
+ * JSONObject.NULL object.
+ *
+ * The constructor can convert a JSON text into a Java object. The
+ * toString method converts to JSON text.
+ *
+ * A get method returns a value if one can be found, and throws an
+ * exception if one cannot be found. An opt method returns a
+ * default value instead of throwing an exception, and so is useful for
+ * obtaining optional values.
+ *
+ * The generic get() and opt() methods return an
+ * object which you can cast or query for type. There are also typed
+ * get and opt methods that do type checking and type
+ * coercion for you.
+ *
+ * The texts produced by the toString methods strictly conform to
+ * JSON syntax rules. The constructors are more forgiving in the texts they will
+ * accept:
+ *
+ *
An extra , (comma) may appear just
+ * before the closing bracket.
+ *
The null value will be inserted when there
+ * is , (comma) elision.
+ *
Strings may be quoted with ' (single
+ * quote).
+ *
Strings do not need to be quoted at all if they do not begin with a quote
+ * or single quote, and if they do not contain leading or trailing spaces,
+ * and if they do not contain any of these characters:
+ * { } [ ] / \ : , = ; # and if they do not look like numbers
+ * and if they are not the reserved words true,
+ * false, or null.
+ *
Values can be separated by ; (semicolon) as
+ * well as by , (comma).
+ *
Numbers may have the
+ * 0x- (hex) prefix.
+ *
+
+ * @author JSON.org
+ * @version 2009-04-14
+ */
+public class JSONArray {
+
+
+ /**
+ * The arrayList where the JSONArray's properties are kept.
+ */
+ private ArrayList myArrayList;
+
+
+ /**
+ * Construct an empty JSONArray.
+ */
+ public JSONArray() {
+ this.myArrayList = new ArrayList();
+ }
+
+ /**
+ * Construct a JSONArray from a JSONTokener.
+ * @param x A JSONTokener
+ * @throws JSONException If there is a syntax error.
+ */
+ public JSONArray(JSONTokener x) throws JSONException {
+ this();
+ char c = x.nextClean();
+ char q;
+ if (c == '[') {
+ q = ']';
+ } else if (c == '(') {
+ q = ')';
+ } else {
+ throw x.syntaxError("A JSONArray text must start with '['");
+ }
+ if (x.nextClean() == ']') {
+ return;
+ }
+ x.back();
+ for (;;) {
+ if (x.nextClean() == ',') {
+ x.back();
+ this.myArrayList.add(null);
+ } else {
+ x.back();
+ this.myArrayList.add(x.nextValue());
+ }
+ c = x.nextClean();
+ switch (c) {
+ case ';':
+ case ',':
+ if (x.nextClean() == ']') {
+ return;
+ }
+ x.back();
+ break;
+ case ']':
+ case ')':
+ if (q != c) {
+ throw x.syntaxError("Expected a '" + new Character(q) + "'");
+ }
+ return;
+ default:
+ throw x.syntaxError("Expected a ',' or ']'");
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONArray from a source JSON text.
+ * @param source A string that begins with
+ * [ (left bracket)
+ * and ends with ] (right bracket).
+ * @throws JSONException If there is a syntax error.
+ */
+ public JSONArray(String source) throws JSONException {
+ this(new JSONTokener(source));
+ }
+
+
+ /**
+ * Construct a JSONArray from a Collection.
+ * @param collection A Collection.
+ */
+ public JSONArray(Collection collection) {
+ this.myArrayList = new ArrayList();
+ if (collection != null) {
+ Iterator iter = collection.iterator();
+ while (iter.hasNext()) {
+ Object o = iter.next();
+ this.myArrayList.add(JSONObject.wrap(o));
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONArray from an array
+ * @throws JSONException If not an array.
+ */
+ public JSONArray(Object array) throws JSONException {
+ this();
+ if (array.getClass().isArray()) {
+ int length = Array.getLength(array);
+ for (int i = 0; i < length; i += 1) {
+ this.put(JSONObject.wrap(Array.get(array, i)));
+ }
+ } else {
+ throw new JSONException(
+ "JSONArray initial value should be a string or collection or array.");
+ }
+ }
+
+
+ /**
+ * Get the object value associated with an index.
+ * @param index
+ * The index must be between 0 and length() - 1.
+ * @return An object value.
+ * @throws JSONException If there is no value for the index.
+ */
+ public Object get(int index) throws JSONException {
+ Object o = opt(index);
+ if (o == null) {
+ throw new JSONException("JSONArray[" + index + "] not found.");
+ }
+ return o;
+ }
+
+
+ /**
+ * Get the boolean value associated with an index.
+ * The string values "true" and "false" are converted to boolean.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The truth.
+ * @throws JSONException If there is no value for the index or if the
+ * value is not convertable to boolean.
+ */
+ public boolean getBoolean(int index) throws JSONException {
+ Object o = get(index);
+ if (o.equals(Boolean.FALSE) ||
+ (o instanceof String &&
+ ((String)o).equalsIgnoreCase("false"))) {
+ return false;
+ } else if (o.equals(Boolean.TRUE) ||
+ (o instanceof String &&
+ ((String)o).equalsIgnoreCase("true"))) {
+ return true;
+ }
+ throw new JSONException("JSONArray[" + index + "] is not a Boolean.");
+ }
+
+
+ /**
+ * Get the double value associated with an index.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ * @throws JSONException If the key is not found or if the value cannot
+ * be converted to a number.
+ */
+ public double getDouble(int index) throws JSONException {
+ Object o = get(index);
+ try {
+ return o instanceof Number ?
+ ((Number)o).doubleValue() :
+ Double.valueOf((String)o).doubleValue();
+ } catch (Exception e) {
+ throw new JSONException("JSONArray[" + index +
+ "] is not a number.");
+ }
+ }
+
+
+ /**
+ * Get the int value associated with an index.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ * @throws JSONException If the key is not found or if the value cannot
+ * be converted to a number.
+ * if the value cannot be converted to a number.
+ */
+ public int getInt(int index) throws JSONException {
+ Object o = get(index);
+ return o instanceof Number ?
+ ((Number)o).intValue() : (int)getDouble(index);
+ }
+
+
+ /**
+ * Get the JSONArray associated with an index.
+ * @param index The index must be between 0 and length() - 1.
+ * @return A JSONArray value.
+ * @throws JSONException If there is no value for the index. or if the
+ * value is not a JSONArray
+ */
+ public JSONArray getJSONArray(int index) throws JSONException {
+ Object o = get(index);
+ if (o instanceof JSONArray) {
+ return (JSONArray)o;
+ }
+ throw new JSONException("JSONArray[" + index +
+ "] is not a JSONArray.");
+ }
+
+
+ /**
+ * Get the JSONObject associated with an index.
+ * @param index subscript
+ * @return A JSONObject value.
+ * @throws JSONException If there is no value for the index or if the
+ * value is not a JSONObject
+ */
+ public JSONObject getJSONObject(int index) throws JSONException {
+ Object o = get(index);
+ if (o instanceof JSONObject) {
+ return (JSONObject)o;
+ }
+ throw new JSONException("JSONArray[" + index +
+ "] is not a JSONObject.");
+ }
+
+
+ /**
+ * Get the long value associated with an index.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ * @throws JSONException If the key is not found or if the value cannot
+ * be converted to a number.
+ */
+ public long getLong(int index) throws JSONException {
+ Object o = get(index);
+ return o instanceof Number ?
+ ((Number)o).longValue() : (long)getDouble(index);
+ }
+
+
+ /**
+ * Get the string associated with an index.
+ * @param index The index must be between 0 and length() - 1.
+ * @return A string value.
+ * @throws JSONException If there is no value for the index.
+ */
+ public String getString(int index) throws JSONException {
+ return get(index).toString();
+ }
+
+
+ /**
+ * Determine if the value is null.
+ * @param index The index must be between 0 and length() - 1.
+ * @return true if the value at the index is null, or if there is no value.
+ */
+ public boolean isNull(int index) {
+ return JSONObject.NULL.equals(opt(index));
+ }
+
+
+ /**
+ * Make a string from the contents of this JSONArray. The
+ * separator string is inserted between each element.
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param separator A string that will be inserted between the elements.
+ * @return a string.
+ * @throws JSONException If the array contains an invalid number.
+ */
+ public String join(String separator) throws JSONException {
+ int len = length();
+ StringBuffer sb = new StringBuffer();
+
+ for (int i = 0; i < len; i += 1) {
+ if (i > 0) {
+ sb.append(separator);
+ }
+ sb.append(JSONObject.valueToString(this.myArrayList.get(i)));
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * Get the number of elements in the JSONArray, included nulls.
+ *
+ * @return The length (or size).
+ */
+ public int length() {
+ return this.myArrayList.size();
+ }
+
+
+ /**
+ * Get the optional object value associated with an index.
+ * @param index The index must be between 0 and length() - 1.
+ * @return An object value, or null if there is no
+ * object at that index.
+ */
+ public Object opt(int index) {
+ return (index < 0 || index >= length()) ?
+ null : this.myArrayList.get(index);
+ }
+
+
+ /**
+ * Get the optional boolean value associated with an index.
+ * It returns false if there is no value at that index,
+ * or if the value is not Boolean.TRUE or the String "true".
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The truth.
+ */
+ public boolean optBoolean(int index) {
+ return optBoolean(index, false);
+ }
+
+
+ /**
+ * Get the optional boolean value associated with an index.
+ * It returns the defaultValue if there is no value at that index or if
+ * it is not a Boolean or the String "true" or "false" (case insensitive).
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @param defaultValue A boolean default.
+ * @return The truth.
+ */
+ public boolean optBoolean(int index, boolean defaultValue) {
+ try {
+ return getBoolean(index);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get the optional double value associated with an index.
+ * NaN is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ */
+ public double optDouble(int index) {
+ return optDouble(index, Double.NaN);
+ }
+
+
+ /**
+ * Get the optional double value associated with an index.
+ * The defaultValue is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ *
+ * @param index subscript
+ * @param defaultValue The default value.
+ * @return The value.
+ */
+ public double optDouble(int index, double defaultValue) {
+ try {
+ return getDouble(index);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get the optional int value associated with an index.
+ * Zero is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ */
+ public int optInt(int index) {
+ return optInt(index, 0);
+ }
+
+
+ /**
+ * Get the optional int value associated with an index.
+ * The defaultValue is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ * @param index The index must be between 0 and length() - 1.
+ * @param defaultValue The default value.
+ * @return The value.
+ */
+ public int optInt(int index, int defaultValue) {
+ try {
+ return getInt(index);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get the optional JSONArray associated with an index.
+ * @param index subscript
+ * @return A JSONArray value, or null if the index has no value,
+ * or if the value is not a JSONArray.
+ */
+ public JSONArray optJSONArray(int index) {
+ Object o = opt(index);
+ return o instanceof JSONArray ? (JSONArray)o : null;
+ }
+
+
+ /**
+ * Get the optional JSONObject associated with an index.
+ * Null is returned if the key is not found, or null if the index has
+ * no value, or if the value is not a JSONObject.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return A JSONObject value.
+ */
+ public JSONObject optJSONObject(int index) {
+ Object o = opt(index);
+ return o instanceof JSONObject ? (JSONObject)o : null;
+ }
+
+
+ /**
+ * Get the optional long value associated with an index.
+ * Zero is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return The value.
+ */
+ public long optLong(int index) {
+ return optLong(index, 0);
+ }
+
+
+ /**
+ * Get the optional long value associated with an index.
+ * The defaultValue is returned if there is no value for the index,
+ * or if the value is not a number and cannot be converted to a number.
+ * @param index The index must be between 0 and length() - 1.
+ * @param defaultValue The default value.
+ * @return The value.
+ */
+ public long optLong(int index, long defaultValue) {
+ try {
+ return getLong(index);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get the optional string value associated with an index. It returns an
+ * empty string if there is no value at that index. If the value
+ * is not a string and is not null, then it is coverted to a string.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @return A String value.
+ */
+ public String optString(int index) {
+ return optString(index, "");
+ }
+
+
+ /**
+ * Get the optional string associated with an index.
+ * The defaultValue is returned if the key is not found.
+ *
+ * @param index The index must be between 0 and length() - 1.
+ * @param defaultValue The default value.
+ * @return A String value.
+ */
+ public String optString(int index, String defaultValue) {
+ Object o = opt(index);
+ return o != null ? o.toString() : defaultValue;
+ }
+
+
+ /**
+ * Append a boolean value. This increases the array's length by one.
+ *
+ * @param value A boolean value.
+ * @return this.
+ */
+ public JSONArray put(boolean value) {
+ put(value ? Boolean.TRUE : Boolean.FALSE);
+ return this;
+ }
+
+
+ /**
+ * Put a value in the JSONArray, where the value will be a
+ * JSONArray which is produced from a Collection.
+ * @param value A Collection value.
+ * @return this.
+ */
+ public JSONArray put(Collection value) {
+ put(new JSONArray(value));
+ return this;
+ }
+
+
+ /**
+ * Append a double value. This increases the array's length by one.
+ *
+ * @param value A double value.
+ * @throws JSONException if the value is not finite.
+ * @return this.
+ */
+ public JSONArray put(double value) throws JSONException {
+ Double d = new Double(value);
+ JSONObject.testValidity(d);
+ put(d);
+ return this;
+ }
+
+
+ /**
+ * Append an int value. This increases the array's length by one.
+ *
+ * @param value An int value.
+ * @return this.
+ */
+ public JSONArray put(int value) {
+ put(new Integer(value));
+ return this;
+ }
+
+
+ /**
+ * Append an long value. This increases the array's length by one.
+ *
+ * @param value A long value.
+ * @return this.
+ */
+ public JSONArray put(long value) {
+ put(new Long(value));
+ return this;
+ }
+
+
+ /**
+ * Put a value in the JSONArray, where the value will be a
+ * JSONObject which is produced from a Map.
+ * @param value A Map value.
+ * @return this.
+ */
+ public JSONArray put(Map value) {
+ put(new JSONObject(value));
+ return this;
+ }
+
+
+ /**
+ * Append an object value. This increases the array's length by one.
+ * @param value An object value. The value should be a
+ * Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
+ * JSONObject.NULL object.
+ * @return this.
+ */
+ public JSONArray put(Object value) {
+ this.myArrayList.add(value);
+ return this;
+ }
+
+
+ /**
+ * Put or replace a boolean value in the JSONArray. If the index is greater
+ * than the length of the JSONArray, then null elements will be added as
+ * necessary to pad it out.
+ * @param index The subscript.
+ * @param value A boolean value.
+ * @return this.
+ * @throws JSONException If the index is negative.
+ */
+ public JSONArray put(int index, boolean value) throws JSONException {
+ put(index, value ? Boolean.TRUE : Boolean.FALSE);
+ return this;
+ }
+
+
+ /**
+ * Put a value in the JSONArray, where the value will be a
+ * JSONArray which is produced from a Collection.
+ * @param index The subscript.
+ * @param value A Collection value.
+ * @return this.
+ * @throws JSONException If the index is negative or if the value is
+ * not finite.
+ */
+ public JSONArray put(int index, Collection value) throws JSONException {
+ put(index, new JSONArray(value));
+ return this;
+ }
+
+
+ /**
+ * Put or replace a double value. If the index is greater than the length of
+ * the JSONArray, then null elements will be added as necessary to pad
+ * it out.
+ * @param index The subscript.
+ * @param value A double value.
+ * @return this.
+ * @throws JSONException If the index is negative or if the value is
+ * not finite.
+ */
+ public JSONArray put(int index, double value) throws JSONException {
+ put(index, new Double(value));
+ return this;
+ }
+
+
+ /**
+ * Put or replace an int value. If the index is greater than the length of
+ * the JSONArray, then null elements will be added as necessary to pad
+ * it out.
+ * @param index The subscript.
+ * @param value An int value.
+ * @return this.
+ * @throws JSONException If the index is negative.
+ */
+ public JSONArray put(int index, int value) throws JSONException {
+ put(index, new Integer(value));
+ return this;
+ }
+
+
+ /**
+ * Put or replace a long value. If the index is greater than the length of
+ * the JSONArray, then null elements will be added as necessary to pad
+ * it out.
+ * @param index The subscript.
+ * @param value A long value.
+ * @return this.
+ * @throws JSONException If the index is negative.
+ */
+ public JSONArray put(int index, long value) throws JSONException {
+ put(index, new Long(value));
+ return this;
+ }
+
+
+ /**
+ * Put a value in the JSONArray, where the value will be a
+ * JSONObject which is produced from a Map.
+ * @param index The subscript.
+ * @param value The Map value.
+ * @return this.
+ * @throws JSONException If the index is negative or if the the value is
+ * an invalid number.
+ */
+ public JSONArray put(int index, Map value) throws JSONException {
+ put(index, new JSONObject(value));
+ return this;
+ }
+
+
+ /**
+ * Put or replace an object value in the JSONArray. If the index is greater
+ * than the length of the JSONArray, then null elements will be added as
+ * necessary to pad it out.
+ * @param index The subscript.
+ * @param value The value to put into the array. The value should be a
+ * Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
+ * JSONObject.NULL object.
+ * @return this.
+ * @throws JSONException If the index is negative or if the the value is
+ * an invalid number.
+ */
+ public JSONArray put(int index, Object value) throws JSONException {
+ JSONObject.testValidity(value);
+ if (index < 0) {
+ throw new JSONException("JSONArray[" + index + "] not found.");
+ }
+ if (index < length()) {
+ this.myArrayList.set(index, value);
+ } else {
+ while (index != length()) {
+ put(JSONObject.NULL);
+ }
+ put(value);
+ }
+ return this;
+ }
+
+
+ /**
+ * Remove an index and close the hole.
+ * @param index The index of the element to be removed.
+ * @return The value that was associated with the index,
+ * or null if there was no value.
+ */
+ public Object remove(int index) {
+ Object o = opt(index);
+ this.myArrayList.remove(index);
+ return o;
+ }
+
+
+ /**
+ * Produce a JSONObject by combining a JSONArray of names with the values
+ * of this JSONArray.
+ * @param names A JSONArray containing a list of key strings. These will be
+ * paired with the values.
+ * @return A JSONObject, or null if there are no names or if this JSONArray
+ * has no values.
+ * @throws JSONException If any of the names are null.
+ */
+ public JSONObject toJSONObject(JSONArray names) throws JSONException {
+ if (names == null || names.length() == 0 || length() == 0) {
+ return null;
+ }
+ JSONObject jo = new JSONObject();
+ for (int i = 0; i < names.length(); i += 1) {
+ jo.put(names.getString(i), this.opt(i));
+ }
+ return jo;
+ }
+
+
+ /**
+ * Make a JSON text of this JSONArray. For compactness, no
+ * unnecessary whitespace is added. If it is not possible to produce a
+ * syntactically correct JSON text then null will be returned instead. This
+ * could occur if the array contains an invalid number.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ *
+ * @return a printable, displayable, transmittable
+ * representation of the array.
+ */
+ public String toString() {
+ try {
+ return '[' + join(",") + ']';
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+
+ /**
+ * Make a prettyprinted JSON text of this JSONArray.
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param indentFactor The number of spaces to add to each level of
+ * indentation.
+ * @return a printable, displayable, transmittable
+ * representation of the object, beginning
+ * with [ (left bracket) and ending
+ * with ] (right bracket).
+ * @throws JSONException
+ */
+ public String toString(int indentFactor) throws JSONException {
+ return toString(indentFactor, 0);
+ }
+
+
+ /**
+ * Make a prettyprinted JSON text of this JSONArray.
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param indentFactor The number of spaces to add to each level of
+ * indentation.
+ * @param indent The indention of the top level.
+ * @return a printable, displayable, transmittable
+ * representation of the array.
+ * @throws JSONException
+ */
+ String toString(int indentFactor, int indent) throws JSONException {
+ int len = length();
+ if (len == 0) {
+ return "[]";
+ }
+ int i;
+ StringBuffer sb = new StringBuffer("[");
+ if (len == 1) {
+ sb.append(JSONObject.valueToString(this.myArrayList.get(0),
+ indentFactor, indent));
+ } else {
+ int newindent = indent + indentFactor;
+ sb.append('\n');
+ for (i = 0; i < len; i += 1) {
+ if (i > 0) {
+ sb.append(",\n");
+ }
+ for (int j = 0; j < newindent; j += 1) {
+ sb.append(' ');
+ }
+ sb.append(JSONObject.valueToString(this.myArrayList.get(i),
+ indentFactor, newindent));
+ }
+ sb.append('\n');
+ for (i = 0; i < indent; i += 1) {
+ sb.append(' ');
+ }
+ }
+ sb.append(']');
+ return sb.toString();
+ }
+
+
+ /**
+ * Write the contents of the JSONArray as JSON text to a writer.
+ * For compactness, no whitespace is added.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ *
+ * @return The writer.
+ * @throws JSONException
+ */
+ public Writer write(Writer writer) throws JSONException {
+ try {
+ boolean b = false;
+ int len = length();
+
+ writer.write('[');
+
+ for (int i = 0; i < len; i += 1) {
+ if (b) {
+ writer.write(',');
+ }
+ Object v = this.myArrayList.get(i);
+ if (v instanceof JSONObject) {
+ ((JSONObject)v).write(writer);
+ } else if (v instanceof JSONArray) {
+ ((JSONArray)v).write(writer);
+ } else {
+ writer.write(JSONObject.valueToString(v));
+ }
+ b = true;
+ }
+ writer.write(']');
+ return writer;
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/JSONException.java b/gwt/3.3/src/org/json/JSONException.java
new file mode 100644
index 000000000..3cf8c8f69
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONException.java
@@ -0,0 +1,31 @@
+package org.json;
+
+/**
+ * The JSONException is thrown by the JSON.org classes when things are amiss.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class JSONException extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 0;
+ private Throwable cause;
+
+ /**
+ * Constructs a JSONException with an explanatory message.
+ * @param message Detail about the reason for the exception.
+ */
+ public JSONException(String message) {
+ super(message);
+ }
+
+ public JSONException(Throwable t) {
+ super(t.getMessage());
+ this.cause = t;
+ }
+
+ public Throwable getCause() {
+ return this.cause;
+ }
+}
diff --git a/gwt/3.3/src/org/json/JSONML.java b/gwt/3.3/src/org/json/JSONML.java
new file mode 100644
index 000000000..77af6e042
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONML.java
@@ -0,0 +1,455 @@
+package org.json;
+
+/*
+Copyright (c) 2008 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.util.Iterator;
+
+
+/**
+ * This provides static methods to convert an XML text into a JSONArray or
+ * JSONObject, and to covert a JSONArray or JSONObject into an XML text using
+ * the JsonML transform.
+ * @author JSON.org
+ * @version 2010-02-12
+ */
+public class JSONML {
+
+ /**
+ * Parse XML values and store them in a JSONArray.
+ * @param x The XMLTokener containing the source string.
+ * @param arrayForm true if array form, false if object form.
+ * @param ja The JSONArray that is containing the current tag or null
+ * if we are at the outermost level.
+ * @return A JSONArray if the value is the outermost tag, otherwise null.
+ * @throws JSONException
+ */
+ private static Object parse(XMLTokener x, boolean arrayForm,
+ JSONArray ja) throws JSONException {
+ String attribute;
+ char c;
+ String closeTag = null;
+ int i;
+ JSONArray newja = null;
+ JSONObject newjo = null;
+ Object token;
+ String tagName = null;
+
+// Test for and skip past these forms:
+//
+//
+//
+// ... ?>
+
+ while (true) {
+ token = x.nextContent();
+ if (token == XML.LT) {
+ token = x.nextToken();
+ if (token instanceof Character) {
+ if (token == XML.SLASH) {
+
+// Close tag
+
+ token = x.nextToken();
+ if (!(token instanceof String)) {
+ throw new JSONException(
+ "Expected a closing name instead of '" +
+ token + "'.");
+ }
+ if (x.nextToken() != XML.GT) {
+ throw x.syntaxError("Misshaped close tag");
+ }
+ return token;
+ } else if (token == XML.BANG) {
+
+// ");
+ }
+ x.back();
+ } else if (c == '[') {
+ token = x.nextToken();
+ if (token.equals("CDATA") && x.next() == '[') {
+ if (ja != null) {
+ ja.put(x.nextCDATA());
+ }
+ } else {
+ throw x.syntaxError("Expected 'CDATA['");
+ }
+ } else {
+ i = 1;
+ do {
+ token = x.nextMeta();
+ if (token == null) {
+ throw x.syntaxError("Missing '>' after ' 0);
+ }
+ } else if (token == XML.QUEST) {
+
+//
+
+ x.skipPast("?>");
+ } else {
+ throw x.syntaxError("Misshaped tag");
+ }
+
+// Open tag <
+
+ } else {
+ if (!(token instanceof String)) {
+ throw x.syntaxError("Bad tagName '" + token + "'.");
+ }
+ tagName = (String)token;
+ newja = new JSONArray();
+ newjo = new JSONObject();
+ if (arrayForm) {
+ newja.put(tagName);
+ if (ja != null) {
+ ja.put(newja);
+ }
+ } else {
+ newjo.put("tagName", tagName);
+ if (ja != null) {
+ ja.put(newjo);
+ }
+ }
+ token = null;
+ for (;;) {
+ if (token == null) {
+ token = x.nextToken();
+ }
+ if (token == null) {
+ throw x.syntaxError("Misshaped tag");
+ }
+ if (!(token instanceof String)) {
+ break;
+ }
+
+// attribute = value
+
+ attribute = (String)token;
+ if (!arrayForm && (attribute == "tagName" || attribute == "childNode")) {
+ throw x.syntaxError("Reserved attribute.");
+ }
+ token = x.nextToken();
+ if (token == XML.EQ) {
+ token = x.nextToken();
+ if (!(token instanceof String)) {
+ throw x.syntaxError("Missing value");
+ }
+ newjo.accumulate(attribute, JSONObject.stringToValue((String)token));
+ token = null;
+ } else {
+ newjo.accumulate(attribute, "");
+ }
+ }
+ if (arrayForm && newjo.length() > 0) {
+ newja.put(newjo);
+ }
+
+// Empty tag <.../>
+
+ if (token == XML.SLASH) {
+ if (x.nextToken() != XML.GT) {
+ throw x.syntaxError("Misshaped tag");
+ }
+ if (ja == null) {
+ if (arrayForm) {
+ return newja;
+ } else {
+ return newjo;
+ }
+ }
+
+// Content, between <...> and
+
+ } else {
+ if (token != XML.GT) {
+ throw x.syntaxError("Misshaped tag");
+ }
+ closeTag = (String)parse(x, arrayForm, newja);
+ if (closeTag != null) {
+ if (!closeTag.equals(tagName)) {
+ throw x.syntaxError("Mismatched '" + tagName +
+ "' and '" + closeTag + "'");
+ }
+ tagName = null;
+ if (!arrayForm && newja.length() > 0) {
+ newjo.put("childNodes", newja);
+ }
+ if (ja == null) {
+ if (arrayForm) {
+ return newja;
+ } else {
+ return newjo;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ if (ja != null) {
+ ja.put(token instanceof String ?
+ JSONObject.stringToValue((String)token) : token);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Convert a well-formed (but not necessarily valid) XML string into a
+ * JSONArray using the JsonML transform. Each XML tag is represented as
+ * a JSONArray in which the first element is the tag name. If the tag has
+ * attributes, then the second element will be JSONObject containing the
+ * name/value pairs. If the tag contains children, then strings and
+ * JSONArrays will represent the child tags.
+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored.
+ * @param string The source string.
+ * @return A JSONArray containing the structured data from the XML string.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(String string) throws JSONException {
+ return toJSONArray(new XMLTokener(string));
+ }
+
+
+ /**
+ * Convert a well-formed (but not necessarily valid) XML string into a
+ * JSONArray using the JsonML transform. Each XML tag is represented as
+ * a JSONArray in which the first element is the tag name. If the tag has
+ * attributes, then the second element will be JSONObject containing the
+ * name/value pairs. If the tag contains children, then strings and
+ * JSONArrays will represent the child content and tags.
+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored.
+ * @param x An XMLTokener.
+ * @return A JSONArray containing the structured data from the XML string.
+ * @throws JSONException
+ */
+ public static JSONArray toJSONArray(XMLTokener x) throws JSONException {
+ return (JSONArray)parse(x, true, null);
+ }
+
+
+
+ /**
+ * Convert a well-formed (but not necessarily valid) XML string into a
+ * JSONObject using the JsonML transform. Each XML tag is represented as
+ * a JSONObject with a "tagName" property. If the tag has attributes, then
+ * the attributes will be in the JSONObject as properties. If the tag
+ * contains children, the object will have a "childNodes" property which
+ * will be an array of strings and JsonML JSONObjects.
+
+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored.
+ * @param x An XMLTokener of the XML source text.
+ * @return A JSONObject containing the structured data from the XML string.
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(XMLTokener x) throws JSONException {
+ return (JSONObject)parse(x, false, null);
+ }
+ /**
+ * Convert a well-formed (but not necessarily valid) XML string into a
+ * JSONObject using the JsonML transform. Each XML tag is represented as
+ * a JSONObject with a "tagName" property. If the tag has attributes, then
+ * the attributes will be in the JSONObject as properties. If the tag
+ * contains children, the object will have a "childNodes" property which
+ * will be an array of strings and JsonML JSONObjects.
+
+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored.
+ * @param string The XML source text.
+ * @return A JSONObject containing the structured data from the XML string.
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(String string) throws JSONException {
+ return toJSONObject(new XMLTokener(string));
+ }
+
+
+ /**
+ * Reverse the JSONML transformation, making an XML text from a JSONArray.
+ * @param ja A JSONArray.
+ * @return An XML string.
+ * @throws JSONException
+ */
+ public static String toString(JSONArray ja) throws JSONException {
+ Object e;
+ int i;
+ JSONObject jo;
+ String k;
+ Iterator keys;
+ int length;
+ StringBuffer sb = new StringBuffer();
+ String tagName;
+ String v;
+
+// Emit = length) {
+ sb.append('/');
+ sb.append('>');
+ } else {
+ sb.append('>');
+ do {
+ e = ja.get(i);
+ i += 1;
+ if (e != null) {
+ if (e instanceof String) {
+ sb.append(XML.escape(e.toString()));
+ } else if (e instanceof JSONObject) {
+ sb.append(toString((JSONObject)e));
+ } else if (e instanceof JSONArray) {
+ sb.append(toString((JSONArray)e));
+ }
+ }
+ } while (i < length);
+ sb.append('<');
+ sb.append('/');
+ sb.append(tagName);
+ sb.append('>');
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Reverse the JSONML transformation, making an XML text from a JSONObject.
+ * The JSONObject must contain a "tagName" property. If it has children,
+ * then it must have a "childNodes" property containing an array of objects.
+ * The other properties are attributes with string values.
+ * @param jo A JSONObject.
+ * @return An XML string.
+ * @throws JSONException
+ */
+ public static String toString(JSONObject jo) throws JSONException {
+ StringBuffer sb = new StringBuffer();
+ Object e;
+ int i;
+ JSONArray ja;
+ String k;
+ Iterator keys;
+ int len;
+ String tagName;
+ String v;
+
+//Emit ');
+ } else {
+ sb.append('>');
+ len = ja.length();
+ for (i = 0; i < len; i += 1) {
+ e = ja.get(i);
+ if (e != null) {
+ if (e instanceof String) {
+ sb.append(XML.escape(e.toString()));
+ } else if (e instanceof JSONObject) {
+ sb.append(toString((JSONObject)e));
+ } else if (e instanceof JSONArray) {
+ sb.append(toString((JSONArray)e));
+ }
+ }
+ }
+ sb.append('<');
+ sb.append('/');
+ sb.append(tagName);
+ sb.append('>');
+ }
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/JSONObject.java b/gwt/3.3/src/org/json/JSONObject.java
new file mode 100644
index 000000000..24662c7a1
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONObject.java
@@ -0,0 +1,1584 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeSet;
+
+/**
+ * A JSONObject is an unordered collection of name/value pairs. Its
+ * external form is a string wrapped in curly braces with colons between the
+ * names and values, and commas between the values and names. The internal form
+ * is an object having get and opt methods for
+ * accessing the values by name, and put methods for adding or
+ * replacing values by name. The values can be any of these types:
+ * Boolean, JSONArray, JSONObject,
+ * Number, String, or the JSONObject.NULL
+ * object. A JSONObject constructor can be used to convert an external form
+ * JSON text into an internal form whose values can be retrieved with the
+ * get and opt methods, or to convert values into a
+ * JSON text using the put and toString methods.
+ * A get method returns a value if one can be found, and throws an
+ * exception if one cannot be found. An opt method returns a
+ * default value instead of throwing an exception, and so is useful for
+ * obtaining optional values.
+ *
+ * The generic get() and opt() methods return an
+ * object, which you can cast or query for type. There are also typed
+ * get and opt methods that do type checking and type
+ * coercion for you.
+ *
+ * The put methods adds values to an object. For example,
+ * myString = new JSONObject().put("JSON", "Hello, World!").toString();
+ * produces the string {"JSON": "Hello, World"}.
+ *
+ * The texts produced by the toString methods strictly conform to
+ * the JSON syntax rules.
+ * The constructors are more forgiving in the texts they will accept:
+ *
+ *
An extra , (comma) may appear just
+ * before the closing brace.
+ *
Strings may be quoted with ' (single
+ * quote).
+ *
Strings do not need to be quoted at all if they do not begin with a quote
+ * or single quote, and if they do not contain leading or trailing spaces,
+ * and if they do not contain any of these characters:
+ * { } [ ] / \ : , = ; # and if they do not look like numbers
+ * and if they are not the reserved words true,
+ * false, or null.
+ *
Keys can be followed by = or => as well as
+ * by :.
+ *
Values can be followed by ; (semicolon) as
+ * well as by , (comma).
+ *
Numbers may have the 0x- (hex) prefix.
+ *
+ * @author JSON.org
+ * @version 2010-05-17
+ */
+public class JSONObject {
+
+ /**
+ * JSONObject.NULL is equivalent to the value that JavaScript calls null,
+ * whilst Java's null is equivalent to the value that JavaScript calls
+ * undefined.
+ */
+ private static final class Null {
+
+ /**
+ * There is only intended to be a single instance of the NULL object,
+ * so the clone method returns itself.
+ * @return NULL.
+ */
+ protected final Object clone() {
+ return this;
+ }
+
+
+ /**
+ * A Null object is equal to the null value and to itself.
+ * @param object An object to test for nullness.
+ * @return true if the object parameter is the JSONObject.NULL object
+ * or null.
+ */
+ public boolean equals(Object object) {
+ return object == null || object == this;
+ }
+
+
+ /**
+ * Get the "null" string value.
+ * @return The string "null".
+ */
+ public String toString() {
+ return "null";
+ }
+ }
+
+
+ /**
+ * The map where the JSONObject's properties are kept.
+ */
+ private Map map;
+
+
+ /**
+ * It is sometimes more convenient and less ambiguous to have a
+ * NULL object than to use Java's null value.
+ * JSONObject.NULL.equals(null) returns true.
+ * JSONObject.NULL.toString() returns "null".
+ */
+ public static final Object NULL = new Null();
+
+
+ /**
+ * Construct an empty JSONObject.
+ */
+ public JSONObject() {
+ this.map = new HashMap();
+ }
+
+
+ /**
+ * Construct a JSONObject from a subset of another JSONObject.
+ * An array of strings is used to identify the keys that should be copied.
+ * Missing keys are ignored.
+ * @param jo A JSONObject.
+ * @param names An array of strings.
+ * @throws JSONException
+ * @exception JSONException If a value is a non-finite number or if a name is duplicated.
+ */
+ public JSONObject(JSONObject jo, String[] names) {
+ this();
+ for (int i = 0; i < names.length; i += 1) {
+ try {
+ putOnce(names[i], jo.opt(names[i]));
+ } catch (Exception ignore) {
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONObject from a JSONTokener.
+ * @param x A JSONTokener object containing the source string.
+ * @throws JSONException If there is a syntax error in the source string
+ * or a duplicated key.
+ */
+ public JSONObject(JSONTokener x) throws JSONException {
+ this();
+ char c;
+ String key;
+
+ if (x.nextClean() != '{') {
+ throw x.syntaxError("A JSONObject text must begin with '{'");
+ }
+ for (;;) {
+ c = x.nextClean();
+ switch (c) {
+ case 0:
+ throw x.syntaxError("A JSONObject text must end with '}'");
+ case '}':
+ return;
+ default:
+ x.back();
+ key = x.nextValue().toString();
+ }
+
+ /*
+ * The key is followed by ':'. We will also tolerate '=' or '=>'.
+ */
+
+ c = x.nextClean();
+ if (c == '=') {
+ if (x.next() != '>') {
+ x.back();
+ }
+ } else if (c != ':') {
+ throw x.syntaxError("Expected a ':' after a key");
+ }
+ putOnce(key, x.nextValue());
+
+ /*
+ * Pairs are separated by ','. We will also tolerate ';'.
+ */
+
+ switch (x.nextClean()) {
+ case ';':
+ case ',':
+ if (x.nextClean() == '}') {
+ return;
+ }
+ x.back();
+ break;
+ case '}':
+ return;
+ default:
+ throw x.syntaxError("Expected a ',' or '}'");
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONObject from a Map.
+ *
+ * @param map A map object that can be used to initialize the contents of
+ * the JSONObject.
+ * @throws JSONException
+ */
+ public JSONObject(Map map) {
+ this.map = new HashMap();
+ if (map != null) {
+ Iterator i = map.entrySet().iterator();
+ while (i.hasNext()) {
+ Map.Entry e = (Map.Entry)i.next();
+ this.map.put(e.getKey(), wrap(e.getValue()));
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONObject from an Object using bean getters.
+ * It reflects on all of the public methods of the object.
+ * For each of the methods with no parameters and a name starting
+ * with "get" or "is" followed by an uppercase letter,
+ * the method is invoked, and a key and the value returned from the getter method
+ * are put into the new JSONObject.
+ *
+ * The key is formed by removing the "get" or "is" prefix.
+ * If the second remaining character is not upper case, then the first
+ * character is converted to lower case.
+ *
+ * For example, if an object has a method named "getName", and
+ * if the result of calling object.getName() is "Larry Fine",
+ * then the JSONObject will contain "name": "Larry Fine".
+ *
+ * @param bean An object that has getter methods that should be used
+ * to make a JSONObject.
+ */
+ public JSONObject(Object bean) {
+ this();
+ populateMap(bean);
+ }
+
+
+ /**
+ * Construct a JSONObject from an Object, using reflection to find the
+ * public members. The resulting JSONObject's keys will be the strings
+ * from the names array, and the values will be the field values associated
+ * with those keys in the object. If a key is not found or not visible,
+ * then it will not be copied into the new JSONObject.
+ * @param object An object that has fields that should be used to make a
+ * JSONObject.
+ * @param names An array of strings, the names of the fields to be obtained
+ * from the object.
+ */
+ public JSONObject(Object object, String names[]) {
+ this();
+ Class c = object.getClass();
+ for (int i = 0; i < names.length; i += 1) {
+ String name = names[i];
+ try {
+ putOpt(name, c.getField(name).get(object));
+ } catch (Exception ignore) {
+ }
+ }
+ }
+
+
+ /**
+ * Construct a JSONObject from a source JSON text string.
+ * This is the most commonly used JSONObject constructor.
+ * @param source A string beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ * @exception JSONException If there is a syntax error in the source
+ * string or a duplicated key.
+ */
+ public JSONObject(String source) throws JSONException {
+ this(new JSONTokener(source));
+ }
+
+
+ /**
+ * Accumulate values under a key. It is similar to the put method except
+ * that if there is already an object stored under the key then a
+ * JSONArray is stored under the key to hold all of the accumulated values.
+ * If there is already a JSONArray, then the new value is appended to it.
+ * In contrast, the put method replaces the previous value.
+ * @param key A key string.
+ * @param value An object to be accumulated under the key.
+ * @return this.
+ * @throws JSONException If the value is an invalid number
+ * or if the key is null.
+ */
+ public JSONObject accumulate(String key, Object value)
+ throws JSONException {
+ testValidity(value);
+ Object o = opt(key);
+ if (o == null) {
+ put(key, value instanceof JSONArray ?
+ new JSONArray().put(value) :
+ value);
+ } else if (o instanceof JSONArray) {
+ ((JSONArray)o).put(value);
+ } else {
+ put(key, new JSONArray().put(o).put(value));
+ }
+ return this;
+ }
+
+
+ /**
+ * Append values to the array under a key. If the key does not exist in the
+ * JSONObject, then the key is put in the JSONObject with its value being a
+ * JSONArray containing the value parameter. If the key was already
+ * associated with a JSONArray, then the value parameter is appended to it.
+ * @param key A key string.
+ * @param value An object to be accumulated under the key.
+ * @return this.
+ * @throws JSONException If the key is null or if the current value
+ * associated with the key is not a JSONArray.
+ */
+ public JSONObject append(String key, Object value) throws JSONException {
+ testValidity(value);
+ Object o = opt(key);
+ if (o == null) {
+ put(key, new JSONArray().put(value));
+ } else if (o instanceof JSONArray) {
+ put(key, ((JSONArray)o).put(value));
+ } else {
+ throw new JSONException("JSONObject[" + key +
+ "] is not a JSONArray.");
+ }
+ return this;
+ }
+
+
+ /**
+ * Produce a string from a double. The string "null" will be returned if
+ * the number is not finite.
+ * @param d A double.
+ * @return A String.
+ */
+ static public String doubleToString(double d) {
+ if (Double.isInfinite(d) || Double.isNaN(d)) {
+ return "null";
+ }
+
+// Shave off trailing zeros and decimal point, if possible.
+
+ String s = Double.toString(d);
+ if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0) {
+ while (s.endsWith("0")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ if (s.endsWith(".")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ }
+ return s;
+ }
+
+
+ /**
+ * Get the value object associated with a key.
+ *
+ * @param key A key string.
+ * @return The object associated with the key.
+ * @throws JSONException if the key is not found.
+ */
+ public Object get(String key) throws JSONException {
+ Object o = opt(key);
+ if (o == null) {
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] not found.");
+ }
+ return o;
+ }
+
+
+ /**
+ * Get the boolean value associated with a key.
+ *
+ * @param key A key string.
+ * @return The truth.
+ * @throws JSONException
+ * if the value is not a Boolean or the String "true" or "false".
+ */
+ public boolean getBoolean(String key) throws JSONException {
+ Object o = get(key);
+ if (o.equals(Boolean.FALSE) ||
+ (o instanceof String &&
+ ((String)o).equalsIgnoreCase("false"))) {
+ return false;
+ } else if (o.equals(Boolean.TRUE) ||
+ (o instanceof String &&
+ ((String)o).equalsIgnoreCase("true"))) {
+ return true;
+ }
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not a Boolean.");
+ }
+
+
+ /**
+ * Get the double value associated with a key.
+ * @param key A key string.
+ * @return The numeric value.
+ * @throws JSONException if the key is not found or
+ * if the value is not a Number object and cannot be converted to a number.
+ */
+ public double getDouble(String key) throws JSONException {
+ Object o = get(key);
+ try {
+ return o instanceof Number ?
+ ((Number)o).doubleValue() :
+ Double.valueOf((String)o).doubleValue();
+ } catch (Exception e) {
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not a number.");
+ }
+ }
+
+
+ /**
+ * Get the int value associated with a key.
+ *
+ * @param key A key string.
+ * @return The integer value.
+ * @throws JSONException if the key is not found or if the value cannot
+ * be converted to an integer.
+ */
+ public int getInt(String key) throws JSONException {
+ Object o = get(key);
+ try {
+ return o instanceof Number ?
+ ((Number)o).intValue() :
+ Integer.parseInt((String)o);
+ } catch (Exception e) {
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not an int.");
+ }
+ }
+
+
+ /**
+ * Get the JSONArray value associated with a key.
+ *
+ * @param key A key string.
+ * @return A JSONArray which is the value.
+ * @throws JSONException if the key is not found or
+ * if the value is not a JSONArray.
+ */
+ public JSONArray getJSONArray(String key) throws JSONException {
+ Object o = get(key);
+ if (o instanceof JSONArray) {
+ return (JSONArray)o;
+ }
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not a JSONArray.");
+ }
+
+
+ /**
+ * Get the JSONObject value associated with a key.
+ *
+ * @param key A key string.
+ * @return A JSONObject which is the value.
+ * @throws JSONException if the key is not found or
+ * if the value is not a JSONObject.
+ */
+ public JSONObject getJSONObject(String key) throws JSONException {
+ Object o = get(key);
+ if (o instanceof JSONObject) {
+ return (JSONObject)o;
+ }
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not a JSONObject.");
+ }
+
+
+ /**
+ * Get the long value associated with a key.
+ *
+ * @param key A key string.
+ * @return The long value.
+ * @throws JSONException if the key is not found or if the value cannot
+ * be converted to a long.
+ */
+ public long getLong(String key) throws JSONException {
+ Object o = get(key);
+ try {
+ return o instanceof Number ?
+ ((Number)o).longValue() :
+ Long.parseLong((String)o);
+ } catch (Exception e) {
+ throw new JSONException("JSONObject[" + quote(key) +
+ "] is not a long.");
+ }
+ }
+
+
+ /**
+ * Get an array of field names from a JSONObject.
+ *
+ * @return An array of field names, or null if there are no names.
+ */
+ public static String[] getNames(JSONObject jo) {
+ int length = jo.length();
+ if (length == 0) {
+ return null;
+ }
+ Iterator i = jo.keys();
+ String[] names = new String[length];
+ int j = 0;
+ while (i.hasNext()) {
+ names[j] = (String)i.next();
+ j += 1;
+ }
+ return names;
+ }
+
+
+ /**
+ * Get an array of field names from an Object.
+ *
+ * @return An array of field names, or null if there are no names.
+ */
+ public static String[] getNames(Object object) {
+ if (object == null) {
+ return null;
+ }
+ Class klass = object.getClass();
+ Field[] fields = klass.getFields();
+ int length = fields.length;
+ if (length == 0) {
+ return null;
+ }
+ String[] names = new String[length];
+ for (int i = 0; i < length; i += 1) {
+ names[i] = fields[i].getName();
+ }
+ return names;
+ }
+
+
+ /**
+ * Get the string associated with a key.
+ *
+ * @param key A key string.
+ * @return A string which is the value.
+ * @throws JSONException if the key is not found.
+ */
+ public String getString(String key) throws JSONException {
+ return get(key).toString();
+ }
+
+
+ /**
+ * Determine if the JSONObject contains a specific key.
+ * @param key A key string.
+ * @return true if the key exists in the JSONObject.
+ */
+ public boolean has(String key) {
+ return this.map.containsKey(key);
+ }
+
+
+ /**
+ * Increment a property of a JSONObject. If there is no such property,
+ * create one with a value of 1. If there is such a property, and if
+ * it is an Integer, Long, Double, or Float, then add one to it.
+ * @param key A key string.
+ * @return this.
+ * @throws JSONException If there is already a property with this name
+ * that is not an Integer, Long, Double, or Float.
+ */
+ public JSONObject increment(String key) throws JSONException {
+ Object value = opt(key);
+ if (value == null) {
+ put(key, 1);
+ } else {
+ if (value instanceof Integer) {
+ put(key, ((Integer)value).intValue() + 1);
+ } else if (value instanceof Long) {
+ put(key, ((Long)value).longValue() + 1);
+ } else if (value instanceof Double) {
+ put(key, ((Double)value).doubleValue() + 1);
+ } else if (value instanceof Float) {
+ put(key, ((Float)value).floatValue() + 1);
+ } else {
+ throw new JSONException("Unable to increment [" + key + "].");
+ }
+ }
+ return this;
+ }
+
+
+ /**
+ * Determine if the value associated with the key is null or if there is
+ * no value.
+ * @param key A key string.
+ * @return true if there is no value associated with the key or if
+ * the value is the JSONObject.NULL object.
+ */
+ public boolean isNull(String key) {
+ return JSONObject.NULL.equals(opt(key));
+ }
+
+
+ /**
+ * Get an enumeration of the keys of the JSONObject.
+ *
+ * @return An iterator of the keys.
+ */
+ public Iterator keys() {
+ return this.map.keySet().iterator();
+ }
+
+
+ /**
+ * Get the number of keys stored in the JSONObject.
+ *
+ * @return The number of keys in the JSONObject.
+ */
+ public int length() {
+ return this.map.size();
+ }
+
+
+ /**
+ * Produce a JSONArray containing the names of the elements of this
+ * JSONObject.
+ * @return A JSONArray containing the key strings, or null if the JSONObject
+ * is empty.
+ */
+ public JSONArray names() {
+ JSONArray ja = new JSONArray();
+ Iterator keys = keys();
+ while (keys.hasNext()) {
+ ja.put(keys.next());
+ }
+ return ja.length() == 0 ? null : ja;
+ }
+
+ /**
+ * Produce a string from a Number.
+ * @param n A Number
+ * @return A String.
+ * @throws JSONException If n is a non-finite number.
+ */
+ static public String numberToString(Number n)
+ throws JSONException {
+ if (n == null) {
+ throw new JSONException("Null pointer");
+ }
+ testValidity(n);
+
+// Shave off trailing zeros and decimal point, if possible.
+
+ String s = n.toString();
+ if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0) {
+ while (s.endsWith("0")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ if (s.endsWith(".")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ }
+ return s;
+ }
+
+
+ /**
+ * Get an optional value associated with a key.
+ * @param key A key string.
+ * @return An object which is the value, or null if there is no value.
+ */
+ public Object opt(String key) {
+ return key == null ? null : this.map.get(key);
+ }
+
+
+ /**
+ * Get an optional boolean associated with a key.
+ * It returns false if there is no such key, or if the value is not
+ * Boolean.TRUE or the String "true".
+ *
+ * @param key A key string.
+ * @return The truth.
+ */
+ public boolean optBoolean(String key) {
+ return optBoolean(key, false);
+ }
+
+
+ /**
+ * Get an optional boolean associated with a key.
+ * It returns the defaultValue if there is no such key, or if it is not
+ * a Boolean or the String "true" or "false" (case insensitive).
+ *
+ * @param key A key string.
+ * @param defaultValue The default.
+ * @return The truth.
+ */
+ public boolean optBoolean(String key, boolean defaultValue) {
+ try {
+ return getBoolean(key);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get an optional double associated with a key,
+ * or NaN if there is no such key or if its value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A string which is the key.
+ * @return An object which is the value.
+ */
+ public double optDouble(String key) {
+ return optDouble(key, Double.NaN);
+ }
+
+
+ /**
+ * Get an optional double associated with a key, or the
+ * defaultValue if there is no such key or if its value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A key string.
+ * @param defaultValue The default.
+ * @return An object which is the value.
+ */
+ public double optDouble(String key, double defaultValue) {
+ try {
+ Object o = opt(key);
+ return o instanceof Number ? ((Number)o).doubleValue() :
+ new Double((String)o).doubleValue();
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get an optional int value associated with a key,
+ * or zero if there is no such key or if the value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A key string.
+ * @return An object which is the value.
+ */
+ public int optInt(String key) {
+ return optInt(key, 0);
+ }
+
+
+ /**
+ * Get an optional int value associated with a key,
+ * or the default if there is no such key or if the value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A key string.
+ * @param defaultValue The default.
+ * @return An object which is the value.
+ */
+ public int optInt(String key, int defaultValue) {
+ try {
+ return getInt(key);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get an optional JSONArray associated with a key.
+ * It returns null if there is no such key, or if its value is not a
+ * JSONArray.
+ *
+ * @param key A key string.
+ * @return A JSONArray which is the value.
+ */
+ public JSONArray optJSONArray(String key) {
+ Object o = opt(key);
+ return o instanceof JSONArray ? (JSONArray)o : null;
+ }
+
+
+ /**
+ * Get an optional JSONObject associated with a key.
+ * It returns null if there is no such key, or if its value is not a
+ * JSONObject.
+ *
+ * @param key A key string.
+ * @return A JSONObject which is the value.
+ */
+ public JSONObject optJSONObject(String key) {
+ Object o = opt(key);
+ return o instanceof JSONObject ? (JSONObject)o : null;
+ }
+
+
+ /**
+ * Get an optional long value associated with a key,
+ * or zero if there is no such key or if the value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A key string.
+ * @return An object which is the value.
+ */
+ public long optLong(String key) {
+ return optLong(key, 0);
+ }
+
+
+ /**
+ * Get an optional long value associated with a key,
+ * or the default if there is no such key or if the value is not a number.
+ * If the value is a string, an attempt will be made to evaluate it as
+ * a number.
+ *
+ * @param key A key string.
+ * @param defaultValue The default.
+ * @return An object which is the value.
+ */
+ public long optLong(String key, long defaultValue) {
+ try {
+ return getLong(key);
+ } catch (Exception e) {
+ return defaultValue;
+ }
+ }
+
+
+ /**
+ * Get an optional string associated with a key.
+ * It returns an empty string if there is no such key. If the value is not
+ * a string and is not null, then it is coverted to a string.
+ *
+ * @param key A key string.
+ * @return A string which is the value.
+ */
+ public String optString(String key) {
+ return optString(key, "");
+ }
+
+
+ /**
+ * Get an optional string associated with a key.
+ * It returns the defaultValue if there is no such key.
+ *
+ * @param key A key string.
+ * @param defaultValue The default.
+ * @return A string which is the value.
+ */
+ public String optString(String key, String defaultValue) {
+ Object o = opt(key);
+ return o != null ? o.toString() : defaultValue;
+ }
+
+
+ private void populateMap(Object bean) {
+ Class klass = bean.getClass();
+
+// If klass is a System class then set includeSuperClass to false.
+
+ boolean includeSuperClass = klass.getClassLoader() != null;
+
+ Method[] methods = (includeSuperClass) ?
+ klass.getMethods() : klass.getDeclaredMethods();
+ for (int i = 0; i < methods.length; i += 1) {
+ try {
+ Method method = methods[i];
+ if (Modifier.isPublic(method.getModifiers())) {
+ String name = method.getName();
+ String key = "";
+ if (name.startsWith("get")) {
+ if (name.equals("getClass") ||
+ name.equals("getDeclaringClass")) {
+ key = "";
+ } else {
+ key = name.substring(3);
+ }
+ } else if (name.startsWith("is")) {
+ key = name.substring(2);
+ }
+ if (key.length() > 0 &&
+ Character.isUpperCase(key.charAt(0)) &&
+ method.getParameterTypes().length == 0) {
+ if (key.length() == 1) {
+ key = key.toLowerCase();
+ } else if (!Character.isUpperCase(key.charAt(1))) {
+ key = key.substring(0, 1).toLowerCase() +
+ key.substring(1);
+ }
+
+ Object result = method.invoke(bean, (Object[])null);
+
+ map.put(key, wrap(result));
+ }
+ }
+ } catch (Exception ignore) {
+ }
+ }
+ }
+
+
+ /**
+ * Put a key/boolean pair in the JSONObject.
+ *
+ * @param key A key string.
+ * @param value A boolean which is the value.
+ * @return this.
+ * @throws JSONException If the key is null.
+ */
+ public JSONObject put(String key, boolean value) throws JSONException {
+ put(key, value ? Boolean.TRUE : Boolean.FALSE);
+ return this;
+ }
+
+
+ /**
+ * Put a key/value pair in the JSONObject, where the value will be a
+ * JSONArray which is produced from a Collection.
+ * @param key A key string.
+ * @param value A Collection value.
+ * @return this.
+ * @throws JSONException
+ */
+ public JSONObject put(String key, Collection value) throws JSONException {
+ put(key, new JSONArray(value));
+ return this;
+ }
+
+
+ /**
+ * Put a key/double pair in the JSONObject.
+ *
+ * @param key A key string.
+ * @param value A double which is the value.
+ * @return this.
+ * @throws JSONException If the key is null or if the number is invalid.
+ */
+ public JSONObject put(String key, double value) throws JSONException {
+ put(key, new Double(value));
+ return this;
+ }
+
+
+ /**
+ * Put a key/int pair in the JSONObject.
+ *
+ * @param key A key string.
+ * @param value An int which is the value.
+ * @return this.
+ * @throws JSONException If the key is null.
+ */
+ public JSONObject put(String key, int value) throws JSONException {
+ put(key, new Integer(value));
+ return this;
+ }
+
+
+ /**
+ * Put a key/long pair in the JSONObject.
+ *
+ * @param key A key string.
+ * @param value A long which is the value.
+ * @return this.
+ * @throws JSONException If the key is null.
+ */
+ public JSONObject put(String key, long value) throws JSONException {
+ put(key, new Long(value));
+ return this;
+ }
+
+
+ /**
+ * Put a key/value pair in the JSONObject, where the value will be a
+ * JSONObject which is produced from a Map.
+ * @param key A key string.
+ * @param value A Map value.
+ * @return this.
+ * @throws JSONException
+ */
+ public JSONObject put(String key, Map value) throws JSONException {
+ put(key, new JSONObject(value));
+ return this;
+ }
+
+
+ /**
+ * Put a key/value pair in the JSONObject. If the value is null,
+ * then the key will be removed from the JSONObject if it is present.
+ * @param key A key string.
+ * @param value An object which is the value. It should be of one of these
+ * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
+ * or the JSONObject.NULL object.
+ * @return this.
+ * @throws JSONException If the value is non-finite number
+ * or if the key is null.
+ */
+ public JSONObject put(String key, Object value) throws JSONException {
+ if (key == null) {
+ throw new JSONException("Null key.");
+ }
+ if (value != null) {
+ testValidity(value);
+ this.map.put(key, value);
+ } else {
+ remove(key);
+ }
+ return this;
+ }
+
+
+ /**
+ * Put a key/value pair in the JSONObject, but only if the key and the
+ * value are both non-null, and only if there is not already a member
+ * with that name.
+ * @param key
+ * @param value
+ * @return his.
+ * @throws JSONException if the key is a duplicate
+ */
+ public JSONObject putOnce(String key, Object value) throws JSONException {
+ if (key != null && value != null) {
+ if (opt(key) != null) {
+ throw new JSONException("Duplicate key \"" + key + "\"");
+ }
+ put(key, value);
+ }
+ return this;
+ }
+
+
+ /**
+ * Put a key/value pair in the JSONObject, but only if the
+ * key and the value are both non-null.
+ * @param key A key string.
+ * @param value An object which is the value. It should be of one of these
+ * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
+ * or the JSONObject.NULL object.
+ * @return this.
+ * @throws JSONException If the value is a non-finite number.
+ */
+ public JSONObject putOpt(String key, Object value) throws JSONException {
+ if (key != null && value != null) {
+ put(key, value);
+ }
+ return this;
+ }
+
+
+ /**
+ * Produce a string in double quotes with backslash sequences in all the
+ * right places. A backslash will be inserted within , allowing JSON
+ * text to be delivered in HTML. In JSON text, a string cannot contain a
+ * control character or an unescaped quote or backslash.
+ * @param string A String
+ * @return A String correctly formatted for insertion in a JSON text.
+ */
+ public static String quote(String string) {
+ if (string == null || string.length() == 0) {
+ return "\"\"";
+ }
+
+ char b;
+ char c = 0;
+ int i;
+ int len = string.length();
+ StringBuffer sb = new StringBuffer(len + 4);
+ String t;
+
+ sb.append('"');
+ for (i = 0; i < len; i += 1) {
+ b = c;
+ c = string.charAt(i);
+ switch (c) {
+ case '\\':
+ case '"':
+ sb.append('\\');
+ sb.append(c);
+ break;
+ case '/':
+ if (b == '<') {
+ sb.append('\\');
+ }
+ sb.append(c);
+ break;
+ case '\b':
+ sb.append("\\b");
+ break;
+ case '\t':
+ sb.append("\\t");
+ break;
+ case '\n':
+ sb.append("\\n");
+ break;
+ case '\f':
+ sb.append("\\f");
+ break;
+ case '\r':
+ sb.append("\\r");
+ break;
+ default:
+ if (c < ' ' || (c >= '\u0080' && c < '\u00a0') ||
+ (c >= '\u2000' && c < '\u2100')) {
+ t = "000" + Integer.toHexString(c);
+ sb.append("\\u" + t.substring(t.length() - 4));
+ } else {
+ sb.append(c);
+ }
+ }
+ }
+ sb.append('"');
+ return sb.toString();
+ }
+
+ /**
+ * Remove a name and its value, if present.
+ * @param key The name to be removed.
+ * @return The value that was associated with the name,
+ * or null if there was no value.
+ */
+ public Object remove(String key) {
+ return this.map.remove(key);
+ }
+
+ /**
+ * Get an enumeration of the keys of the JSONObject.
+ * The keys will be sorted alphabetically.
+ *
+ * @return An iterator of the keys.
+ */
+ public Iterator sortedKeys() {
+ return new TreeSet(this.map.keySet()).iterator();
+ }
+
+ /**
+ * Try to convert a string into a number, boolean, or null. If the string
+ * can't be converted, return the string.
+ * @param s A String.
+ * @return A simple JSON value.
+ */
+ static public Object stringToValue(String s) {
+ if (s.equals("")) {
+ return s;
+ }
+ if (s.equalsIgnoreCase("true")) {
+ return Boolean.TRUE;
+ }
+ if (s.equalsIgnoreCase("false")) {
+ return Boolean.FALSE;
+ }
+ if (s.equalsIgnoreCase("null")) {
+ return JSONObject.NULL;
+ }
+
+ /*
+ * If it might be a number, try converting it.
+ * We support the non-standard 0x- convention.
+ * If a number cannot be produced, then the value will just
+ * be a string. Note that the 0x-, plus, and implied string
+ * conventions are non-standard. A JSON parser may accept
+ * non-JSON forms as long as it accepts all correct JSON forms.
+ */
+
+ char b = s.charAt(0);
+ if ((b >= '0' && b <= '9') || b == '.' || b == '-' || b == '+') {
+ if (b == '0' && s.length() > 2 &&
+ (s.charAt(1) == 'x' || s.charAt(1) == 'X')) {
+ try {
+ return new Integer(Integer.parseInt(s.substring(2), 16));
+ } catch (Exception ignore) {
+ }
+ }
+ try {
+ if (s.indexOf('.') > -1 ||
+ s.indexOf('e') > -1 || s.indexOf('E') > -1) {
+ return Double.valueOf(s);
+ } else {
+ Long myLong = new Long(s);
+ if (myLong.longValue() == myLong.intValue()) {
+ return new Integer(myLong.intValue());
+ } else {
+ return myLong;
+ }
+ }
+ } catch (Exception ignore) {
+ }
+ }
+ return s;
+ }
+
+
+ /**
+ * Throw an exception if the object is an NaN or infinite number.
+ * @param o The object to test.
+ * @throws JSONException If o is a non-finite number.
+ */
+ static void testValidity(Object o) throws JSONException {
+ if (o != null) {
+ if (o instanceof Double) {
+ if (((Double)o).isInfinite() || ((Double)o).isNaN()) {
+ throw new JSONException(
+ "JSON does not allow non-finite numbers.");
+ }
+ } else if (o instanceof Float) {
+ if (((Float)o).isInfinite() || ((Float)o).isNaN()) {
+ throw new JSONException(
+ "JSON does not allow non-finite numbers.");
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Produce a JSONArray containing the values of the members of this
+ * JSONObject.
+ * @param names A JSONArray containing a list of key strings. This
+ * determines the sequence of the values in the result.
+ * @return A JSONArray of values.
+ * @throws JSONException If any of the values are non-finite numbers.
+ */
+ public JSONArray toJSONArray(JSONArray names) throws JSONException {
+ if (names == null || names.length() == 0) {
+ return null;
+ }
+ JSONArray ja = new JSONArray();
+ for (int i = 0; i < names.length(); i += 1) {
+ ja.put(this.opt(names.getString(i)));
+ }
+ return ja;
+ }
+
+ /**
+ * Make a JSON text of this JSONObject. For compactness, no whitespace
+ * is added. If this would not result in a syntactically correct JSON text,
+ * then null will be returned instead.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ *
+ * @return a printable, displayable, portable, transmittable
+ * representation of the object, beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ */
+ public String toString() {
+ try {
+ Iterator keys = keys();
+ StringBuffer sb = new StringBuffer("{");
+
+ while (keys.hasNext()) {
+ if (sb.length() > 1) {
+ sb.append(',');
+ }
+ Object o = keys.next();
+ sb.append(quote(o.toString()));
+ sb.append(':');
+ sb.append(valueToString(this.map.get(o)));
+ }
+ sb.append('}');
+ return sb.toString();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+
+ /**
+ * Make a prettyprinted JSON text of this JSONObject.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param indentFactor The number of spaces to add to each level of
+ * indentation.
+ * @return a printable, displayable, portable, transmittable
+ * representation of the object, beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ * @throws JSONException If the object contains an invalid number.
+ */
+ public String toString(int indentFactor) throws JSONException {
+ return toString(indentFactor, 0);
+ }
+
+
+ /**
+ * Make a prettyprinted JSON text of this JSONObject.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param indentFactor The number of spaces to add to each level of
+ * indentation.
+ * @param indent The indentation of the top level.
+ * @return a printable, displayable, transmittable
+ * representation of the object, beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ * @throws JSONException If the object contains an invalid number.
+ */
+ String toString(int indentFactor, int indent) throws JSONException {
+ int j;
+ int n = length();
+ if (n == 0) {
+ return "{}";
+ }
+ Iterator keys = sortedKeys();
+ StringBuffer sb = new StringBuffer("{");
+ int newindent = indent + indentFactor;
+ Object o;
+ if (n == 1) {
+ o = keys.next();
+ sb.append(quote(o.toString()));
+ sb.append(": ");
+ sb.append(valueToString(this.map.get(o), indentFactor,
+ indent));
+ } else {
+ while (keys.hasNext()) {
+ o = keys.next();
+ if (sb.length() > 1) {
+ sb.append(",\n");
+ } else {
+ sb.append('\n');
+ }
+ for (j = 0; j < newindent; j += 1) {
+ sb.append(' ');
+ }
+ sb.append(quote(o.toString()));
+ sb.append(": ");
+ sb.append(valueToString(this.map.get(o), indentFactor,
+ newindent));
+ }
+ if (sb.length() > 1) {
+ sb.append('\n');
+ for (j = 0; j < indent; j += 1) {
+ sb.append(' ');
+ }
+ }
+ }
+ sb.append('}');
+ return sb.toString();
+ }
+
+
+ /**
+ * Make a JSON text of an Object value. If the object has an
+ * value.toJSONString() method, then that method will be used to produce
+ * the JSON text. The method is required to produce a strictly
+ * conforming text. If the object does not contain a toJSONString
+ * method (which is the most common case), then a text will be
+ * produced by other means. If the value is an array or Collection,
+ * then a JSONArray will be made from it and its toJSONString method
+ * will be called. If the value is a MAP, then a JSONObject will be made
+ * from it and its toJSONString method will be called. Otherwise, the
+ * value's toString method will be called, and the result will be quoted.
+ *
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param value The value to be serialized.
+ * @return a printable, displayable, transmittable
+ * representation of the object, beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ * @throws JSONException If the value is or contains an invalid number.
+ */
+ static String valueToString(Object value) throws JSONException {
+ if (value == null || value.equals(null)) {
+ return "null";
+ }
+ if (value instanceof JSONString) {
+ Object o;
+ try {
+ o = ((JSONString)value).toJSONString();
+ } catch (Exception e) {
+ throw new JSONException(e);
+ }
+ if (o instanceof String) {
+ return (String)o;
+ }
+ throw new JSONException("Bad value from toJSONString: " + o);
+ }
+ if (value instanceof Number) {
+ return numberToString((Number) value);
+ }
+ if (value instanceof Boolean || value instanceof JSONObject ||
+ value instanceof JSONArray) {
+ return value.toString();
+ }
+ if (value instanceof Map) {
+ return new JSONObject((Map)value).toString();
+ }
+ if (value instanceof Collection) {
+ return new JSONArray((Collection)value).toString();
+ }
+ if (value.getClass().isArray()) {
+ return new JSONArray(value).toString();
+ }
+ return quote(value.toString());
+ }
+
+
+ /**
+ * Make a prettyprinted JSON text of an object value.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ * @param value The value to be serialized.
+ * @param indentFactor The number of spaces to add to each level of
+ * indentation.
+ * @param indent The indentation of the top level.
+ * @return a printable, displayable, transmittable
+ * representation of the object, beginning
+ * with { (left brace) and ending
+ * with } (right brace).
+ * @throws JSONException If the object contains an invalid number.
+ */
+ static String valueToString(Object value, int indentFactor, int indent)
+ throws JSONException {
+ if (value == null || value.equals(null)) {
+ return "null";
+ }
+ try {
+ if (value instanceof JSONString) {
+ Object o = ((JSONString)value).toJSONString();
+ if (o instanceof String) {
+ return (String)o;
+ }
+ }
+ } catch (Exception ignore) {
+ }
+ if (value instanceof Number) {
+ return numberToString((Number) value);
+ }
+ if (value instanceof Boolean) {
+ return value.toString();
+ }
+ if (value instanceof JSONObject) {
+ return ((JSONObject)value).toString(indentFactor, indent);
+ }
+ if (value instanceof JSONArray) {
+ return ((JSONArray)value).toString(indentFactor, indent);
+ }
+ if (value instanceof Map) {
+ return new JSONObject((Map)value).toString(indentFactor, indent);
+ }
+ if (value instanceof Collection) {
+ return new JSONArray((Collection)value).toString(indentFactor, indent);
+ }
+ if (value.getClass().isArray()) {
+ return new JSONArray(value).toString(indentFactor, indent);
+ }
+ return quote(value.toString());
+ }
+
+
+ /**
+ * Wrap an object, if necessary. If the object is null, return the NULL
+ * object. If it is an array or collection, wrap it in a JSONArray. If
+ * it is a map, wrap it in a JSONObject. If it is a standard property
+ * (Double, String, et al) then it is already wrapped. Otherwise, if it
+ * comes from one of the java packages, turn it into a string. And if
+ * it doesn't, try to wrap it in a JSONObject. If the wrapping fails,
+ * then null is returned.
+ *
+ * @param object The object to wrap
+ * @return The wrapped value
+ */
+ static Object wrap(Object object) {
+ try {
+ if (object == null) {
+ return NULL;
+ }
+ if (object instanceof JSONObject || object instanceof JSONArray ||
+ NULL.equals(object) || object instanceof JSONString ||
+ object instanceof Byte || object instanceof Character ||
+ object instanceof Short || object instanceof Integer ||
+ object instanceof Long || object instanceof Boolean ||
+ object instanceof Float || object instanceof Double ||
+ object instanceof String) {
+ return object;
+ }
+
+ if (object instanceof Collection) {
+ return new JSONArray((Collection)object);
+ }
+ if (object.getClass().isArray()) {
+ return new JSONArray(object);
+ }
+ if (object instanceof Map) {
+ return new JSONObject((Map)object);
+ }
+ Package objectPackage = object.getClass().getPackage();
+ String objectPackageName = ( objectPackage != null ? objectPackage.getName() : "" );
+ if (objectPackageName.startsWith("java.") ||
+ objectPackageName.startsWith("javax.") ||
+ object.getClass().getClassLoader() == null) {
+ return object.toString();
+ }
+ return new JSONObject(object);
+ } catch (Exception exception) {
+ return null;
+ }
+ }
+
+
+ /**
+ * Write the contents of the JSONObject as JSON text to a writer.
+ * For compactness, no whitespace is added.
+ *
+ * Warning: This method assumes that the data structure is acyclical.
+ *
+ * @return The writer.
+ * @throws JSONException
+ */
+ public Writer write(Writer writer) throws JSONException {
+ try {
+ boolean b = false;
+ Iterator keys = keys();
+ writer.write('{');
+
+ while (keys.hasNext()) {
+ if (b) {
+ writer.write(',');
+ }
+ Object k = keys.next();
+ writer.write(quote(k.toString()));
+ writer.write(':');
+ Object v = this.map.get(k);
+ if (v instanceof JSONObject) {
+ ((JSONObject)v).write(writer);
+ } else if (v instanceof JSONArray) {
+ ((JSONArray)v).write(writer);
+ } else {
+ writer.write(valueToString(v));
+ }
+ b = true;
+ }
+ writer.write('}');
+ return writer;
+ } catch (IOException exception) {
+ throw new JSONException(exception);
+ }
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/JSONString.java b/gwt/3.3/src/org/json/JSONString.java
new file mode 100644
index 000000000..1f2d77dd1
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONString.java
@@ -0,0 +1,18 @@
+package org.json;
+/**
+ * The JSONString interface allows a toJSONString()
+ * method so that a class can change the behavior of
+ * JSONObject.toString(), JSONArray.toString(),
+ * and JSONWriter.value(Object). The
+ * toJSONString method will be used instead of the default behavior
+ * of using the Object's toString() method and quoting the result.
+ */
+public interface JSONString {
+ /**
+ * The toJSONString method allows a class to produce its own JSON
+ * serialization.
+ *
+ * @return A strictly syntactically correct JSON text.
+ */
+ public String toJSONString();
+}
diff --git a/gwt/3.3/src/org/json/JSONStringer.java b/gwt/3.3/src/org/json/JSONStringer.java
new file mode 100644
index 000000000..32c9f7f44
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONStringer.java
@@ -0,0 +1,78 @@
+package org.json;
+
+/*
+Copyright (c) 2006 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.io.StringWriter;
+
+/**
+ * JSONStringer provides a quick and convenient way of producing JSON text.
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is
+ * added, so the results are ready for transmission or storage. Each instance of
+ * JSONStringer can produce one JSON text.
+ *
+ * A JSONStringer instance provides a value method for appending
+ * values to the
+ * text, and a key
+ * method for adding keys before values in objects. There are array
+ * and endArray methods that make and bound array values, and
+ * object and endObject methods which make and bound
+ * object values. All of these methods return the JSONWriter instance,
+ * permitting cascade style. For example,
+ * The first method called must be array or object.
+ * There are no methods for adding commas or colons. JSONStringer adds them for
+ * you. Objects and arrays can be nested up to 20 levels deep.
+ *
+ * This can sometimes be easier than using a JSONObject to build a string.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class JSONStringer extends JSONWriter {
+ /**
+ * Make a fresh JSONStringer. It can be used to build one JSON text.
+ */
+ public JSONStringer() {
+ super(new StringWriter());
+ }
+
+ /**
+ * Return the JSON text. This method is used to obtain the product of the
+ * JSONStringer instance. It will return null if there was a
+ * problem in the construction of the JSON text (such as the calls to
+ * array were not properly balanced with calls to
+ * endArray).
+ * @return The JSON text.
+ */
+ public String toString() {
+ return this.mode == 'd' ? this.writer.toString() : null;
+ }
+}
diff --git a/gwt/3.3/src/org/json/JSONTokener.java b/gwt/3.3/src/org/json/JSONTokener.java
new file mode 100644
index 000000000..dbea77b88
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONTokener.java
@@ -0,0 +1,435 @@
+package org.json;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * A JSONTokener takes a source string and extracts characters and tokens from
+ * it. It is used by the JSONObject and JSONArray constructors to parse
+ * JSON source strings.
+ * @author JSON.org
+ * @version 2010-02-02
+ */
+public class JSONTokener {
+
+ private int character;
+ private boolean eof;
+ private int index;
+ private int line;
+ private char previous;
+ private Reader reader;
+ private boolean usePrevious;
+
+
+ /**
+ * Construct a JSONTokener from a reader.
+ *
+ * @param reader A reader.
+ */
+ public JSONTokener(Reader reader) {
+ this.reader = reader.markSupported() ?
+ reader : new BufferedReader(reader);
+ this.eof = false;
+ this.usePrevious = false;
+ this.previous = 0;
+ this.index = 0;
+ this.character = 1;
+ this.line = 1;
+ }
+
+
+ /**
+ * Construct a JSONTokener from a string.
+ *
+ * @param s A source string.
+ */
+ public JSONTokener(String s) {
+ this(new StringReader(s));
+ }
+
+
+ /**
+ * Back up one character. This provides a sort of lookahead capability,
+ * so that you can test for a digit or letter before attempting to parse
+ * the next number or identifier.
+ */
+ public void back() throws JSONException {
+ if (usePrevious || index <= 0) {
+ throw new JSONException("Stepping back two steps is not supported");
+ }
+ this.index -= 1;
+ this.character -= 1;
+ this.usePrevious = true;
+ this.eof = false;
+ }
+
+
+ /**
+ * Get the hex value of a character (base16).
+ * @param c A character between '0' and '9' or between 'A' and 'F' or
+ * between 'a' and 'f'.
+ * @return An int between 0 and 15, or -1 if c was not a hex digit.
+ */
+ public static int dehexchar(char c) {
+ if (c >= '0' && c <= '9') {
+ return c - '0';
+ }
+ if (c >= 'A' && c <= 'F') {
+ return c - ('A' - 10);
+ }
+ if (c >= 'a' && c <= 'f') {
+ return c - ('a' - 10);
+ }
+ return -1;
+ }
+
+ public boolean end() {
+ return eof && !usePrevious;
+ }
+
+
+ /**
+ * Determine if the source string still contains characters that next()
+ * can consume.
+ * @return true if not yet at the end of the source.
+ */
+ public boolean more() throws JSONException {
+ next();
+ if (end()) {
+ return false;
+ }
+ back();
+ return true;
+ }
+
+
+ /**
+ * Get the next character in the source string.
+ *
+ * @return The next character, or 0 if past the end of the source string.
+ */
+ public char next() throws JSONException {
+ int c;
+ if (this.usePrevious) {
+ this.usePrevious = false;
+ c = this.previous;
+ } else {
+ try {
+ c = this.reader.read();
+ } catch (IOException exception) {
+ throw new JSONException(exception);
+ }
+
+ if (c <= 0) { // End of stream
+ this.eof = true;
+ c = 0;
+ }
+ }
+ this.index += 1;
+ if (this.previous == '\r') {
+ this.line += 1;
+ this.character = c == '\n' ? 0 : 1;
+ } else if (c == '\n') {
+ this.line += 1;
+ this.character = 0;
+ } else {
+ this.character += 1;
+ }
+ this.previous = (char) c;
+ return this.previous;
+ }
+
+
+ /**
+ * Consume the next character, and check that it matches a specified
+ * character.
+ * @param c The character to match.
+ * @return The character.
+ * @throws JSONException if the character does not match.
+ */
+ public char next(char c) throws JSONException {
+ char n = next();
+ if (n != c) {
+ throw syntaxError("Expected '" + c + "' and instead saw '" +
+ n + "'");
+ }
+ return n;
+ }
+
+
+ /**
+ * Get the next n characters.
+ *
+ * @param n The number of characters to take.
+ * @return A string of n characters.
+ * @throws JSONException
+ * Substring bounds error if there are not
+ * n characters remaining in the source string.
+ */
+ public String next(int n) throws JSONException {
+ if (n == 0) {
+ return "";
+ }
+
+ char[] buffer = new char[n];
+ int pos = 0;
+
+ while (pos < n) {
+ buffer[pos] = next();
+ if (end()) {
+ throw syntaxError("Substring bounds error");
+ }
+ pos += 1;
+ }
+ return new String(buffer);
+ }
+
+
+ /**
+ * Get the next char in the string, skipping whitespace.
+ * @throws JSONException
+ * @return A character, or 0 if there are no more characters.
+ */
+ public char nextClean() throws JSONException {
+ for (;;) {
+ char c = next();
+ if (c == 0 || c > ' ') {
+ return c;
+ }
+ }
+ }
+
+
+ /**
+ * Return the characters up to the next close quote character.
+ * Backslash processing is done. The formal JSON format does not
+ * allow strings in single quotes, but an implementation is allowed to
+ * accept them.
+ * @param quote The quoting character, either
+ * " (double quote) or
+ * ' (single quote).
+ * @return A String.
+ * @throws JSONException Unterminated string.
+ */
+ public String nextString(char quote) throws JSONException {
+ char c;
+ StringBuffer sb = new StringBuffer();
+ for (;;) {
+ c = next();
+ switch (c) {
+ case 0:
+ case '\n':
+ case '\r':
+ throw syntaxError("Unterminated string");
+ case '\\':
+ c = next();
+ switch (c) {
+ case 'b':
+ sb.append('\b');
+ break;
+ case 't':
+ sb.append('\t');
+ break;
+ case 'n':
+ sb.append('\n');
+ break;
+ case 'f':
+ sb.append('\f');
+ break;
+ case 'r':
+ sb.append('\r');
+ break;
+ case 'u':
+ sb.append((char)Integer.parseInt(next(4), 16));
+ break;
+ case '"':
+ case '\'':
+ case '\\':
+ case '/':
+ sb.append(c);
+ break;
+ default:
+ throw syntaxError("Illegal escape.");
+ }
+ break;
+ default:
+ if (c == quote) {
+ return sb.toString();
+ }
+ sb.append(c);
+ }
+ }
+ }
+
+
+ /**
+ * Get the text up but not including the specified character or the
+ * end of line, whichever comes first.
+ * @param d A delimiter character.
+ * @return A string.
+ */
+ public String nextTo(char d) throws JSONException {
+ StringBuffer sb = new StringBuffer();
+ for (;;) {
+ char c = next();
+ if (c == d || c == 0 || c == '\n' || c == '\r') {
+ if (c != 0) {
+ back();
+ }
+ return sb.toString().trim();
+ }
+ sb.append(c);
+ }
+ }
+
+
+ /**
+ * Get the text up but not including one of the specified delimiter
+ * characters or the end of line, whichever comes first.
+ * @param delimiters A set of delimiter characters.
+ * @return A string, trimmed.
+ */
+ public String nextTo(String delimiters) throws JSONException {
+ char c;
+ StringBuffer sb = new StringBuffer();
+ for (;;) {
+ c = next();
+ if (delimiters.indexOf(c) >= 0 || c == 0 ||
+ c == '\n' || c == '\r') {
+ if (c != 0) {
+ back();
+ }
+ return sb.toString().trim();
+ }
+ sb.append(c);
+ }
+ }
+
+
+ /**
+ * Get the next value. The value can be a Boolean, Double, Integer,
+ * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
+ * @throws JSONException If syntax error.
+ *
+ * @return An object.
+ */
+ public Object nextValue() throws JSONException {
+ char c = nextClean();
+ String s;
+
+ switch (c) {
+ case '"':
+ case '\'':
+ return nextString(c);
+ case '{':
+ back();
+ return new JSONObject(this);
+ case '[':
+ case '(':
+ back();
+ return new JSONArray(this);
+ }
+
+ /*
+ * Handle unquoted text. This could be the values true, false, or
+ * null, or it can be a number. An implementation (such as this one)
+ * is allowed to also accept non-standard forms.
+ *
+ * Accumulate characters until we reach the end of the text or a
+ * formatting character.
+ */
+
+ StringBuffer sb = new StringBuffer();
+ while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
+ sb.append(c);
+ c = next();
+ }
+ back();
+
+ s = sb.toString().trim();
+ if (s.equals("")) {
+ throw syntaxError("Missing value");
+ }
+ return JSONObject.stringToValue(s);
+ }
+
+
+ /**
+ * Skip characters until the next character is the requested character.
+ * If the requested character is not found, no characters are skipped.
+ * @param to A character to skip to.
+ * @return The requested character, or zero if the requested character
+ * is not found.
+ */
+ public char skipTo(char to) throws JSONException {
+ char c;
+ try {
+ int startIndex = this.index;
+ int startCharacter = this.character;
+ int startLine = this.line;
+ reader.mark(Integer.MAX_VALUE);
+ do {
+ c = next();
+ if (c == 0) {
+ reader.reset();
+ this.index = startIndex;
+ this.character = startCharacter;
+ this.line = startLine;
+ return c;
+ }
+ } while (c != to);
+ } catch (IOException exc) {
+ throw new JSONException(exc);
+ }
+
+ back();
+ return c;
+ }
+
+
+ /**
+ * Make a JSONException to signal a syntax error.
+ *
+ * @param message The error message.
+ * @return A JSONException object, suitable for throwing
+ */
+ public JSONException syntaxError(String message) {
+ return new JSONException(message + toString());
+ }
+
+
+ /**
+ * Make a printable string of this JSONTokener.
+ *
+ * @return " at {index} [character {character} line {line}]"
+ */
+ public String toString() {
+ return " at " + index + " [character " + this.character + " line " + this.line + "]";
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/JSONWriter.java b/gwt/3.3/src/org/json/JSONWriter.java
new file mode 100644
index 000000000..7427fefd7
--- /dev/null
+++ b/gwt/3.3/src/org/json/JSONWriter.java
@@ -0,0 +1,323 @@
+package org.json;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+Copyright (c) 2006 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * JSONWriter provides a quick and convenient way of producing JSON text.
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is
+ * added, so the results are ready for transmission or storage. Each instance of
+ * JSONWriter can produce one JSON text.
+ *
+ * A JSONWriter instance provides a value method for appending
+ * values to the
+ * text, and a key
+ * method for adding keys before values in objects. There are array
+ * and endArray methods that make and bound array values, and
+ * object and endObject methods which make and bound
+ * object values. All of these methods return the JSONWriter instance,
+ * permitting a cascade style. For example,
+ * The first method called must be array or object.
+ * There are no methods for adding commas or colons. JSONWriter adds them for
+ * you. Objects and arrays can be nested up to 20 levels deep.
+ *
+ * This can sometimes be easier than using a JSONObject to build a string.
+ * @author JSON.org
+ * @version 2010-03-11
+ */
+public class JSONWriter {
+ private static final int maxdepth = 20;
+
+ /**
+ * The comma flag determines if a comma should be output before the next
+ * value.
+ */
+ private boolean comma;
+
+ /**
+ * The current mode. Values:
+ * 'a' (array),
+ * 'd' (done),
+ * 'i' (initial),
+ * 'k' (key),
+ * 'o' (object).
+ */
+ protected char mode;
+
+ /**
+ * The object/array stack.
+ */
+ private JSONObject stack[];
+
+ /**
+ * The stack top index. A value of 0 indicates that the stack is empty.
+ */
+ private int top;
+
+ /**
+ * The writer that will receive the output.
+ */
+ protected Writer writer;
+
+ /**
+ * Make a fresh JSONWriter. It can be used to build one JSON text.
+ */
+ public JSONWriter(Writer w) {
+ this.comma = false;
+ this.mode = 'i';
+ this.stack = new JSONObject[maxdepth];
+ this.top = 0;
+ this.writer = w;
+ }
+
+ /**
+ * Append a value.
+ * @param s A string value.
+ * @return this
+ * @throws JSONException If the value is out of sequence.
+ */
+ private JSONWriter append(String s) throws JSONException {
+ if (s == null) {
+ throw new JSONException("Null pointer");
+ }
+ if (this.mode == 'o' || this.mode == 'a') {
+ try {
+ if (this.comma && this.mode == 'a') {
+ this.writer.write(',');
+ }
+ this.writer.write(s);
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ if (this.mode == 'o') {
+ this.mode = 'k';
+ }
+ this.comma = true;
+ return this;
+ }
+ throw new JSONException("Value out of sequence.");
+ }
+
+ /**
+ * Begin appending a new array. All values until the balancing
+ * endArray will be appended to this array. The
+ * endArray method must be called to mark the array's end.
+ * @return this
+ * @throws JSONException If the nesting is too deep, or if the object is
+ * started in the wrong place (for example as a key or after the end of the
+ * outermost array or object).
+ */
+ public JSONWriter array() throws JSONException {
+ if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
+ this.push(null);
+ this.append("[");
+ this.comma = false;
+ return this;
+ }
+ throw new JSONException("Misplaced array.");
+ }
+
+ /**
+ * End something.
+ * @param m Mode
+ * @param c Closing character
+ * @return this
+ * @throws JSONException If unbalanced.
+ */
+ private JSONWriter end(char m, char c) throws JSONException {
+ if (this.mode != m) {
+ throw new JSONException(m == 'a' ? "Misplaced endArray." :
+ "Misplaced endObject.");
+ }
+ this.pop(m);
+ try {
+ this.writer.write(c);
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ this.comma = true;
+ return this;
+ }
+
+ /**
+ * End an array. This method most be called to balance calls to
+ * array.
+ * @return this
+ * @throws JSONException If incorrectly nested.
+ */
+ public JSONWriter endArray() throws JSONException {
+ return this.end('a', ']');
+ }
+
+ /**
+ * End an object. This method most be called to balance calls to
+ * object.
+ * @return this
+ * @throws JSONException If incorrectly nested.
+ */
+ public JSONWriter endObject() throws JSONException {
+ return this.end('k', '}');
+ }
+
+ /**
+ * Append a key. The key will be associated with the next value. In an
+ * object, every value must be preceded by a key.
+ * @param s A key string.
+ * @return this
+ * @throws JSONException If the key is out of place. For example, keys
+ * do not belong in arrays or if the key is null.
+ */
+ public JSONWriter key(String s) throws JSONException {
+ if (s == null) {
+ throw new JSONException("Null key.");
+ }
+ if (this.mode == 'k') {
+ try {
+ stack[top - 1].putOnce(s, Boolean.TRUE);
+ if (this.comma) {
+ this.writer.write(',');
+ }
+ this.writer.write(JSONObject.quote(s));
+ this.writer.write(':');
+ this.comma = false;
+ this.mode = 'o';
+ return this;
+ } catch (IOException e) {
+ throw new JSONException(e);
+ }
+ }
+ throw new JSONException("Misplaced key.");
+ }
+
+
+ /**
+ * Begin appending a new object. All keys and values until the balancing
+ * endObject will be appended to this object. The
+ * endObject method must be called to mark the object's end.
+ * @return this
+ * @throws JSONException If the nesting is too deep, or if the object is
+ * started in the wrong place (for example as a key or after the end of the
+ * outermost array or object).
+ */
+ public JSONWriter object() throws JSONException {
+ if (this.mode == 'i') {
+ this.mode = 'o';
+ }
+ if (this.mode == 'o' || this.mode == 'a') {
+ this.append("{");
+ this.push(new JSONObject());
+ this.comma = false;
+ return this;
+ }
+ throw new JSONException("Misplaced object.");
+
+ }
+
+
+ /**
+ * Pop an array or object scope.
+ * @param c The scope to close.
+ * @throws JSONException If nesting is wrong.
+ */
+ private void pop(char c) throws JSONException {
+ if (this.top <= 0) {
+ throw new JSONException("Nesting error.");
+ }
+ char m = this.stack[this.top - 1] == null ? 'a' : 'k';
+ if (m != c) {
+ throw new JSONException("Nesting error.");
+ }
+ this.top -= 1;
+ this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1] == null ? 'a' : 'k';
+ }
+
+ /**
+ * Push an array or object scope.
+ * @param c The scope to open.
+ * @throws JSONException If nesting is too deep.
+ */
+ private void push(JSONObject jo) throws JSONException {
+ if (this.top >= maxdepth) {
+ throw new JSONException("Nesting too deep.");
+ }
+ this.stack[this.top] = jo;
+ this.mode = jo == null ? 'a' : 'k';
+ this.top += 1;
+ }
+
+
+ /**
+ * Append either the value true or the value
+ * false.
+ * @param b A boolean.
+ * @return this
+ * @throws JSONException
+ */
+ public JSONWriter value(boolean b) throws JSONException {
+ return this.append(b ? "true" : "false");
+ }
+
+ /**
+ * Append a double value.
+ * @param d A double.
+ * @return this
+ * @throws JSONException If the number is not finite.
+ */
+ public JSONWriter value(double d) throws JSONException {
+ return this.value(new Double(d));
+ }
+
+ /**
+ * Append a long value.
+ * @param l A long.
+ * @return this
+ * @throws JSONException
+ */
+ public JSONWriter value(long l) throws JSONException {
+ return this.append(Long.toString(l));
+ }
+
+
+ /**
+ * Append an object value.
+ * @param o The object to append. It can be null, or a Boolean, Number,
+ * String, JSONObject, or JSONArray, or an object with a toJSONString()
+ * method.
+ * @return this
+ * @throws JSONException If the value is out of sequence.
+ */
+ public JSONWriter value(Object o) throws JSONException {
+ return this.append(JSONObject.valueToString(o));
+ }
+}
diff --git a/gwt/3.3/src/org/json/Test.java b/gwt/3.3/src/org/json/Test.java
new file mode 100644
index 000000000..3e41bc737
--- /dev/null
+++ b/gwt/3.3/src/org/json/Test.java
@@ -0,0 +1,678 @@
+package org.json;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.io.StringWriter;
+
+/**
+ * Test class. This file is not formally a member of the org.json library.
+ * It is just a casual test tool.
+ */
+public class Test {
+
+ /**
+ * Entry point.
+ * @param args
+ */
+ public static void main(String args[]) {
+ Iterator it;
+ JSONArray a;
+ JSONObject j;
+ JSONStringer jj;
+ Object o;
+ String s;
+
+ /**
+ * Obj is a typical class that implements JSONString. It also
+ * provides some beanie methods that can be used to
+ * construct a JSONObject. It also demonstrates constructing
+ * a JSONObject with an array of names.
+ */
+ class Obj implements JSONString {
+ public String aString;
+ public double aNumber;
+ public boolean aBoolean;
+
+ public Obj(String string, double n, boolean b) {
+ this.aString = string;
+ this.aNumber = n;
+ this.aBoolean = b;
+ }
+
+ public double getNumber() {
+ return this.aNumber;
+ }
+
+ public String getString() {
+ return this.aString;
+ }
+
+ public boolean isBoolean() {
+ return this.aBoolean;
+ }
+
+ public String getBENT() {
+ return "All uppercase key";
+ }
+
+ public String getX() {
+ return "x";
+ }
+
+ public String toJSONString() {
+ return "{" + JSONObject.quote(this.aString) + ":" +
+ JSONObject.doubleToString(this.aNumber) + "}";
+ }
+ public String toString() {
+ return this.getString() + " " + this.getNumber() + " " +
+ this.isBoolean() + "." + this.getBENT() + " " + this.getX();
+ }
+ }
+
+
+ Obj obj = new Obj("A beany object", 42, true);
+
+ try {
+ s = "[0.1]";
+ a = new JSONArray(s);
+ System.out.println(a.toString());
+ System.out.println("");
+
+ j = XML.toJSONObject(" Ignore the stuff past the end. ");
+ System.out.println(j.toString());
+ System.out.println("");
+
+ j = new JSONObject();
+ o = null;
+ j.put("booga", o);
+ j.put("wooga", JSONObject.NULL);
+ System.out.println(j.toString());
+ System.out.println("");
+
+ j = new JSONObject();
+ j.increment("two");
+ j.increment("two");
+ System.out.println(j.toString());
+ System.out.println("");
+
+
+ s = "";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ s = "{ \"list of lists\" : [ [1, 2, 3], [4, 5, 6], ] }";
+ j = new JSONObject(s);
+ System.out.println(j.toString(4));
+ System.out.println(XML.toString(j));
+
+ s = "Basic breadFlourYeastWaterSaltMix all ingredients together.Knead thoroughly.Cover with a cloth, and leave for one hour in warm room.Knead again.Place in a bread baking tin.Cover with a cloth, and leave for one hour in warm room.Bake in the oven at 180(degrees)C for 30 minutes. ";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(4));
+ System.out.println();
+
+ j = JSONML.toJSONObject(s);
+ System.out.println(j.toString());
+ System.out.println(JSONML.toString(j));
+ System.out.println();
+
+ a = JSONML.toJSONArray(s);
+ System.out.println(a.toString(4));
+ System.out.println(JSONML.toString(a));
+ System.out.println();
+
+ s = "
JSONML is a transformation between JSON and XML that preserves ordering of document features.
JSONML can work with JSON arrays or JSON objects.
Three little words
";
+ j = JSONML.toJSONObject(s);
+ System.out.println(j.toString(4));
+ System.out.println(JSONML.toString(j));
+ System.out.println();
+
+ a = JSONML.toJSONArray(s);
+ System.out.println(a.toString(4));
+ System.out.println(JSONML.toString(a));
+ System.out.println();
+
+ s = "\n Robert\n Smith\n \n 12345 Sixth Ave\n Anytown\n CA\n 98765-4321\n \n ";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(4));
+
+ j = new JSONObject(obj);
+ System.out.println(j.toString());
+
+ s = "{ \"entity\": { \"imageURL\": \"\", \"name\": \"IXXXXXXXXXXXXX\", \"id\": 12336, \"ratingCount\": null, \"averageRating\": null } }";
+ j = new JSONObject(s);
+ System.out.println(j.toString(2));
+
+ jj = new JSONStringer();
+ s = jj
+ .object()
+ .key("single")
+ .value("MARIE HAA'S")
+ .key("Johnny")
+ .value("MARIE HAA\\'S")
+ .key("foo")
+ .value("bar")
+ .key("baz")
+ .array()
+ .object()
+ .key("quux")
+ .value("Thanks, Josh!")
+ .endObject()
+ .endArray()
+ .key("obj keys")
+ .value(JSONObject.getNames(obj))
+ .endObject()
+ .toString();
+ System.out.println(s);
+
+ System.out.println(new JSONStringer()
+ .object()
+ .key("a")
+ .array()
+ .array()
+ .array()
+ .value("b")
+ .endArray()
+ .endArray()
+ .endArray()
+ .endObject()
+ .toString());
+
+ jj = new JSONStringer();
+ jj.array();
+ jj.value(1);
+ jj.array();
+ jj.value(null);
+ jj.array();
+ jj.object();
+ jj.key("empty-array").array().endArray();
+ jj.key("answer").value(42);
+ jj.key("null").value(null);
+ jj.key("false").value(false);
+ jj.key("true").value(true);
+ jj.key("big").value(123456789e+88);
+ jj.key("small").value(123456789e-88);
+ jj.key("empty-object").object().endObject();
+ jj.key("long");
+ jj.value(9223372036854775807L);
+ jj.endObject();
+ jj.value("two");
+ jj.endArray();
+ jj.value(true);
+ jj.endArray();
+ jj.value(98.6);
+ jj.value(-100.0);
+ jj.object();
+ jj.endObject();
+ jj.object();
+ jj.key("one");
+ jj.value(1.00);
+ jj.endObject();
+ jj.value(obj);
+ jj.endArray();
+ System.out.println(jj.toString());
+
+ System.out.println(new JSONArray(jj.toString()).toString(4));
+
+ int ar[] = {1, 2, 3};
+ JSONArray ja = new JSONArray(ar);
+ System.out.println(ja.toString());
+
+ String sa[] = {"aString", "aNumber", "aBoolean"};
+ j = new JSONObject(obj, sa);
+ j.put("Testing JSONString interface", obj);
+ System.out.println(j.toString(4));
+
+ j = new JSONObject("{slashes: '///', closetag: '', backslash:'\\\\', ei: {quotes: '\"\\''},eo: {a: '\"quoted\"', b:\"don't\"}, quotes: [\"'\", '\"']}");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = new JSONObject(
+ "{foo: [true, false,9876543210, 0.0, 1.00000001, 1.000000000001, 1.00000000000000001," +
+ " .00000000000000001, 2.00, 0.1, 2e100, -32,[],{}, \"string\"], " +
+ " to : null, op : 'Good'," +
+ "ten:10} postfix comment");
+ j.put("String", "98.6");
+ j.put("JSONObject", new JSONObject());
+ j.put("JSONArray", new JSONArray());
+ j.put("int", 57);
+ j.put("double", 123456789012345678901234567890.);
+ j.put("true", true);
+ j.put("false", false);
+ j.put("null", JSONObject.NULL);
+ j.put("bool", "true");
+ j.put("zero", -0.0);
+ j.put("\\u2028", "\u2028");
+ j.put("\\u2029", "\u2029");
+ a = j.getJSONArray("foo");
+ a.put(666);
+ a.put(2001.99);
+ a.put("so \"fine\".");
+ a.put("so .");
+ a.put(true);
+ a.put(false);
+ a.put(new JSONArray());
+ a.put(new JSONObject());
+ j.put("keys", JSONObject.getNames(j));
+ System.out.println(j.toString(4));
+ System.out.println(XML.toString(j));
+
+ System.out.println("String: " + j.getDouble("String"));
+ System.out.println(" bool: " + j.getBoolean("bool"));
+ System.out.println(" to: " + j.getString("to"));
+ System.out.println(" true: " + j.getString("true"));
+ System.out.println(" foo: " + j.getJSONArray("foo"));
+ System.out.println(" op: " + j.getString("op"));
+ System.out.println(" ten: " + j.getInt("ten"));
+ System.out.println(" oops: " + j.optBoolean("oops"));
+
+ s = "First \u0009<content> This is \"content\". 3 JSON does not preserve the sequencing of elements and contents. III T H R E EContent text is an implied structure in XML. JSON does not have implied structure:7everything is explicit.!]]>";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja.toString(4));
+ System.out.println(JSONML.toString(ja));
+ System.out.println("");
+
+ s = "unodostrestruequatrocinqoseis";
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja.toString(4));
+ System.out.println(JSONML.toString(ja));
+ System.out.println("");
+
+ s = "";
+ j = XML.toJSONObject(s);
+
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja.toString(4));
+ System.out.println(JSONML.toString(ja));
+ System.out.println("");
+
+ j = XML.toJSONObject("Sample BookThis is chapter 1. It is not very long or interesting.This is chapter 2. Although it is longer than chapter 1, it is not any more interesting.");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = XML.toJSONObject("");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = XML.toJSONObject("Fredfbs0001ScerboB");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = XML.toJSONObject("Repository Address Special Collections LibraryABC UniversityMain Library, 40 Circle DriveOurtown, Pennsylvania17654 USA");
+ System.out.println(j.toString());
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = XML.toJSONObject("deluxe&"toot"&toot;Aeksbonusbonus2");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = HTTP.toJSONObject("GET / HTTP/1.0\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*\nAccept-Language: en-us\nUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T312461; Q312461)\nHost: www.nokko.com\nConnection: keep-alive\nAccept-encoding: gzip, deflate\n");
+ System.out.println(j.toString(2));
+ System.out.println(HTTP.toString(j));
+ System.out.println("");
+
+ j = HTTP.toJSONObject("HTTP/1.1 200 Oki Doki\nDate: Sun, 26 May 2002 17:38:52 GMT\nServer: Apache/1.3.23 (Unix) mod_perl/1.26\nKeep-Alive: timeout=15, max=100\nConnection: Keep-Alive\nTransfer-Encoding: chunked\nContent-Type: text/html\n");
+ System.out.println(j.toString(2));
+ System.out.println(HTTP.toString(j));
+ System.out.println("");
+
+ j = new JSONObject("{nix: null, nux: false, null: 'null', 'Request-URI': '/', Method: 'GET', 'HTTP-Version': 'HTTP/1.0'}");
+ System.out.println(j.toString(2));
+ System.out.println("isNull: " + j.isNull("nix"));
+ System.out.println(" has: " + j.has("nix"));
+ System.out.println(XML.toString(j));
+ System.out.println(HTTP.toString(j));
+ System.out.println("");
+
+ j = XML.toJSONObject(""+"\n\n"+""+
+ ""+
+ "GOOGLEKEY'+search+'010truefalselatin1latin1"+
+ ""+
+ "");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = new JSONObject("{Envelope: {Body: {\"ns1:doGoogleSearch\": {oe: \"latin1\", filter: true, q: \"'+search+'\", key: \"GOOGLEKEY\", maxResults: 10, \"SOAP-ENV:encodingStyle\": \"http://schemas.xmlsoap.org/soap/encoding/\", start: 0, ie: \"latin1\", safeSearch:false, \"xmlns:ns1\": \"urn:GoogleSearch\"}}}}");
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+
+ j = CookieList.toJSONObject(" f%oo = b+l=ah ; o;n%40e = t.wo ");
+ System.out.println(j.toString(2));
+ System.out.println(CookieList.toString(j));
+ System.out.println("");
+
+ j = Cookie.toJSONObject("f%oo=blah; secure ;expires = April 24, 2002");
+ System.out.println(j.toString(2));
+ System.out.println(Cookie.toString(j));
+ System.out.println("");
+
+ j = new JSONObject("{script: 'It is not allowed in HTML to send a close script tag in a stringso we insert a backslash before the /'}");
+ System.out.println(j.toString());
+ System.out.println("");
+
+ JSONTokener jt = new JSONTokener("{op:'test', to:'session', pre:1}{op:'test', to:'session', pre:2}");
+ j = new JSONObject(jt);
+ System.out.println(j.toString());
+ System.out.println("pre: " + j.optInt("pre"));
+ int i = jt.skipTo('{');
+ System.out.println(i);
+ j = new JSONObject(jt);
+ System.out.println(j.toString());
+ System.out.println("");
+
+ a = CDL.toJSONArray("Comma delimited list test, '\"Strip\"Quotes', 'quote, comma', No quotes, 'Single Quotes', \"Double Quotes\"\n1,'2',\"3\"\n,'It is \"good,\"', \"It works.\"\n\n");
+
+ s = CDL.toString(a);
+ System.out.println(s);
+ System.out.println("");
+ System.out.println(a.toString(4));
+ System.out.println("");
+ a = CDL.toJSONArray(s);
+ System.out.println(a.toString(4));
+ System.out.println("");
+
+ a = new JSONArray(" [\"\", next is an implied null , , ok,] ");
+ System.out.println(a.toString());
+ System.out.println("");
+ System.out.println(XML.toString(a));
+ System.out.println("");
+
+ j = new JSONObject("{ fun => with non-standard forms ; forgiving => This package can be used to parse formats that are similar to but not stricting conforming to JSON; why=To make it easier to migrate existing data to JSON,one = [[1.00]]; uno=[[{1=>1}]];'+':+6e66 ;pluses=+++;empty = '' , 'double':0.666,true: TRUE, false: FALSE, null=NULL;[true] = [[!,@;*]]; string=> o. k. ; \r oct=0666; hex=0x666; dec=666; o=0999; noh=0x0x}");
+ System.out.println(j.toString(4));
+ System.out.println("");
+ if (j.getBoolean("true") && !j.getBoolean("false")) {
+ System.out.println("It's all good");
+ }
+
+ System.out.println("");
+ j = new JSONObject(j, new String[] {"dec", "oct", "hex", "missing"});
+ System.out.println(j.toString(4));
+
+ System.out.println("");
+ System.out.println(new JSONStringer().array().value(a).value(j).endArray());
+
+ j = new JSONObject("{string: \"98.6\", long: 2147483648, int: 2147483647, longer: 9223372036854775807, double: 9223372036854775808}");
+ System.out.println(j.toString(4));
+
+ System.out.println("\ngetInt");
+ System.out.println("int " + j.getInt("int"));
+ System.out.println("long " + j.getInt("long"));
+ System.out.println("longer " + j.getInt("longer"));
+ //System.out.println("double " + j.getInt("double"));
+ //System.out.println("string " + j.getInt("string"));
+
+ System.out.println("\ngetLong");
+ System.out.println("int " + j.getLong("int"));
+ System.out.println("long " + j.getLong("long"));
+ System.out.println("longer " + j.getLong("longer"));
+ //System.out.println("double " + j.getLong("double"));
+ //System.out.println("string " + j.getLong("string"));
+
+ System.out.println("\ngetDouble");
+ System.out.println("int " + j.getDouble("int"));
+ System.out.println("long " + j.getDouble("long"));
+ System.out.println("longer " + j.getDouble("longer"));
+ System.out.println("double " + j.getDouble("double"));
+ System.out.println("string " + j.getDouble("string"));
+
+ j.put("good sized", 9223372036854775807L);
+ System.out.println(j.toString(4));
+
+ a = new JSONArray("[2147483647, 2147483648, 9223372036854775807, 9223372036854775808]");
+ System.out.println(a.toString(4));
+
+ System.out.println("\nKeys: ");
+ it = j.keys();
+ while (it.hasNext()) {
+ s = (String)it.next();
+ System.out.println(s + ": " + j.getString(s));
+ }
+
+
+ System.out.println("\naccumulate: ");
+ j = new JSONObject();
+ j.accumulate("stooge", "Curly");
+ j.accumulate("stooge", "Larry");
+ j.accumulate("stooge", "Moe");
+ a = j.getJSONArray("stooge");
+ a.put(5, "Shemp");
+ System.out.println(j.toString(4));
+
+ System.out.println("\nwrite:");
+ System.out.println(j.write(new StringWriter()));
+
+ s = "122333";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(4));
+ System.out.println(XML.toString(j));
+
+ s = "Content of the first chapterContent of the second chapter Content of the first subchapterContent of the second subchapterThird Chapter";
+ j = XML.toJSONObject(s);
+ System.out.println(j.toString(4));
+ System.out.println(XML.toString(j));
+
+ a = JSONML.toJSONArray(s);
+ System.out.println(a.toString(4));
+ System.out.println(JSONML.toString(a));
+
+ Collection c = null;
+ Map m = null;
+
+ j = new JSONObject(m);
+ a = new JSONArray(c);
+ j.append("stooge", "Joe DeRita");
+ j.append("stooge", "Shemp");
+ j.accumulate("stooges", "Curly");
+ j.accumulate("stooges", "Larry");
+ j.accumulate("stooges", "Moe");
+ j.accumulate("stoogearray", j.get("stooges"));
+ j.put("map", m);
+ j.put("collection", c);
+ j.put("array", a);
+ a.put(m);
+ a.put(c);
+ System.out.println(j.toString(4));
+
+ s = "{plist=Apple; AnimalSmells = { pig = piggish; lamb = lambish; worm = wormy; }; AnimalSounds = { pig = oink; lamb = baa; worm = baa; Lisa = \"Why is the worm talking like a lamb?\" } ; AnimalColors = { pig = pink; lamb = black; worm = pink; } } ";
+ j = new JSONObject(s);
+ System.out.println(j.toString(4));
+
+ s = " (\"San Francisco\", \"New York\", \"Seoul\", \"London\", \"Seattle\", \"Shanghai\")";
+ a = new JSONArray(s);
+ System.out.println(a.toString());
+
+ s = "The content of b and The content of cdoremi";
+ j = XML.toJSONObject(s);
+
+ System.out.println(j.toString(2));
+ System.out.println(XML.toString(j));
+ System.out.println("");
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja.toString(4));
+ System.out.println(JSONML.toString(ja));
+ System.out.println("");
+
+ s = "111111111111111";
+ j = JSONML.toJSONObject(s);
+ System.out.println(j);
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja);
+
+
+ System.out.println("\nTesting Exceptions: ");
+
+ System.out.print("Exception: ");
+ try {
+ a = new JSONArray("[\n\r\n\r}");
+ System.out.println(a.toString());
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ System.out.print("Exception: ");
+ try {
+ a = new JSONArray("<\n\r\n\r ");
+ System.out.println(a.toString());
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ System.out.print("Exception: ");
+ try {
+ a = new JSONArray();
+ a.put(Double.NEGATIVE_INFINITY);
+ a.put(Double.NaN);
+ System.out.println(a.toString());
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(j.getDouble("stooge"));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(j.getDouble("howard"));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(j.put(null, "howard"));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(a.getDouble(0));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(a.get(-1));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ System.out.println(a.put(Double.NaN));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ j = XML.toJSONObject(" ");
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ j = XML.toJSONObject(" ");
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ System.out.print("Exception: ");
+ try {
+ j = XML.toJSONObject("";
+ ja = JSONML.toJSONArray(s);
+ System.out.println(ja.toString(4));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ System.out.print("Exception: ");
+ try {
+ s = "{\"koda\": true, \"koda\": true}";
+ j = new JSONObject(s);
+ System.out.println(j.toString(4));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ System.out.print("Exception: ");
+ try {
+ jj = new JSONStringer();
+ s = jj
+ .object()
+ .key("bosanda")
+ .value("MARIE HAA'S")
+ .key("bosanda")
+ .value("MARIE HAA\\'S")
+ .endObject()
+ .toString();
+ System.out.println(j.toString(4));
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ } catch (Exception e) {
+ System.out.println(e.toString());
+ }
+ }
+}
diff --git a/gwt/3.3/src/org/json/XML.java b/gwt/3.3/src/org/json/XML.java
new file mode 100644
index 000000000..ba5ad148f
--- /dev/null
+++ b/gwt/3.3/src/org/json/XML.java
@@ -0,0 +1,441 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+import java.util.Iterator;
+
+
+/**
+ * This provides static methods to convert an XML text into a JSONObject,
+ * and to covert a JSONObject into an XML text.
+ * @author JSON.org
+ * @version 2010-04-08
+ */
+public class XML {
+
+ /** The Character '&'. */
+ public static final Character AMP = new Character('&');
+
+ /** The Character '''. */
+ public static final Character APOS = new Character('\'');
+
+ /** The Character '!'. */
+ public static final Character BANG = new Character('!');
+
+ /** The Character '='. */
+ public static final Character EQ = new Character('=');
+
+ /** The Character '>'. */
+ public static final Character GT = new Character('>');
+
+ /** The Character '<'. */
+ public static final Character LT = new Character('<');
+
+ /** The Character '?'. */
+ public static final Character QUEST = new Character('?');
+
+ /** The Character '"'. */
+ public static final Character QUOT = new Character('"');
+
+ /** The Character '/'. */
+ public static final Character SLASH = new Character('/');
+
+ /**
+ * Replace special characters with XML escapes:
+ *
+ * & (ampersand) is replaced by &
+ * < (less than) is replaced by <
+ * > (greater than) is replaced by >
+ * " (double quote) is replaced by "
+ *
+ * @param string The string to be escaped.
+ * @return The escaped string.
+ */
+ public static String escape(String string) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0, len = string.length(); i < len; i++) {
+ char c = string.charAt(i);
+ switch (c) {
+ case '&':
+ sb.append("&");
+ break;
+ case '<':
+ sb.append("<");
+ break;
+ case '>':
+ sb.append(">");
+ break;
+ case '"':
+ sb.append(""");
+ break;
+ default:
+ sb.append(c);
+ }
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Throw an exception if the string contains whitespace.
+ * Whitespace is not allowed in tagNames and attributes.
+ * @param string
+ * @throws JSONException
+ */
+ public static void noSpace(String string) throws JSONException {
+ int i, length = string.length();
+ if (length == 0) {
+ throw new JSONException("Empty string.");
+ }
+ for (i = 0; i < length; i += 1) {
+ if (Character.isWhitespace(string.charAt(i))) {
+ throw new JSONException("'" + string +
+ "' contains a space character.");
+ }
+ }
+ }
+
+ /**
+ * Scan the content following the named tag, attaching it to the context.
+ * @param x The XMLTokener containing the source string.
+ * @param context The JSONObject that will include the new material.
+ * @param name The tag name.
+ * @return true if the close tag is processed.
+ * @throws JSONException
+ */
+ private static boolean parse(XMLTokener x, JSONObject context,
+ String name) throws JSONException {
+ char c;
+ int i;
+ String n;
+ JSONObject o = null;
+ String s;
+ Object t;
+
+// Test for and skip past these forms:
+//
+//
+//
+// ... ?>
+// Report errors for these forms:
+// <>
+// <=
+// <<
+
+ t = x.nextToken();
+
+// ");
+ return false;
+ }
+ x.back();
+ } else if (c == '[') {
+ t = x.nextToken();
+ if (t.equals("CDATA")) {
+ if (x.next() == '[') {
+ s = x.nextCDATA();
+ if (s.length() > 0) {
+ context.accumulate("content", s);
+ }
+ return false;
+ }
+ }
+ throw x.syntaxError("Expected 'CDATA['");
+ }
+ i = 1;
+ do {
+ t = x.nextMeta();
+ if (t == null) {
+ throw x.syntaxError("Missing '>' after ' 0);
+ return false;
+ } else if (t == QUEST) {
+
+//
+
+ x.skipPast("?>");
+ return false;
+ } else if (t == SLASH) {
+
+// Close tag
+
+ t = x.nextToken();
+ if (name == null) {
+ throw x.syntaxError("Mismatched close tag" + t);
+ }
+ if (!t.equals(name)) {
+ throw x.syntaxError("Mismatched " + name + " and " + t);
+ }
+ if (x.nextToken() != GT) {
+ throw x.syntaxError("Misshaped close tag");
+ }
+ return true;
+
+ } else if (t instanceof Character) {
+ throw x.syntaxError("Misshaped tag");
+
+// Open tag <
+
+ } else {
+ n = (String)t;
+ t = null;
+ o = new JSONObject();
+ for (;;) {
+ if (t == null) {
+ t = x.nextToken();
+ }
+
+// attribute = value
+
+ if (t instanceof String) {
+ s = (String)t;
+ t = x.nextToken();
+ if (t == EQ) {
+ t = x.nextToken();
+ if (!(t instanceof String)) {
+ throw x.syntaxError("Missing value");
+ }
+ o.accumulate(s, JSONObject.stringToValue((String)t));
+ t = null;
+ } else {
+ o.accumulate(s, "");
+ }
+
+// Empty tag <.../>
+
+ } else if (t == SLASH) {
+ if (x.nextToken() != GT) {
+ throw x.syntaxError("Misshaped tag");
+ }
+ if (o.length() > 0) {
+ context.accumulate(n, o);
+ } else {
+ context.accumulate(n, "");
+ }
+ return false;
+
+// Content, between <...> and
+
+ } else if (t == GT) {
+ for (;;) {
+ t = x.nextContent();
+ if (t == null) {
+ if (n != null) {
+ throw x.syntaxError("Unclosed tag " + n);
+ }
+ return false;
+ } else if (t instanceof String) {
+ s = (String)t;
+ if (s.length() > 0) {
+ o.accumulate("content", JSONObject.stringToValue(s));
+ }
+
+// Nested element
+
+ } else if (t == LT) {
+ if (parse(x, o, n)) {
+ if (o.length() == 0) {
+ context.accumulate(n, "");
+ } else if (o.length() == 1 &&
+ o.opt("content") != null) {
+ context.accumulate(n, o.opt("content"));
+ } else {
+ context.accumulate(n, o);
+ }
+ return false;
+ }
+ }
+ }
+ } else {
+ throw x.syntaxError("Misshaped tag");
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Convert a well-formed (but not necessarily valid) XML string into a
+ * JSONObject. Some information may be lost in this transformation
+ * because JSON is a data format and XML is a document format. XML uses
+ * elements, attributes, and content text, while JSON uses unordered
+ * collections of name/value pairs and arrays of values. JSON does not
+ * does not like to distinguish between elements and attributes.
+ * Sequences of similar elements are represented as JSONArrays. Content
+ * text may be placed in a "content" member. Comments, prologs, DTDs, and
+ * <[ [ ]]> are ignored.
+ * @param string The source string.
+ * @return A JSONObject containing the structured data from the XML string.
+ * @throws JSONException
+ */
+ public static JSONObject toJSONObject(String string) throws JSONException {
+ JSONObject o = new JSONObject();
+ XMLTokener x = new XMLTokener(string);
+ while (x.more() && x.skipPast("<")) {
+ parse(x, o, null);
+ }
+ return o;
+ }
+
+
+ /**
+ * Convert a JSONObject into a well-formed, element-normal XML string.
+ * @param o A JSONObject.
+ * @return A string.
+ * @throws JSONException
+ */
+ public static String toString(Object o) throws JSONException {
+ return toString(o, null);
+ }
+
+
+ /**
+ * Convert a JSONObject into a well-formed, element-normal XML string.
+ * @param o A JSONObject.
+ * @param tagName The optional name of the enclosing tag.
+ * @return A string.
+ * @throws JSONException
+ */
+ public static String toString(Object o, String tagName)
+ throws JSONException {
+ StringBuffer b = new StringBuffer();
+ int i;
+ JSONArray ja;
+ JSONObject jo;
+ String k;
+ Iterator keys;
+ int len;
+ String s;
+ Object v;
+ if (o instanceof JSONObject) {
+
+// Emit
+
+ if (tagName != null) {
+ b.append('<');
+ b.append(tagName);
+ b.append('>');
+ }
+
+// Loop thru the keys.
+
+ jo = (JSONObject)o;
+ keys = jo.keys();
+ while (keys.hasNext()) {
+ k = keys.next().toString();
+ v = jo.opt(k);
+ if (v == null) {
+ v = "";
+ }
+ if (v instanceof String) {
+ s = (String)v;
+ } else {
+ s = null;
+ }
+
+// Emit content in body
+
+ if (k.equals("content")) {
+ if (v instanceof JSONArray) {
+ ja = (JSONArray)v;
+ len = ja.length();
+ for (i = 0; i < len; i += 1) {
+ if (i > 0) {
+ b.append('\n');
+ }
+ b.append(escape(ja.get(i).toString()));
+ }
+ } else {
+ b.append(escape(v.toString()));
+ }
+
+// Emit an array of similar keys
+
+ } else if (v instanceof JSONArray) {
+ ja = (JSONArray)v;
+ len = ja.length();
+ for (i = 0; i < len; i += 1) {
+ v = ja.get(i);
+ if (v instanceof JSONArray) {
+ b.append('<');
+ b.append(k);
+ b.append('>');
+ b.append(toString(v));
+ b.append("");
+ b.append(k);
+ b.append('>');
+ } else {
+ b.append(toString(v, k));
+ }
+ }
+ } else if (v.equals("")) {
+ b.append('<');
+ b.append(k);
+ b.append("/>");
+
+// Emit a new tag
+
+ } else {
+ b.append(toString(v, k));
+ }
+ }
+ if (tagName != null) {
+
+// Emit the close tag
+
+ b.append("");
+ b.append(tagName);
+ b.append('>');
+ }
+ return b.toString();
+
+// XML does not have good support for arrays. If an array appears in a place
+// where XML is lacking, synthesize an element.
+
+ } else if (o instanceof JSONArray) {
+ ja = (JSONArray)o;
+ len = ja.length();
+ for (i = 0; i < len; ++i) {
+ v = ja.opt(i);
+ b.append(toString(v, (tagName == null) ? "array" : tagName));
+ }
+ return b.toString();
+ } else {
+ s = (o == null) ? "null" : escape(o.toString());
+ return (tagName == null) ? "\"" + s + "\"" :
+ (s.length() == 0) ? "<" + tagName + "/>" :
+ "<" + tagName + ">" + s + "" + tagName + ">";
+ }
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/org/json/XMLTokener.java b/gwt/3.3/src/org/json/XMLTokener.java
new file mode 100644
index 000000000..501cdad27
--- /dev/null
+++ b/gwt/3.3/src/org/json/XMLTokener.java
@@ -0,0 +1,365 @@
+package org.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+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 shall be used for Good, not Evil.
+
+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.
+*/
+
+/**
+ * The XMLTokener extends the JSONTokener to provide additional methods
+ * for the parsing of XML texts.
+ * @author JSON.org
+ * @version 2010-01-30
+ */
+public class XMLTokener extends JSONTokener {
+
+
+ /** The table of entity values. It initially contains Character values for
+ * amp, apos, gt, lt, quot.
+ */
+ public static final java.util.HashMap entity;
+
+ static {
+ entity = new java.util.HashMap(8);
+ entity.put("amp", XML.AMP);
+ entity.put("apos", XML.APOS);
+ entity.put("gt", XML.GT);
+ entity.put("lt", XML.LT);
+ entity.put("quot", XML.QUOT);
+ }
+
+ /**
+ * Construct an XMLTokener from a string.
+ * @param s A source string.
+ */
+ public XMLTokener(String s) {
+ super(s);
+ }
+
+ /**
+ * Get the text in the CDATA block.
+ * @return The string up to the ]]>.
+ * @throws JSONException If the ]]> is not found.
+ */
+ public String nextCDATA() throws JSONException {
+ char c;
+ int i;
+ StringBuffer sb = new StringBuffer();
+ for (;;) {
+ c = next();
+ if (end()) {
+ throw syntaxError("Unclosed CDATA");
+ }
+ sb.append(c);
+ i = sb.length() - 3;
+ if (i >= 0 && sb.charAt(i) == ']' &&
+ sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') {
+ sb.setLength(i);
+ return sb.toString();
+ }
+ }
+ }
+
+
+ /**
+ * Get the next XML outer token, trimming whitespace. There are two kinds
+ * of tokens: the '<' character which begins a markup tag, and the content
+ * text between markup tags.
+ *
+ * @return A string, or a '<' Character, or null if there is no more
+ * source text.
+ * @throws JSONException
+ */
+ public Object nextContent() throws JSONException {
+ char c;
+ StringBuffer sb;
+ do {
+ c = next();
+ } while (Character.isWhitespace(c));
+ if (c == 0) {
+ return null;
+ }
+ if (c == '<') {
+ return XML.LT;
+ }
+ sb = new StringBuffer();
+ for (;;) {
+ if (c == '<' || c == 0) {
+ back();
+ return sb.toString().trim();
+ }
+ if (c == '&') {
+ sb.append(nextEntity(c));
+ } else {
+ sb.append(c);
+ }
+ c = next();
+ }
+ }
+
+
+ /**
+ * Return the next entity. These entities are translated to Characters:
+ * & ' > < ".
+ * @param a An ampersand character.
+ * @return A Character or an entity String if the entity is not recognized.
+ * @throws JSONException If missing ';' in XML entity.
+ */
+ public Object nextEntity(char a) throws JSONException {
+ StringBuffer sb = new StringBuffer();
+ for (;;) {
+ char c = next();
+ if (Character.isLetterOrDigit(c) || c == '#') {
+ sb.append(Character.toLowerCase(c));
+ } else if (c == ';') {
+ break;
+ } else {
+ throw syntaxError("Missing ';' in XML entity: &" + sb);
+ }
+ }
+ String s = sb.toString();
+ Object e = entity.get(s);
+ return e != null ? e : a + s + ";";
+ }
+
+
+ /**
+ * Returns the next XML meta token. This is used for skipping over
+ * and ...?> structures.
+ * @return Syntax characters (< > / = ! ?) are returned as
+ * Character, and strings and names are returned as Boolean. We don't care
+ * what the values actually are.
+ * @throws JSONException If a string is not properly closed or if the XML
+ * is badly structured.
+ */
+ public Object nextMeta() throws JSONException {
+ char c;
+ char q;
+ do {
+ c = next();
+ } while (Character.isWhitespace(c));
+ switch (c) {
+ case 0:
+ throw syntaxError("Misshaped meta tag");
+ case '<':
+ return XML.LT;
+ case '>':
+ return XML.GT;
+ case '/':
+ return XML.SLASH;
+ case '=':
+ return XML.EQ;
+ case '!':
+ return XML.BANG;
+ case '?':
+ return XML.QUEST;
+ case '"':
+ case '\'':
+ q = c;
+ for (;;) {
+ c = next();
+ if (c == 0) {
+ throw syntaxError("Unterminated string");
+ }
+ if (c == q) {
+ return Boolean.TRUE;
+ }
+ }
+ default:
+ for (;;) {
+ c = next();
+ if (Character.isWhitespace(c)) {
+ return Boolean.TRUE;
+ }
+ switch (c) {
+ case 0:
+ case '<':
+ case '>':
+ case '/':
+ case '=':
+ case '!':
+ case '?':
+ case '"':
+ case '\'':
+ back();
+ return Boolean.TRUE;
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Get the next XML Token. These tokens are found inside of angle
+ * brackets. It may be one of these characters: / > = ! ? or it
+ * may be a string wrapped in single quotes or double quotes, or it may be a
+ * name.
+ * @return a String or a Character.
+ * @throws JSONException If the XML is not well formed.
+ */
+ public Object nextToken() throws JSONException {
+ char c;
+ char q;
+ StringBuffer sb;
+ do {
+ c = next();
+ } while (Character.isWhitespace(c));
+ switch (c) {
+ case 0:
+ throw syntaxError("Misshaped element");
+ case '<':
+ throw syntaxError("Misplaced '<'");
+ case '>':
+ return XML.GT;
+ case '/':
+ return XML.SLASH;
+ case '=':
+ return XML.EQ;
+ case '!':
+ return XML.BANG;
+ case '?':
+ return XML.QUEST;
+
+// Quoted string
+
+ case '"':
+ case '\'':
+ q = c;
+ sb = new StringBuffer();
+ for (;;) {
+ c = next();
+ if (c == 0) {
+ throw syntaxError("Unterminated string");
+ }
+ if (c == q) {
+ return sb.toString();
+ }
+ if (c == '&') {
+ sb.append(nextEntity(c));
+ } else {
+ sb.append(c);
+ }
+ }
+ default:
+
+// Name
+
+ sb = new StringBuffer();
+ for (;;) {
+ sb.append(c);
+ c = next();
+ if (Character.isWhitespace(c)) {
+ return sb.toString();
+ }
+ switch (c) {
+ case 0:
+ return sb.toString();
+ case '>':
+ case '/':
+ case '=':
+ case '!':
+ case '?':
+ case '[':
+ case ']':
+ back();
+ return sb.toString();
+ case '<':
+ case '"':
+ case '\'':
+ throw syntaxError("Bad character in a name");
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Skip characters until past the requested string.
+ * If it is not found, we are left at the end of the source with a result of false.
+ * @param to A string to skip past.
+ * @throws JSONException
+ */
+ public boolean skipPast(String to) throws JSONException {
+ boolean b;
+ char c;
+ int i;
+ int j;
+ int offset = 0;
+ int n = to.length();
+ char[] circle = new char[n];
+
+ /*
+ * First fill the circle buffer with as many characters as are in the
+ * to string. If we reach an early end, bail.
+ */
+
+ for (i = 0; i < n; i += 1) {
+ c = next();
+ if (c == 0) {
+ return false;
+ }
+ circle[i] = c;
+ }
+ /*
+ * We will loop, possibly for all of the remaining characters.
+ */
+ for (;;) {
+ j = offset;
+ b = true;
+ /*
+ * Compare the circle buffer with the to string.
+ */
+ for (i = 0; i < n; i += 1) {
+ if (circle[j] != to.charAt(i)) {
+ b = false;
+ break;
+ }
+ j += 1;
+ if (j >= n) {
+ j -= n;
+ }
+ }
+ /*
+ * If we exit the loop with b intact, then victory is ours.
+ */
+ if (b) {
+ return true;
+ }
+ /*
+ * Get the next character. If there isn't one, then defeat is ours.
+ */
+ c = next();
+ if (c == 0) {
+ return false;
+ }
+ /*
+ * Shove the character in the circle buffer and advance the
+ * circle offset. The offset is mod n.
+ */
+ circle[offset] = c;
+ offset += 1;
+ if (offset >= n) {
+ offset -= n;
+ }
+ }
+ }
+}
diff --git a/gwt/3.3/src/pubnub/api/Callback.java b/gwt/3.3/src/pubnub/api/Callback.java
new file mode 100644
index 000000000..cd7d9c97e
--- /dev/null
+++ b/gwt/3.3/src/pubnub/api/Callback.java
@@ -0,0 +1,16 @@
+package pubnub.api;
+
+public interface Callback {
+
+ public abstract boolean subscribeCallback(String channel, Object message);
+
+ public abstract boolean presenceCallback(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);
+}
diff --git a/gwt/3.3/src/pubnub/api/Pubnub.java b/gwt/3.3/src/pubnub/api/Pubnub.java
new file mode 100644
index 000000000..890d3a0d1
--- /dev/null
+++ b/gwt/3.3/src/pubnub/api/Pubnub.java
@@ -0,0 +1,1424 @@
+package pubnub.api;
+
+import com.ning.http.client.*;
+import com.ning.http.client.AsyncHttpClientConfig.Builder;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.net.URLEncoder;
+import java.util.*;
+import java.util.concurrent.Future;
+import java.util.zip.GZIPInputStream;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.math.BigInteger;
+import java.security.Key;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Iterator;
+
+import javax.crypto.Cipher;
+import javax.crypto.CipherInputStream;
+import javax.crypto.CipherOutputStream;
+import javax.crypto.Mac;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * PubNub 3.2 Real-time Push Cloud API
+ *
+ * @author Stephen Blum 3.1
+ * @author Leonardo Redmond 3.2 Revision
+ * @package pubnub.api
+ */
+public class Pubnub {
+ private String ORIGIN = "pubsub.pubnub.com";
+ private String PUBLISH_KEY = "";
+ private String SUBSCRIBE_KEY = "";
+ private String SECRET_KEY = "";
+ public String CIPHER_KEY = "";
+ private boolean SSL = false;
+ private String sessionUUID = "";
+ private String parameters = "";
+
+ private class ChannelStatus {
+ String channel;
+ boolean connected, first;
+ }
+
+ private List subscriptions;
+
+ /**
+ * PubNub 3.1 with Cipher Key
+ *
+ * Prepare PubNub State.
+ *
+ * @param String
+ * Publish Key.
+ * @param String
+ * Subscribe Key.
+ * @param String
+ * Secret Key.
+ * @param String
+ * Cipher Key.
+ * @param boolean SSL Enabled.
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on) {
+ this.init(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
+ }
+
+ /**
+ * PubNub 3.0
+ *
+ * Prepare PubNub Class State.
+ *
+ * @param String
+ * Publish Key.
+ * @param String
+ * Subscribe Key.
+ * @param String
+ * Secret Key.
+ * @param boolean SSL Enabled.
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ boolean ssl_on) {
+ this.init(publish_key, subscribe_key, secret_key, "", ssl_on);
+ }
+
+ /**
+ * PubNub 2.0 Compatibility
+ *
+ * Prepare PubNub Class State.
+ *
+ * @param String
+ * Publish Key.
+ * @param String
+ * Subscribe Key.
+ */
+ public Pubnub(String publish_key, String subscribe_key) {
+ this.init(publish_key, subscribe_key, "", "", false);
+ }
+
+ /**
+ * PubNub 3.0 without SSL
+ *
+ * Prepare PubNub Class State.
+ *
+ * @param String
+ * Publish Key.
+ * @param String
+ * Subscribe Key.
+ * @param String
+ * Secret Key.
+ */
+ public Pubnub(String publish_key, String subscribe_key, String secret_key) {
+ this.init(publish_key, subscribe_key, secret_key, "", false);
+ }
+
+ /**
+ * Init
+ *
+ * Prepare PubNub Class State.
+ *
+ * @param String
+ * Publish Key.
+ * @param String
+ * Subscribe Key.
+ * @param String
+ * Secret Key.
+ * @param String
+ * Cipher Key.
+ * @param boolean SSL Enabled.
+ */
+ public void init(String publish_key, String subscribe_key,
+ String secret_key, String cipher_key, boolean ssl_on) {
+ this.PUBLISH_KEY = publish_key;
+ this.SUBSCRIBE_KEY = subscribe_key;
+ this.SECRET_KEY = secret_key;
+ this.CIPHER_KEY = cipher_key;
+ this.SSL = ssl_on;
+
+ if (this.sessionUUID.equals(""))
+ sessionUUID = UUID.randomUUID().toString();
+ // SSL On?
+ if (this.SSL) {
+ this.ORIGIN = "https://" + this.ORIGIN;
+ } else {
+ this.ORIGIN = "https://" + this.ORIGIN;
+ }
+ }
+
+ /**
+ * Publish
+ *
+ * Send a message to a channel.
+ *
+ * @param String
+ * channel name.
+ * @param JSONObject
+ * message.
+ * @return JSONArray.
+ */
+ public JSONArray publish(String channel, JSONObject message) {
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", message);
+ return publish(args);
+ }
+
+ /**
+ * Publish
+ *
+ * Send a message to a channel.
+ *
+ * @param HashMap
+ * containing channel name, message.
+ * @return JSONArray.
+ */
+ public JSONArray publish(HashMap args) {
+
+ String channel = (String) args.get("channel");
+ Object message = args.get("message");
+
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ if (this.CIPHER_KEY.length() > 0) {
+ // Encrypt Message
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ message = pc.encrypt(obj);
+ } else {
+ message = obj;
+ }
+ // System.out.println();
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ if (this.CIPHER_KEY.length() > 0) {
+ // Encrypt Message
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ try {
+ message = pc.encrypt(obj);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ message = obj;
+ }
+ message = "\"" + message + "\"";
+
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+
+ if (this.CIPHER_KEY.length() > 0) {
+ // Encrypt Message
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ message = pc.encryptJSONArray(obj);
+ } else {
+ message = obj;
+ }
+ System.out.println();
+ }
+
+ // Generate String to Sign
+ String signature = "0";
+
+ if (this.SECRET_KEY.length() > 0) {
+ StringBuilder string_to_sign = new StringBuilder();
+ string_to_sign.append(this.PUBLISH_KEY).append('/')
+ .append(this.SUBSCRIBE_KEY).append('/')
+ .append(this.SECRET_KEY).append('/').append(channel)
+ .append('/').append(message.toString());
+
+ // Sign Message
+ signature = PubnubCrypto.getHMacSHA256(this.SECRET_KEY,
+ string_to_sign.toString());
+ }
+
+ // Build URL
+ List url = new ArrayList();
+ url.add("publish");
+ url.add(this.PUBLISH_KEY);
+ url.add(this.SUBSCRIBE_KEY);
+ url.add(signature);
+ url.add(channel);
+ url.add("0");
+ url.add(message.toString());
+
+ return _request(url);
+ }
+
+ /**
+ * Subscribe
+ *
+ * Listen for a message on a channel.
+ *
+ * @param String
+ * channel name.
+ * @param Callback
+ * function callback.
+ */
+ public void subscribe(String channel, Callback callback) {
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("callback", callback);
+ subscribe(args);
+ }
+
+ /**
+ * Subscribe
+ *
+ * Listen for a message on a channel.
+ *
+ * @param HashMap
+ * containing channel name, function callback.
+ */
+ public void subscribe(HashMap args) {
+ args.put("timetoken", "0");
+ this._subscribe(args);
+ }
+
+ /**
+ * Subscribe - Private Interface
+ *
+ * Patch provided by petereddy on GitHub
+ *
+ * @param HashMap
+ * containing channel name, function callback,
+ * timetoken.
+ */
+ private void _subscribe(HashMap args) {
+
+ String channel = (String) args.get("channel");
+ String timetoken = (String) args.get("timetoken");
+ Callback callback;
+
+ // Validate Arguments
+ if (args.get("callback") != null) {
+ callback = (Callback) args.get("callback");
+ } else {
+ System.out.println("Invalid Callback.");
+ return;
+ }
+
+ if (channel == null || channel.equals("")) {
+ callback.errorCallback(channel, "Invalid Channel.");
+ return;
+ }
+
+ // Ensure Single Connection
+ if (subscriptions != null && subscriptions.size() > 0) {
+ boolean channel_exist = false;
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ channel_exist = true;
+ break;
+ }
+ }
+ if (!channel_exist) {
+ ChannelStatus cs = new ChannelStatus();
+ cs.channel = channel;
+ cs.connected = true;
+ subscriptions.add(cs);
+ } else {
+ callback.errorCallback(channel, "Already Connected");
+ return;
+ }
+ } else {
+ // New Channel
+ ChannelStatus cs = new ChannelStatus();
+ cs.channel = channel;
+ cs.connected = true;
+ subscriptions = new ArrayList();
+ subscriptions.add(cs);
+ }
+
+ while (true) {
+ try {
+ // Build URL
+ List url = java.util.Arrays.asList("subscribe",
+ this.SUBSCRIBE_KEY, channel, "0", timetoken);
+
+ // Stop Connection?
+ boolean is_disconnect = false;
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (!it.connected) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ is_disconnect = true;
+ break;
+ }
+ }
+ }
+ if (is_disconnect)
+ return;
+
+ // Wait for Message
+ JSONArray response = _request(url);
+
+ // Stop Connection?
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (!it.connected) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ is_disconnect = true;
+ break;
+ }
+ }
+ }
+
+ if (is_disconnect)
+ return;
+
+ // Problem?
+ if (response == null || response.optInt(1) == 0) {
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (it.connected && it.first) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ } else {
+ subscriptions.remove(it);
+ callback.errorCallback(channel,
+ "Lost Network Connection");
+ }
+ }
+
+ }
+ // Ensure Connected (Call Time Function)
+ boolean is_reconnected = false;
+ while (true) {
+ double time_token = this.time();
+ if (time_token == 0.0) {
+
+ Thread.sleep(5000);
+ } else {
+ // Reconnect Callback
+ callback.reconnectCallback(channel);
+ // this._subscribe(args);
+ is_reconnected = true;
+ break;
+ }
+ }
+ if (is_reconnected) {
+ continue;
+ }
+ } else {
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ // Connect Callback
+ if (!it.first) {
+ it.first = true;
+ callback.connectCallback(channel);
+
+ break;
+ }
+ }
+ }
+ }
+
+ JSONArray messages = response.optJSONArray(0);
+
+ // Update TimeToken
+ if (response.optString(1).length() > 0)
+ timetoken = response.optString(1);
+
+ for (int i = 0; messages.length() > i; i++) {
+ JSONObject message = messages.optJSONObject(i);
+ if (message != null) {
+
+ if (this.CIPHER_KEY.length() > 0) {
+ // Decrypt Message
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ message = pc.decrypt(message);
+ }
+ if (callback != null)
+ if (!callback.subscribeCallback(channel, message)) return;
+ } else {
+
+ JSONArray arr = messages.optJSONArray(i);
+ if (arr != null) {
+ if (this.CIPHER_KEY.length() > 0) {
+ PubnubCrypto pc = new PubnubCrypto(
+ this.CIPHER_KEY);
+ arr = pc.decryptJSONArray(arr);
+ ;
+ }
+ if (callback != null)
+ if (!callback.subscribeCallback(channel, arr)) return;
+ } else {
+ String msgs = messages.getString(0);
+ if (this.CIPHER_KEY.length() > 0) {
+ PubnubCrypto pc = new PubnubCrypto(
+ this.CIPHER_KEY);
+ msgs = pc.decrypt(msgs);
+ }
+ if (callback != null)
+ if (!callback.subscribeCallback(channel, msgs)) return;
+ }
+ }
+ }
+ } catch (Exception e) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ie) {
+ }
+ }
+ }
+ }
+
+ /**
+ * Presence
+ *
+ * Listen for a message on a channel & add presence info.
+ *
+ * @param String
+ * channel name.
+ * @param Callback
+ * function callback.
+ */
+ public void presence(String channel, Callback callback) {
+ HashMap args = new HashMap(2);
+ args.put("channel", channel + "-pnpres");
+ args.put("callback", callback);
+ subscribe(args);
+ }
+
+ /**
+ * Presence
+ *
+ * Listen for a message on a channel & add presence info.
+ *
+ * @param HashMap
+ * containing channel name, function callback.
+ */
+ public void presence(HashMap args) {
+ args.put("timetoken", "0");
+ this._presence(args);
+ }
+
+ /**
+ * Presence - Private Interface
+ *
+ * Implemented by Leonardo Redmond on GitHub
+ *
+ * @param HashMap
+ * containing channel name, function callback,
+ * timetoken.
+ */
+ private void _presence(HashMap args) {
+
+ String channel = (String) args.get("channel");
+ String timetoken = (String) args.get("timetoken");
+ Callback callback;
+
+ // Validate Arguments
+ if (args.get("callback") != null) {
+ callback = (Callback) args.get("callback");
+ } else {
+ System.out.println("Invalid Callback.");
+ return;
+ }
+
+ if (channel == null || channel.equals("")) {
+ callback.errorCallback(channel, "Invalid Channel.");
+ return;
+ }
+
+ // Ensure Single Connection
+ if (subscriptions != null && subscriptions.size() > 0) {
+ boolean channel_exist = false;
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ channel_exist = true;
+ break;
+ }
+ }
+ if (!channel_exist) {
+ ChannelStatus cs = new ChannelStatus();
+ cs.channel = channel;
+ cs.connected = true;
+ subscriptions.add(cs);
+ } else {
+ callback.errorCallback(channel, "Already Connected");
+ return;
+ }
+ } else {
+ // New Channel
+ ChannelStatus cs = new ChannelStatus();
+ cs.channel = channel;
+ cs.connected = true;
+ subscriptions = new ArrayList();
+ subscriptions.add(cs);
+ }
+
+ while (true) {
+ try {
+ // Build URL
+ List url = java.util.Arrays.asList("subscribe",
+ this.SUBSCRIBE_KEY, channel, "0", timetoken);
+
+ // Stop Connection?
+ boolean is_disconnect = false;
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (!it.connected) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ is_disconnect = true;
+ break;
+ }
+ }
+ }
+ if (is_disconnect)
+ return;
+
+ // Wait for Message
+ JSONArray response = _request(url);
+
+ // Stop Connection?
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (!it.connected) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ is_disconnect = true;
+ break;
+ }
+ }
+ }
+
+ if (is_disconnect)
+ return;
+
+ // Problem?
+ if (response == null || response.optInt(1) == 0) {
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ if (it.connected && it.first) {
+ subscriptions.remove(it);
+ callback.disconnectCallback(channel);
+ } else {
+ subscriptions.remove(it);
+ callback.errorCallback(channel,
+ "Lost Network Connection");
+ }
+ }
+
+ }
+ // Ensure Connected (Call Time Function)
+ boolean is_reconnected = false;
+ while (true) {
+ double time_token = this.time();
+ if (time_token == 0.0) {
+
+ Thread.sleep(5000);
+ } else {
+ // Reconnect Callback
+ callback.reconnectCallback(channel);
+ // this._subscribe(args);
+ is_reconnected = true;
+ break;
+ }
+ }
+ if (is_reconnected) {
+ continue;
+ }
+ } else {
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel)) {
+ // Connect Callback
+ if (!it.first) {
+ it.first = true;
+ callback.connectCallback(channel);
+
+ break;
+ }
+ }
+ }
+ }
+
+ JSONArray messages = response.optJSONArray(0);
+
+ // Update TimeToken
+ if (response.optString(1).length() > 0)
+ timetoken = response.optString(1);
+
+ for (int i = 0; messages.length() > i; i++) {
+ JSONObject message = messages.optJSONObject(i);
+ if (message != null) {
+
+ if (this.CIPHER_KEY.length() > 0) {
+ // Decrypt Message
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ message = pc.decrypt(message);
+ }
+ if (callback != null)
+ if (!callback.presenceCallback(channel, message)) return;
+ } else {
+
+ JSONArray arr = messages.optJSONArray(i);
+ if (arr != null) {
+ if (this.CIPHER_KEY.length() > 0) {
+ PubnubCrypto pc = new PubnubCrypto(
+ this.CIPHER_KEY);
+ arr = pc.decryptJSONArray(arr);
+ }
+ if (callback != null)
+ if (!callback.presenceCallback(channel, arr)) return;
+ } else {
+ String msgs = messages.getString(0);
+ if (this.CIPHER_KEY.length() > 0) {
+ PubnubCrypto pc = new PubnubCrypto(
+ this.CIPHER_KEY);
+ msgs = pc.decrypt(msgs);
+ }
+ if (callback != null)
+ if (!callback.presenceCallback(channel, msgs)) return;
+ }
+ }
+ }
+ } catch (Exception e) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ie) {
+ }
+ }
+ }
+ }
+
+ /**
+ * Here Now
+ *
+ * Load presence information from a channel
+ *
+ * @param String channel name.
+ * @return JSONObject of here_now
+ */
+ public JSONArray here_now(String channel) {
+ List url = new ArrayList();
+
+ url.add("v2");
+ url.add("presence");
+ url.add("sub_key");
+ url.add(this.SUBSCRIBE_KEY);
+ url.add("channel");
+ url.add(channel);
+
+ JSONArray response = _request(url);
+
+ if (this.CIPHER_KEY.length() > 0) {
+ // Decrypt Messages
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ return pc.decryptJSONArray(response);
+ } else {
+ return response;
+ }
+ }
+ /**
+ * History
+ *
+ * Load history from a channel.
+ *
+ * @param String
+ * channel name.
+ * @param int limit history count response.
+ * @return JSONArray of history.
+ */
+ public JSONArray history(String channel, int limit) {
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("limit", limit);
+ return history(args);
+ }
+
+ /**
+ * History
+ *
+ * Load history from a channel.
+ *
+ * @param HashMap
+ * containing channel name, limit history count
+ * response.
+ * @return JSONArray of history.
+ */
+ public JSONArray history(HashMap args) {
+
+ String channel = (String) args.get("channel");
+ int limit = Integer.parseInt(args.get("limit").toString());
+
+ List url = new ArrayList();
+
+ url.add("history");
+ url.add(this.SUBSCRIBE_KEY);
+ url.add(channel);
+ url.add("0");
+ url.add(Integer.toString(limit));
+
+ JSONArray response = _request(url);
+
+ if (this.CIPHER_KEY.length() > 0) {
+ // Decrypt Messages
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ return pc.decryptJSONArray(response);
+ } else {
+ return response;
+ }
+ }
+
+ /**
+ * DetailedHistory
+ *
+ * DetailedHistory from PubNub Cloud.
+ *
+ * @return JSONArray of detailed history.
+ */
+ public JSONArray detailedHistory(String channel, long start, long end, int count, Boolean reverse) {
+ parameters = "";
+ if (count == -1) count = 100;
+ if (count == -1) count = 100;
+ parameters = "?count=" + count;
+ if (reverse)
+ parameters = parameters + "&" + "reverse=" + reverse.toString().toLowerCase();
+ if (start != -1)
+ parameters = parameters + "&" + "start=" + Long.toString(start).toLowerCase();
+ if (end != -1)
+ parameters = parameters + "&" + "end=" + Long.toString(end).toLowerCase();
+
+ List url = new ArrayList();
+ url.add("v2");
+ url.add("history");
+ url.add("sub-key");
+ url.add(this.SUBSCRIBE_KEY);
+ url.add("channel");
+ url.add(channel);
+
+ JSONArray response = _request(url);
+
+ if (this.CIPHER_KEY.length() > 0) {
+ PubnubCrypto pc = new PubnubCrypto(this.CIPHER_KEY);
+ try {
+ return pc.decryptJSONArray(response.getJSONArray(0));
+ } catch (JSONException e) {
+ return response;
+ }
+ } else {
+ return response;
+ }
+ }
+
+ public JSONArray detailedHistory(String channel, long start, boolean reverse) {
+ return detailedHistory(channel, start, -1, -1, reverse);
+ }
+
+ public JSONArray detailedHistory(String channel, int count) {
+ return detailedHistory(channel, -1, -1, count, false);
+ }
+ /**
+ * Time
+ *
+ * Timestamp from PubNub Cloud.
+ *
+ * @return double timestamp.
+ */
+ public double time() {
+ List url = new ArrayList();
+
+ url.add("time");
+ url.add("0");
+
+ JSONArray response = _request(url);
+
+ return response.optDouble(0);
+ }
+
+ /**
+ * UUID
+ *
+ * 32 digit UUID generation at client side.
+ *
+ * @return String uuid.
+ */
+ public static String uuid() {
+ UUID uuid = UUID.randomUUID();
+ return uuid.toString();
+ }
+
+ /**
+ * Unsubscribe
+ *
+ * Unsubscribe/Disconnect to channel.
+ *
+ * @param HashMap
+ * containing channel name.
+ */
+ public void unsubscribe(HashMap args) {
+ String channel = (String) args.get("channel");
+ for (ChannelStatus it : subscriptions) {
+ if (it.channel.equals(channel) && it.connected) {
+ it.connected = false;
+ it.first = false;
+ break;
+ }
+ }
+ }
+
+ /**
+ * Request URL
+ *
+ * @param List
+ * request of url directories.
+ * @return JSONArray from JSON response.
+ */
+ private JSONArray _request(List url_components) {
+ String json = "";
+ StringBuilder url = new StringBuilder();
+ Iterator url_iterator = url_components.iterator();
+ String request_for = url_components.get(0);
+ String request_type = url_components.get(1);
+
+ url.append(this.ORIGIN);
+
+ // Generate URL with UTF-8 Encoding
+ while (url_iterator.hasNext()) {
+ try {
+ String url_bit = (String) url_iterator.next();
+ url.append("/").append(_encodeURIcomponent(url_bit));
+ } catch (Exception e) {
+ // e.printStackTrace();
+ JSONArray jsono = new JSONArray();
+ try {
+ jsono.put("Failed UTF-8 Encoding URL.");
+ } catch (Exception jsone) {
+ }
+ return jsono;
+ }
+ }
+ if (request_for.equals("subscribe") || request_for.equals("presence"))
+ url.append("?uuid=").append(this.sessionUUID);
+ if (request_for.equals("v2") && request_type.equals("history"))
+ url.append(parameters);
+
+ AsyncHttpClient ahc = null;
+ try {
+ // Prepare Asynchronous HTTP Request
+ Builder cb = new AsyncHttpClientConfig.Builder();
+ cb.setRequestTimeoutInMs(310000);
+ AsyncHttpClientConfig config = cb.build();
+ ahc = new AsyncHttpClient(config);
+ RequestBuilder rb = new RequestBuilder("GET");
+ rb.setUrl(url.toString());
+ rb.addHeader("V", "3.1");
+ rb.addHeader("User-Agent", "Java");
+ rb.addHeader("Accept-Encoding", "gzip");
+ Request request = rb.build();
+
+ // Execute Request
+ Future f = ahc.executeRequest(request,
+ new AsyncCompletionHandler() {
+
+ @Override
+ public String onCompleted(Response r) throws Exception {
+
+ String ce = r.getHeader("Content-Encoding");
+ InputStream resulting_is = null;
+ InputStream is = r.getResponseBodyAsStream();
+
+ if (ce != null && ce.equalsIgnoreCase("gzip")) {
+ // Decoding using 'gzip'
+
+ try {
+ resulting_is = new GZIPInputStream(is);
+ } catch (IOException e) {
+ resulting_is = is;
+ } catch (Exception e) {
+ resulting_is = is;
+ }
+ } else {
+ // Default (encoding is null OR 'identity')
+ resulting_is = is;
+ }
+
+ String line = "", json = "";
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(resulting_is, "UTF8"));
+
+ // Read JSON Message
+ while ((line = reader.readLine()) != null) {
+ json += line;
+ }
+
+ reader.close();
+
+ return json;
+ }
+ });
+ json = f.get();
+ ahc.close();
+
+ } catch (Exception e) {
+
+ // Response If Failed JSONP HTTP Request.
+ JSONArray jsono = new JSONArray();
+ try {
+ if (request_for != null) {
+ if (request_for.equals("time")) {
+ jsono.put("0");
+ } else if (request_for.equals("history")) {
+ jsono.put("Error: Failed JSONP HTTP Request.");
+ } else if (request_for.equals("publish")) {
+ jsono.put("0");
+ jsono.put("Error: Failed JSONP HTTP Request.");
+ } else if (request_for.equals("subscribe")) {
+ jsono.put("0");
+ jsono.put("0");
+ }
+ }
+ } catch (Exception jsone) {
+ }
+
+ if (ahc != null) {
+ ahc.close();
+ }
+ return jsono;
+ }
+
+ // Parse JSON String
+ try {
+ if (json.contains("uuids")) {
+ JSONArray resp = new JSONArray();
+ resp.put(json);
+ return resp;
+ }
+ return new JSONArray(json);
+ } catch (Exception e) {
+ JSONArray jsono = new JSONArray();
+
+ try {
+ jsono.put("Error: Failed JSON Parsing.");
+ } catch (Exception jsone) {
+ }
+
+ // Return Failure to Parse
+ return jsono;
+ }
+ }
+
+ private String _encodeURIcomponent(String s) {
+ StringBuilder o = new StringBuilder();
+ for (Character ch : s.toCharArray()) {
+ if (isUnsafe(ch)) {
+ o.append('%');
+ o.append(toHex(ch / 16));
+ o.append(toHex(ch % 16));
+ } else
+ o.append(encodeToUTF8(ch.toString()));
+ }
+ return o.toString();
+ }
+
+ private char toHex(int ch) {
+ return (char) (ch < 10 ? '0' + ch : 'A' + ch - 10);
+ }
+
+ private boolean isUnsafe(char ch) {
+ return " ~`!@#$%^&*()+=[]\\{}|;':\",./<>?".indexOf(ch) >= 0;
+ }
+
+ private String encodeToUTF8(String s) {
+ try {
+ String enc = URLEncoder.encode(s, "UTF-8").replace("+", "%20");
+ return enc;
+ } catch (UnsupportedEncodingException e) {
+
+ }
+ return s;
+ }
+
+}
+
+class Base64Encoder {
+
+ // Mapping table from 6-bit nibbles to Base64 characters.
+ private static char[] map1 = new char[64];
+ static {
+ int i=0;
+ for (char c='A'; c<='Z'; c++) map1[i++] = c;
+ for (char c='a'; c<='z'; c++) map1[i++] = c;
+ for (char c='0'; c<='9'; c++) map1[i++] = c;
+ map1[i++] = '+';
+ map1[i++] = '/';
+ }
+
+ // Mapping table from Base64 characters to 6-bit nibbles.
+ private static byte[] map2 = new byte[128];
+ static {
+ for (int i=0; iin.
+ * @return A character array with the Base64 encoded data.
+ */
+ public static char[] encode (byte[] in, int iLen) {
+ int oDataLen = (iLen*4+2)/3; // output length without padding
+ int oLen = ((iLen+2)/3)*4; // output length including padding
+ char[] out = new char[oLen];
+ int ip = 0;
+ int op = 0;
+ while (ip < iLen) {
+ int i0 = in[ip++] & 0xff;
+ int i1 = ip < iLen ? in[ip++] & 0xff : 0;
+ int i2 = ip < iLen ? in[ip++] & 0xff : 0;
+ int o0 = i0 >>> 2;
+ int o1 = ((i0 & 3) << 4) | (i1 >>> 4);
+ int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6);
+ int o3 = i2 & 0x3F;
+ out[op++] = map1[o0];
+ out[op++] = map1[o1];
+ out[op] = op < oDataLen ? map1[o2] : '=';
+ op++;
+ out[op] = op < oDataLen ? map1[o3] : '=';
+ op++;
+ }
+ return out;
+ }
+
+ /**
+ * Decodes a string from Base64 format.
+ *
+ * @param s a Base64 String to be decoded.
+ * @return A String containing the decoded data.
+ * @throws IllegalArgumentException if the input is not valid Base64 encoded data.
+ */
+ public static String decodeString (String s) {
+ return new String(decode(s));
+ }
+
+ /**
+ * Decodes a byte array from Base64 format.
+ *
+ * @param s a Base64 String to be decoded.
+ * @return An array containing the decoded data bytes.
+ * @throws IllegalArgumentException if the input is not valid Base64 encoded data.
+ */
+ public static byte[] decode (String s) {
+ return decode(s.toCharArray());
+ }
+
+ /**
+ * Decodes a byte array from Base64 format.
+ * No blanks or line breaks are allowed within the Base64 encoded data.
+ *
+ * @param in a character array containing the Base64 encoded data.
+ * @return An array containing the decoded data bytes.
+ * @throws IllegalArgumentException if the input is not valid Base64 encoded data.
+ */
+ public static byte[] decode (char[] in) {
+ int iLen = in.length;
+ if (iLen%4 != 0) throw new IllegalArgumentException ("Length of Base64 encoded input string is not a multiple of 4.");
+ while (iLen > 0 && in[iLen-1] == '=') iLen--;
+ int oLen = (iLen*3) / 4;
+ byte[] out = new byte[oLen];
+ int ip = 0;
+ int op = 0;
+ while (ip < iLen) {
+ int i0 = in[ip++];
+ int i1 = in[ip++];
+ int i2 = ip < iLen ? in[ip++] : 'A';
+ int i3 = ip < iLen ? in[ip++] : 'A';
+ if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)
+ throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
+ int b0 = map2[i0];
+ int b1 = map2[i1];
+ int b2 = map2[i2];
+ int b3 = map2[i3];
+ if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)
+ throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
+ int o0 = ( b0 <<2) | (b1>>>4);
+ int o1 = ((b1 & 0xf)<<4) | (b2>>>2);
+ int o2 = ((b2 & 3)<<6) | b3;
+ out[op++] = (byte)o0;
+ if (op it = message.keys();
+
+ while (it.hasNext()) {
+ String key = it.next();
+ String val = message.getString(key);
+ message_encrypted.put(key, encrypt(val));
+ }
+ return message_encrypted;
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Decrypt
+ *
+ * @param JSONObject Encrypted message
+ * @return JSONObject Message decrypted
+ */
+ @SuppressWarnings("unchecked")
+ public JSONObject decrypt(JSONObject message_encrypted) {
+ try {
+ JSONObject message_decrypted = new JSONObject();
+ Iterator it = message_encrypted.keys();
+
+ while (it.hasNext()) {
+ String key = it.next();
+ String encrypted_str = message_encrypted.getString(key);
+ String decrypted_str = decrypt(encrypted_str);
+ message_decrypted.put(key, decrypted_str);
+ }
+ return message_decrypted;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Encrypt JSONArray
+ *
+ * @param JSONArray - Encrypted JSONArray
+ * @return JSONArray - Decrypted JSONArray
+ */
+ public JSONArray encryptJSONArray(JSONArray jsona_arry) {
+ try {
+ JSONArray jsona_decrypted = new JSONArray();
+
+ for (int i = 0; i < jsona_arry.length(); i++) {
+ Object o = jsona_arry.get(i);
+ if (o != null) {
+ if (o instanceof JSONObject) {
+ jsona_decrypted.put(i, encrypt((JSONObject)o));
+ } else if (o instanceof JSONArray) {
+ jsona_decrypted.put(i, encryptJSONArray((JSONArray)o));
+ } else if (o instanceof String) {
+ jsona_decrypted.put(i, encrypt(o.toString()));
+ }
+ }
+ }
+
+ return jsona_decrypted;
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Decrypt JSONArray
+ *
+ * @param JSONArray - Encrypted JSONArray
+ * @return JSONArray - Decrypted JSONArray
+ */
+ public JSONArray decryptJSONArray(JSONArray jsona_encrypted) {
+ try {
+ JSONArray jsona_decrypted = new JSONArray();
+
+ for (int i = 0; i < jsona_encrypted.length(); i++) {
+ Object o = jsona_encrypted.get(i);
+ if (o != null) {
+ if (o instanceof JSONObject) {
+ jsona_decrypted.put(i, decrypt((JSONObject)o));
+ } else if (o instanceof JSONArray) {
+ jsona_decrypted.put(i, decryptJSONArray((JSONArray)o));
+ } else if (o instanceof String) {
+ jsona_decrypted.put(i, decrypt(o.toString()));
+ }
+ }
+ }
+
+ return jsona_decrypted;
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Encrypt
+ *
+ * @param String plain text to encrypt
+ * @return String cipher text
+ * @throws Exception
+ */
+ public String encrypt(String plain_text) throws Exception {
+ byte[] out = transform(true, plain_text.getBytes());
+ return new String(Base64Encoder.encode(out));
+ }
+
+ /**
+ * Decrypt
+ *
+ * @param String cipherText
+ * @return String
+ * @throws Exception
+ */
+ public String decrypt(String cipher_text) throws Exception {
+ byte[] out = transform(false, Base64Encoder.decode(cipher_text));
+ return new String(out).trim();
+ }
+
+ /**
+ * AES Encryption
+ *
+ * @param boolean encrypt_or_decrypt ENCRYPT/DECRYPT mode
+ * @param ByteArray input_bytes
+ * @return ByteArray
+ * @throws Exception
+ */
+ private byte[] transform(boolean encrypt_or_decrypt, byte[] input_bytes) throws Exception {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ byte[] iv_bytes = "0123456789012345".getBytes();
+ byte[] key_bytes = md5(this.CIPHER_KEY);
+
+ SecretKeySpec key = new SecretKeySpec(key_bytes, "AES");
+ IvParameterSpec ivSpec = new IvParameterSpec(iv_bytes);
+ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+
+ if (encrypt_or_decrypt) {
+ cipher.init(Cipher.ENCRYPT_MODE, key, ivSpec);
+ ByteArrayInputStream b_in = new ByteArrayInputStream(input_bytes);
+ CipherInputStream c_in = new CipherInputStream(b_in, cipher);
+ int ch;
+ while ((ch = c_in.read()) >= 0) {
+ output.write(ch);
+ }
+ c_in.close();
+ } else {
+ cipher.init(Cipher.DECRYPT_MODE, key, ivSpec);
+ CipherOutputStream c_out = new CipherOutputStream(output, cipher);
+ c_out.write(input_bytes);
+ c_out.close();
+ }
+ return output.toByteArray();
+ }
+
+ /**
+ * Sign Message
+ *
+ * @param String input
+ * @return String as HashText
+ */
+ public static String getHMacSHA256(String secret_key, String input) {
+ try {
+ Key KEY = new SecretKeySpec(input.getBytes("UTF-8"), "HmacSHA256");
+ Mac sha256_HMAC = Mac.getInstance("HMACSHA256");
+
+ sha256_HMAC.init(KEY);
+ byte[] mac_data = sha256_HMAC.doFinal(secret_key.getBytes());
+
+ BigInteger number = new BigInteger(1, mac_data);
+ String hashtext = number.toString(16);
+
+ return hashtext;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ /**
+ * Get MD5
+ * @param string
+ * @return
+ */
+ public static byte[] md5(String string) {
+ byte[] hash;
+
+ try {
+ hash = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8"));
+ } catch (NoSuchAlgorithmException e) {
+ throw new RuntimeException("MD5 should be supported!", e);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException("UTF-8 should be supported!", e);
+ }
+
+ StringBuilder hex = new StringBuilder(hash.length * 2);
+ for (byte b : hash) {
+ if ((b & 0xFF) < 0x10) hex.append("0");
+ hex.append(Integer.toHexString(b & 0xFF));
+ }
+ return hexStringToByteArray(hex.toString());
+ }
+
+ public static byte[] hexStringToByteArray(String s) {
+ int len = s.length();
+ byte[] data = new byte[len / 2];
+ for (int i = 0; i < len; i += 2) {
+ data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
+ + Character.digit(s.charAt(i+1), 16));
+ }
+ return data;
+ }
+}
\ No newline at end of file
diff --git a/gwt/3.3/src/pubnub/example/PubnubExample.java b/gwt/3.3/src/pubnub/example/PubnubExample.java
new file mode 100644
index 000000000..135579e91
--- /dev/null
+++ b/gwt/3.3/src/pubnub/example/PubnubExample.java
@@ -0,0 +1,408 @@
+package src.pubnub.example;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import pubnub.api.Pubnub;
+import pubnub.api.Callback;
+
+public class PubnubExample {
+
+ /**
+ * @param params
+ */
+ public static void main(String[] params) {
+
+ System.out.println("\nRunning publish()");
+ PublishExample();
+
+ System.out.println("\nRunning history()");
+ HistoryExample();
+
+ System.out.println("\nRunning timestamp()");
+ TimestampExample();
+
+ System.out.println("\nRunning here_now()");
+ HereNowExample();
+
+ System.out.println("\nRunning detailedHistory()");
+ DetailedHistoryExample();
+
+// System.out.println("\nRunning presence()");
+// PresenceExample();
+
+ System.out.println("\nRunning subscribe()");
+ SubscribeExample();
+
+ }
+
+ private static void PublishExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = "enigma"; // (Cipher key is optional)
+ String channel = "hello_world";
+
+ int publish_message_count = 1;
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+ int count = 0;
+ while (true) {
+ if (count >= publish_message_count) break;
+ count ++;
+
+ // Create JSON Message
+ JSONObject message = new JSONObject();
+ try {
+ message.put("text", "Hello World!" + count);
+ /*
+ * message.put("title", "Java Client PubNub";
+ * message.put("some_val", "This is a push to all users! Fighting!"
+ * message.put("url", "http://www.pubnub.com"
+ */
+ } catch (org.json.JSONException jsonError) {
+ }
+
+ // Publish
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", message);
+ JSONArray response = null;
+ response = pubnub.publish(args);
+ System.out.println(response);
+
+ args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", "Hello World");
+ response = pubnub.publish(args);
+ System.out.println(response);
+
+ JSONArray array = new JSONArray();
+ array.put("Sunday");
+ array.put("Monday");
+ array.put("Tuesday");
+ array.put("Wednesday");
+ array.put("Thursday");
+ array.put("Friday");
+ array.put("Saturday");
+
+ args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", array);
+
+ response = pubnub.publish(args);
+ System.out.println(response);
+ }
+ }
+
+ private static void HistoryExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = "enigma"; // (Cipher key is optional)
+ String channel = "hello_world";
+ int limit = 1;
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("limit", limit);
+
+ // Get History
+ JSONArray response = pubnub.history(args);
+
+ // Print Response from PubNub JSONP REST Service
+ System.out.println(response);
+
+ try {
+ if (response != null) {
+ for (int i = 0; i < response.length(); i ++) {
+ JSONObject jsono = response.optJSONObject(i);
+ if (jsono != null) {
+ @SuppressWarnings("rawtypes")
+ Iterator keys = jsono.keys();
+ while (keys.hasNext()) {
+ System.out.println(jsono.get(keys.next().toString()) + " ");
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void DetailedHistoryExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = "enigma"; // (Cipher key is optional)
+ String channel = "hello_world";
+ int count = 1;
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ // Get History
+ JSONArray response = pubnub.detailedHistory(channel, count);
+
+ // Print Response from PubNub JSONP REST Service
+ System.out.println(response);
+
+ try {
+ if (response != null) {
+ for (int i = 0; i < response.length(); i ++) {
+ JSONObject jsono = response.optJSONObject(i);
+ if (jsono != null) {
+ @SuppressWarnings("rawtypes")
+ Iterator keys = jsono.keys();
+ while (keys.hasNext()) {
+ System.out.println(jsono.get(keys.next().toString()) + " ");
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static void TimestampExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = ""; // (Cipher key is optional)
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ // Print Server Time
+ System.out.println("Time: " + Double.toString(pubnub.time()));
+ }
+
+ private static void SubscribeExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = ""; // (Cipher key is optional)
+ String channel = "hello_world";
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ // Callback Interface when a Message is Received
+ class Receiver implements Callback {
+
+ public boolean subscribeCallback(String channel, Object message) {
+
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ @SuppressWarnings("rawtypes")
+ Iterator keys = obj.keys();
+ while (keys.hasNext()) {
+ System.out.print(obj.get(keys.next().toString()) + " ");
+ }
+ System.out.println();
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ System.out.print(obj + " ");
+ System.out.println();
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ System.out.print(obj.toString() + " ");
+ System.out.println();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ // Continue Listening?
+ return true;
+ }
+
+ @Override
+ public void errorCallback(String channel, Object message) {
+ System.err.println("Channel:" + channel + "-" + message.toString());
+
+ }
+
+ @Override
+ public void connectCallback(String channel) {
+ System.out.println("Connected to channel :" + channel);
+ System.out.println("Waiting for a message from publisher ...");
+ }
+
+ @Override
+ public void reconnectCallback(String channel) {
+ System.out.println("Reconnected to channel :" + channel);
+ }
+
+ @Override
+ public void disconnectCallback(String channel) {
+ System.out.println("Disconnected to channel :" + channel);
+ }
+
+ @Override
+ public boolean presenceCallback(String channel, Object message) {
+ return false;
+ }
+ }
+
+ HashMap args = new HashMap(6);
+ args.put("channel", channel);
+ args.put("callback", new Receiver()); // callback to get response
+
+ // Listen for Messages (Subscribe)
+ pubnub.subscribe(args);
+ }
+
+ private static void PresenceExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = ""; // (Cipher key is optional)
+ String channel = "hello_world";
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ // Callback Interface when a Message is Received
+ class Receiver implements Callback {
+
+ public boolean presenceCallback(String channel, Object message) {
+
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ @SuppressWarnings("rawtypes")
+ Iterator keys = obj.keys();
+ while (keys.hasNext()) {
+ System.out.print(obj.get(keys.next().toString()) + " ");
+ }
+ System.out.println();
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ System.out.print(obj + " ");
+ System.out.println();
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ System.out.print(obj.toString() + " ");
+ System.out.println();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ // Continue Listening?
+ return true;
+ }
+
+ @Override
+ public void errorCallback(String channel, Object message) {
+ System.err.println("Channel:" + channel + "-" + message.toString());
+
+ }
+
+ @Override
+ public void connectCallback(String channel) {
+ System.out.println("Connected to channel :" + channel);
+ System.out.println("Waiting for subscribe or unsubscribe message ...");
+ }
+
+ @Override
+ public void reconnectCallback(String channel) {
+ System.out.println("Reconnected to channel :" + channel);
+ }
+
+ @Override
+ public void disconnectCallback(String channel) {
+ System.out.println("Disconnected to channel :" + channel);
+ }
+
+ @Override
+ public boolean subscribeCallback(String channel, Object message) {
+ return false;
+ }
+ }
+
+ HashMap args = new HashMap(6);
+ args.put("channel", channel + "-pnpres");
+ args.put("callback", new Receiver()); // callback to get response
+
+ // Listen for Messages (Presence)
+ pubnub.presence(args);
+ }
+
+ private static void HereNowExample() {
+ String publish_key = "demo";
+ String subscribe_key = "demo";
+ String secret_key = "demo";
+ String cipher_key = ""; // (Cipher key is optional)
+ String channel = "hello_world";
+
+ Pubnub pubnub = new Pubnub(
+ publish_key,
+ subscribe_key,
+ secret_key,
+ cipher_key,
+ true
+ );
+
+ // Get Here Now
+ JSONArray response = pubnub.here_now(channel);
+
+ // Print Response from PubNub JSONP REST Service
+ System.out.println(response);
+
+ try {
+ if (response != null) {
+ for (int i = 0; i < response.length(); i ++) {
+ JSONObject jsono = response.optJSONObject(i);
+ if (jsono != null) {
+ @SuppressWarnings("rawtypes")
+ Iterator keys = jsono.keys();
+ while (keys.hasNext()) {
+ System.out.println(jsono.get(keys.next().toString()) + " ");
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/gwt/3.3/src/pubnub/unit_test/PubnubUnitTest.java b/gwt/3.3/src/pubnub/unit_test/PubnubUnitTest.java
new file mode 100644
index 000000000..cb9944e16
--- /dev/null
+++ b/gwt/3.3/src/pubnub/unit_test/PubnubUnitTest.java
@@ -0,0 +1,538 @@
+package pubnub.unit_test;
+
+import static org.junit.Assert.*;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+
+import pubnub.api.Callback;
+import pubnub.api.Pubnub;
+
+public class PubnubUnitTest {
+
+ private static boolean deliveryStatus = false;
+ private Pubnub pubnub = new Pubnub(
+ "demo",
+ "demo",
+ "",
+ "",
+ true
+ );
+ private String channel = "hello_world";
+ private int limit = 1;
+
+ @Test
+ public void testPublishHashMapOfStringObject() {
+ pubnub.CIPHER_KEY = "enigma";
+ JSONObject message = new JSONObject();
+ try {
+ message.put("text", "Hello World!");
+ } catch (org.json.JSONException jsonError) {
+ jsonError.printStackTrace();
+ }
+
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", message);
+ JSONArray response = null;
+ response = pubnub.publish(args);
+
+ try {
+ assertFalse(response.get(2).toString().equals("0"));
+ System.out.println("PASS: TestPublish");
+ } catch (JSONException e) {
+ fail("FAIL: TestPublish");
+ }
+ }
+
+ @Test
+ public void testSubscribeHashMapOfStringObject() {
+ pubnub.CIPHER_KEY = "";
+ // Callback Interface when a Message is Received
+ class Receiver implements Callback {
+
+ public boolean subscribeCallback(String channel, Object message) {
+
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ @SuppressWarnings("rawtypes")
+ Iterator keys = obj.keys();
+ while (keys.hasNext()) {
+ System.out.print(obj.get(keys.next().toString()) + " ");
+ }
+ System.out.println();
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ System.out.print(obj + " ");
+ System.out.println();
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ System.out.print(obj.toString() + " ");
+ System.out.println();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ deliveryStatus = true;
+ // Continue Listening?
+ return false;
+ }
+
+ @Override
+ public void errorCallback(String channel, Object message) {
+ System.err.println("Channel:" + channel + "-" + message.toString());
+
+ }
+
+ @Override
+ public void connectCallback(String channel) {
+ System.out.println("Connected to channel :" + channel);
+ System.out.println("Waiting for a message from publisher ...");
+ }
+
+ @Override
+ public void reconnectCallback(String channel) {
+ System.out.println("Reconnected to channel :" + channel);
+ }
+
+ @Override
+ public void disconnectCallback(String channel) {
+ System.out.println("Disconnected to channel :" + channel);
+ }
+
+ @Override
+ public boolean presenceCallback(String channel, Object message) {
+ return false;
+ }
+ }
+
+ HashMap args = new HashMap(6);
+ args.put("channel", channel);
+ args.put("callback", new Receiver());
+
+ deliveryStatus = false;
+ // Listen for Messages (Subscribe)
+ pubnub.subscribe(args);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", "hi");
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ while (!deliveryStatus);
+ assertTrue(deliveryStatus);
+ System.out.println("PASS: TestSubscribe");
+ }
+
+ @Test
+ public void testPresenceHashMapOfStringObject() {
+ pubnub.CIPHER_KEY = "";
+ // Callback Interface when a Message is Received
+ class Receiver implements Callback {
+
+ public boolean presenceCallback(String channel, Object message) {
+
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ @SuppressWarnings("rawtypes")
+ Iterator keys = obj.keys();
+ while (keys.hasNext()) {
+ System.out.print(obj.get(keys.next().toString()) + " ");
+ }
+ System.out.println();
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ System.out.print(obj + " ");
+ System.out.println();
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ System.out.print(obj.toString() + " ");
+ System.out.println();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ deliveryStatus = true;
+ // Continue Listening?
+ return false;
+ }
+
+ @Override
+ public void errorCallback(String channel, Object message) {
+ System.err.println("Channel:" + channel + "-" + message.toString());
+ }
+
+ @Override
+ public void connectCallback(String channel) {
+ System.out.println("Connected to channel :" + channel);
+ System.out.println("Waiting for subscribe or unsubscribe message ...");
+ }
+
+ @Override
+ public void reconnectCallback(String channel) {
+ System.out.println("Reconnected to channel :" + channel);
+ }
+
+ @Override
+ public void disconnectCallback(String channel) {
+ System.out.println("Disconnected to channel :" + channel);
+ }
+
+ @Override
+ public boolean subscribeCallback(String channel, Object message) {
+ return false;
+ }
+ }
+
+ HashMap args = new HashMap(6);
+ args.put("channel", channel + "-pnpres");
+ args.put("callback", new Receiver()); // callback to get response
+
+ deliveryStatus = false;
+ // Listen for Messages (Presence)
+ pubnub.presence(args);
+ while (!deliveryStatus);
+ assertTrue(deliveryStatus);
+ System.out.println("PASS: TestPresence");
+ }
+
+ @Test
+ public void testHere_now() {
+ pubnub.CIPHER_KEY = "";
+ // Get Here Now
+ JSONArray response = pubnub.here_now(channel);
+
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestHere_Now");
+ } catch (Exception e) {
+ fail("FAIL: TestHere_Now");
+ }
+ }
+
+ @Test
+ public void testUnencryptedHistoryHashMapOfStringObject() {
+ // Context setup
+ pubnub.CIPHER_KEY = "";
+ JSONObject message = new JSONObject();
+ try {
+ message.put("text", "Hello World!");
+ } catch (org.json.JSONException jsonError) {
+ jsonError.printStackTrace();
+ }
+
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", message);
+ JSONArray response = null;
+ response = pubnub.publish(args);
+
+ // Test begins
+ args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("limit", limit);
+
+ // Get History
+ response = pubnub.history(args);
+
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestUnencryptedHistory");
+ } catch (Exception e) {
+ fail("FAIL: TestUnencryptedHistory");
+ }
+ }
+
+ @Test
+ public void testEncryptedHistoryHashMapOfStringObject() {
+ // Context setup
+ pubnub.CIPHER_KEY = "enigma";
+ JSONObject message = new JSONObject();
+ try {
+ message.put("text", "Hello World!");
+ } catch (org.json.JSONException jsonError) {
+ jsonError.printStackTrace();
+ }
+
+ HashMap args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("message", message);
+ JSONArray response = null;
+ response = pubnub.publish(args);
+
+ // Test begins
+ args = new HashMap(2);
+ args.put("channel", channel);
+ args.put("limit", limit);
+
+ // Get History
+ response = pubnub.history(args);
+
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestEncryptedHistory");
+ } catch (Exception e) {
+ fail("FAIL: TestEncryptedHistory");
+ }
+ }
+
+ @Test
+ public void testUnencryptedDetailedHistory() {
+ // Context setup for Detailed History
+ pubnub.CIPHER_KEY = "";
+ int total_msg = 10;
+ long starttime = (long) pubnub.time();
+ HashMap inputs = new HashMap();
+ for (int i = 0; i < total_msg / 2; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long midtime = (long) pubnub.time();
+ for (int i = total_msg / 2; i < total_msg; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long endtime = (long)pubnub.time();
+
+ // Get History
+ JSONArray response = pubnub.detailedHistory(channel, total_msg);
+
+ // Print Response from PubNub JSONP REST Service
+ System.out.println(response);
+
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestUnencryptedDetailedHistory");
+ } catch (Exception e) {
+ fail("FAIL: TestUnencryptedDetailedHistory");
+ }
+ }
+
+ @Test
+ public void testEncryptedDetailedHistory() {
+ // Context setup for Detailed History
+ pubnub.CIPHER_KEY = "enigma";
+ int total_msg = 10;
+ long starttime = (long) pubnub.time();
+ HashMap inputs = new HashMap();
+ for (int i = 0; i < total_msg / 2; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long midtime = (long) pubnub.time();
+ for (int i = total_msg / 2; i < total_msg; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long endtime = (long)pubnub.time();
+
+ // Get History
+ JSONArray response = pubnub.detailedHistory(channel, total_msg);
+
+ // Print Response from PubNub JSONP REST Service
+ System.out.println(response);
+
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestEncryptedDetailedHistory");
+ } catch (Exception e) {
+ fail("FAIL: TestEncryptedDetailedHistory");
+ }
+ }
+
+ @Test
+ public void testUnencryptedDetailedHistoryParams() {
+ // Context setup for Detailed History
+ pubnub.CIPHER_KEY = "";
+ int total_msg = 10;
+ long starttime = (long) pubnub.time();
+ HashMap inputs = new HashMap();
+ for (int i = 0; i < total_msg / 2; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long midtime = (long) pubnub.time();
+ for (int i = total_msg / 2; i < total_msg; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long endtime = (long)pubnub.time();
+
+ // Get History
+ JSONArray response;
+ System.out.println("DetailedHistory with start & end");
+ response = pubnub.detailedHistory(channel, starttime, midtime, total_msg / 2, true);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ } catch (Exception e) {
+ fail("FAIL: TestUnencryptedDetailedHistoryParams");
+ }
+
+ System.out.println("DetailedHistory with start & reverse = true");
+ response = pubnub.detailedHistory(channel, midtime, -1, total_msg / 2, true);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ } catch (Exception e) {
+ fail("FAIL: TestUnencryptedDetailedHistoryParams");
+ }
+
+ System.out.println("DetailedHistory with start & reverse = false");
+ response = pubnub.detailedHistory(channel, midtime, -1, total_msg / 2, false);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestUnencryptedDetailedHistoryParams");
+ } catch (Exception e) {
+ fail("FAIL: TestUnencryptedDetailedHistoryParams");
+ }
+ }
+
+ @Test
+ public void testEncryptedDetailedHistoryParams() {
+ // Context setup for Detailed History
+ pubnub.CIPHER_KEY = "enigma";
+ int total_msg = 10;
+ long starttime = (long) pubnub.time();
+ HashMap inputs = new HashMap();
+ for (int i = 0; i < total_msg / 2; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long midtime = (long) pubnub.time();
+ for (int i = total_msg / 2; i < total_msg; i++) {
+ String msg = Integer.toString(i);
+ JSONObject json = new JSONObject();
+ try {
+ json.put("text", msg);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ pubnub.publish(channel, json);
+ long t = (long) pubnub.time();
+ inputs.put(t, msg);
+ System.out.println("Message # " + Integer.toString(i) + " published");
+ }
+
+ long endtime = (long)pubnub.time();
+
+ // Get History
+ JSONArray response;
+ System.out.println("DetailedHistory with start & end");
+ response = pubnub.detailedHistory(channel, starttime, midtime, total_msg / 2, true);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ } catch (Exception e) {
+ fail("FAIL: TestEncryptedDetailedHistoryParams");
+ }
+
+ System.out.println("DetailedHistory with start & reverse = true");
+ response = pubnub.detailedHistory(channel, midtime, -1, total_msg / 2, true);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ } catch (Exception e) {
+ fail("FAIL: TestEncryptedDetailedHistoryParams");
+ }
+
+ System.out.println("DetailedHistory with start & reverse = false");
+ response = pubnub.detailedHistory(channel, midtime, -1, total_msg / 2, false);
+ System.out.println(response);
+ try {
+ assertNotNull(response);
+ System.out.println("PASS: TestEncryptedDetailedHistoryParams");
+ } catch (Exception e) {
+ fail("FAIL: TestEncryptedDetailedHistoryParams");
+ }
+ }
+
+ @Test
+ public void testTime() {
+ assertNotNull(pubnub.time());
+ }
+
+ @Test
+ public void testUuid() {
+ assertNotNull(Pubnub.uuid());
+ }
+}
diff --git a/gwt/3.3/src/pubnub/unit_test/PubnubUnitTestRunner.java b/gwt/3.3/src/pubnub/unit_test/PubnubUnitTestRunner.java
new file mode 100644
index 000000000..475e61483
--- /dev/null
+++ b/gwt/3.3/src/pubnub/unit_test/PubnubUnitTestRunner.java
@@ -0,0 +1,21 @@
+package pubnub.unit_test;
+
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+
+public class PubnubUnitTestRunner {
+
+ public static void main(String[] args) {
+ Result result = JUnitCore.runClasses(PubnubUnitTest.class);
+ for (Failure failure : result.getFailures()) {
+ System.out.println(failure.toString());
+ }
+ if (result.getFailureCount() != 0) {
+ System.out.println("Pubnub Unit Test Failed: # of failures - " + result.getFailureCount());
+ } else {
+ System.out.println("Pubnub Unit Test Completed Successfully.");
+ }
+ }
+
+}
diff --git a/gwt/3.3/test/PubnubExample.jar b/gwt/3.3/test/PubnubExample.jar
new file mode 100644
index 000000000..883d76008
Binary files /dev/null and b/gwt/3.3/test/PubnubExample.jar differ
diff --git a/gwt/3.3/test/PubnubUnitTest.jar b/gwt/3.3/test/PubnubUnitTest.jar
new file mode 100644
index 000000000..624380e87
Binary files /dev/null and b/gwt/3.3/test/PubnubUnitTest.jar differ
diff --git a/gwt/LICENSE b/gwt/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/gwt/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/gwt/README.md b/gwt/README.md
new file mode 100644
index 000000000..7aeca6160
--- /dev/null
+++ b/gwt/README.md
@@ -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 - GWT
+
+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().
+
+To run the example app, copy the pubnubexample.war in gwt/3.3/examples/PubnubExample/ to the webapps dir of tomcat,
+and restart tomcat. Then visit :/pubnubexample/PubnubExample.html
+
+You can find a running demo of the example app running here: http://geremy.pubnub.com:8080/pubnubexample/PubnubExample.html
\ No newline at end of file
diff --git a/j2me/LICENSE b/j2me/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/j2me/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/j2me/Pubnub-MicroEdition-3.5.6.jar b/j2me/Pubnub-MicroEdition-3.5.6.jar
new file mode 100644
index 000000000..7035f890f
Binary files /dev/null and b/j2me/Pubnub-MicroEdition-3.5.6.jar differ
diff --git a/j2me/Pubnub-MicroEdition-Debug-3.5.6.jar b/j2me/Pubnub-MicroEdition-Debug-3.5.6.jar
new file mode 100644
index 000000000..c6402da7b
Binary files /dev/null and b/j2me/Pubnub-MicroEdition-Debug-3.5.6.jar differ
diff --git a/j2me/README.md b/j2me/README.md
new file mode 100644
index 000000000..4ca16bef8
--- /dev/null
+++ b/j2me/README.md
@@ -0,0 +1,247 @@
+## PubNub 3.3 Real-time Cloud Push API - J2ME
+### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
+### http://www.pubnub.com/account
+
+PubNub is a Massively Scalable Real-time Service for Web and Mobile Games.
+This is a cloud-based service for broadcasting Real-time messages
+to thousands of web and mobile clients simultaneously.
+
+#### Example configuration
+
+-Project tested on Netbeans 7 IDE and Java ME SDK 3.0 Device Manager
+-Device Configuration - CLDC-1.1
+-Device Profile - MIDP-2.0
+
+
+####Init
+
+```java
+ Pubnub pubnub = new Pubnub(
+ "demo", // PUBLISH_KEY
+ "demo", // SUBSCRIBE_KEY
+ "", // SECRET_KEY
+ "", // CIPHER_KEY (optional)
+ false // SSL_ON?
+ );
+```
+
+
+####Callback
+Set Callback when pubnub object create.
+```java
+ public interface Callback {
+ public abstract void publishCallback(String channel,Object message,Object responce);
+ public abstract void subscribeCallback(String channel,Object message);
+ public abstract void historyCallback(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);
+ public abstract void hereNowCallback(String channel,Object message);
+ public abstract void presenceCallback(String channel,Object message);
+ public abstract void detailedHistoryCallback(String channel,Object message);
+ }
+```
+####Publish
+
+```java
+ try {
+ // Create JSON Message
+ JSONObject message = new JSONObject();
+ // Create Hashtable parameter
+ message.put("some_key", "Hello World!");
+
+ Hashtable args = new Hashtable(2);
+ args.put("channel", "hello_world"); // Channel Name
+ args.put("message", message); // JSON Message
+ _pubnub.publish(args);
+
+ } catch (JSONException ex) {
+ ex.printStackTrace();
+ }
+```
+Pass result to Publish Callback
+
+```java
+ public void publishCallback(String channel, Object message, Object response) {
+ JSONArray meg = (JSONArray) response;
+ System.out.println("Message sent response:" + message.toString()
+ + " on channel:" + channel);
+ try {
+ int success = Integer.parseInt(meg.get(0).toString());
+ if (success == 1) {
+ stringItem.setLabel("Publish");
+ stringItem.setText("Message sent successfully on channel:"
+ + channel + "\n" + message.toString());
+ } else {
+ stringItem.setLabel("Publish");
+ stringItem.setText("Message sent failure on channel:" + channel
+ + "\n" + message.toString());
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+```
+
+####Subscribe
+
+```java
+ // Callback Interface when a Message is Received
+ public void subscribeCallback(String channel, Object message) {
+ System.out.println("Message recevie on channel:" + channel
+ + " Message:" + message.toString());
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ getDisplay().setCurrent(a, form);
+
+ Enumeration keys = obj.keys();
+ while (keys.hasMoreElements()) {
+ System.out.println(obj.get(keys.nextElement().toString())
+ + " ");
+ }
+
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ System.out.print(obj + " ");
+ System.out.println();
+
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ getDisplay().setCurrent(a, form);
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ System.out.print(obj.toString() + " ");
+ System.out.println();
+
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ getDisplay().setCurrent(a, form);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ // Callback Interface when a channel is connected
+ public void connectCallback(String channel) {
+ System.out.println("Connect channel:" + channel);
+ }
+
+ // Callback Interface when a channel is reconnected
+ public void reconnectCallback(String channel) {
+ System.out.println("Reconnect channel:" + channel);
+ }
+
+ // Callback Interface when a channel is disconnected
+ public void disconnectCallback(String channel) {
+ System.out.println("Disconnect channel:" + channel);
+ }
+
+ // Callback Interface when error occurs
+ public void errorCallback(String channel, Object message) {
+ System.out.println("Error on channel:" + channel + " Message:" + message.toString());
+ }
+
+ Hashtable args = new Hashtable(6);
+ args.put("channel", "hello_world");
+ // Listen for Messages (Subscribe)
+ _pubnub.subscribe(args);
+
+```
+
+####History
+###DEPRECATED! Please use / migrate existing to detailedHistory() (see below)
+
+```java
+ // Create HashMap parameter
+ Hashtable args = new Hashtable(2);
+ args.put("channel", "hello_world");
+ args.put("limit", new Integer(2)); // Limit
+
+ // Get History
+ _pubnub.history(args);
+
+ public void historyCallback(String channel, Object message) {
+ JSONArray meg = (JSONArray) message;
+ System.out.println("History recevie on channel:" + channel + " Message:" + meg.toString());
+
+ stringItem.setLabel("History");
+ stringItem.setText("History recevie on channel:" + channel + "\n" + meg.toString());
+ }
+```
+
+####Detailed History
+Retrieve published messages.
+#####Required Parameters
+'channel'- Channel name
+#####Options Parameters
+######'start'- Start timetoken
+######'end'- End timetoken
+######'reverse'- false = oldest first (default), true = newest first
+######'count'-Number of History messages. Defaults to 100.
+
+```java
+ Hashtable args = new Hashtable();
+ args.put("channel", Channel);
+ args.put("count", 2+"");
+ _pubnub.detailedHistory(args);
+
+ //Callback
+ public void detailedHistoryCallback(String channel, Object message) {
+ stringItem.setLabel("DetailedHistory");
+ stringItem.setText("channel:" + channel + "\n" + message);
+ }
+```
+
+
+####Unsubscribe
+
+```java
+ // Create Hashtable parameter
+ Hashtable args = new Hashtable(1);
+ String channel = "hello_world";
+ args.put("channel", channel);
+ _pubnub.unsubscribe(args);
+```
+
+####Time
+
+```java
+ // Get server time
+ long time = pubnub.time();
+ System.out.println("Time : "+time);
+```
+
+####here_now
+
+```java
+ // Who is currently on the channel?
+ Hashtable args = new Hashtable();
+ args.put("channel", channel);
+ pubnub.here_now(args);
+
+
+
+ public void hereNowCallback(String channel, Object message) {
+ stringItem.setLabel("HereNow");
+ stringItem.setText("HereNow on channel:" + channel + "\n" + message.toString());
+ }
+```
+
+
+#### Presence
+Join a subscriber list on a channel. Callback events can be, Join - Shows availability on a channel or Leave - Disconnected to channel means removed from the list of subscribers.
+```java
+ _pubnub.presence(Channel);
+
+ //Callback
+ public void presenceCallback(String channel, Object message) {
+ stringItem.setLabel("Presence");
+ stringItem.setText("channel:" + channel + "\n" + message.toString());
+ }
+```
\ No newline at end of file
diff --git a/j2me/build.xml b/j2me/build.xml
new file mode 100644
index 000000000..a8da65cff
--- /dev/null
+++ b/j2me/build.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/j2me/examples/PubnubExample/PubnubExample.jad b/j2me/examples/PubnubExample/PubnubExample.jad
new file mode 100644
index 000000000..e121143eb
--- /dev/null
+++ b/j2me/examples/PubnubExample/PubnubExample.jad
@@ -0,0 +1,8 @@
+MIDlet-1: PubnubExample,,com.pubnub.examples.me.PubnubExample
+MIDlet-Jar-Size: 133733
+MIDlet-Jar-URL: PubnubExample.jar
+MIDlet-Name: PubnubExample MIDlet Suite
+MIDlet-Vendor: MIDlet Suite Vendor
+MIDlet-Version: 1.0.0
+MicroEdition-Configuration: CLDC-1.1
+MicroEdition-Profile: MIDP-2.0
diff --git a/j2me/examples/PubnubExample/PubnubExample.jar b/j2me/examples/PubnubExample/PubnubExample.jar
new file mode 100644
index 000000000..b68cb9475
Binary files /dev/null and b/j2me/examples/PubnubExample/PubnubExample.jar differ
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/AuthKeyConfig.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/AuthKeyConfig.java
new file mode 100644
index 000000000..521d05cd1
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/AuthKeyConfig.java
@@ -0,0 +1,39 @@
+package com.pubnub.examples.me;
+
+import java.util.Hashtable;
+
+import javax.microedition.lcdui.ChoiceGroup;
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class AuthKeyConfig extends PubnubCommand {
+
+ public AuthKeyConfig(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Set Auth Keys");
+ }
+
+ protected void initForm() {
+ final TextField txtAuthKey = new TextField("Auth Key : ", "", 255, TextField.ANY);
+
+ form = new Form("History");
+ form.append(txtAuthKey);
+ form.addCommand(new Command("Set Auth Key", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ _pubnub.setAuthKey(txtAuthKey.getString());
+ display.setCurrent(menu);
+ }
+ });
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DetailedHistory.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DetailedHistory.java
new file mode 100644
index 000000000..91335ea9f
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DetailedHistory.java
@@ -0,0 +1,60 @@
+package com.pubnub.examples.me;
+
+import java.util.Hashtable;
+
+import javax.microedition.lcdui.ChoiceGroup;
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class DetailedHistory extends PubnubCommand {
+
+ public DetailedHistory(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Detailed History");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel : ", "", 255, TextField.ANY);
+ final TextField txtCount = new TextField("Count : ", "1", 10, TextField.NUMERIC);
+ final ChoiceGroup cg = new ChoiceGroup("Reverse?",ChoiceGroup.EXCLUSIVE);
+ cg.append("Yes", null);
+ cg.append("No", null);
+
+ form = new Form("History");
+ form.append(txtChannel);
+ form.append(txtCount);
+ form.append(cg);
+ form.addCommand(new Command("Get History", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+
+
+ _pubnub.detailedHistory(txtChannel.getString(),
+ Integer.parseInt(txtCount.getString()),
+ cg.isSelected(0)?true:false,
+ new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ }
+ });
+
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DisconnectAndResubscribe.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DisconnectAndResubscribe.java
new file mode 100644
index 000000000..d1beb95f5
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/DisconnectAndResubscribe.java
@@ -0,0 +1,21 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Form;
+
+import com.pubnub.api.Pubnub;
+
+public class DisconnectAndResubscribe extends PubnubCommand {
+
+ public DisconnectAndResubscribe(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Disconnect & Resub");
+ }
+
+ public void handler() {
+ _pubnub.disconnectAndResubscribe();
+ }
+ protected void initForm() {
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/HereNow.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/HereNow.java
new file mode 100644
index 000000000..ab65b686e
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/HereNow.java
@@ -0,0 +1,44 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class HereNow extends PubnubCommand {
+
+ public HereNow(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu,"Here Now");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel: ", "", 255, TextField.ANY);
+ form = new Form("Here Now");
+ form.append(txtChannel);
+ form.addCommand(new Command("Here Now", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ _pubnub.hereNow(txtChannel.getString(), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ }
+ });
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/History.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/History.java
new file mode 100644
index 000000000..d2a85e2b5
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/History.java
@@ -0,0 +1,46 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class History extends PubnubCommand {
+
+ public History(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "History");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel : ", "", 255, TextField.ANY);
+ final TextField txtCount = new TextField("Count : ", "", 10, TextField.NUMERIC);
+ form = new Form("History");
+ form.append(txtChannel);
+ form.append(txtCount);
+ form.addCommand(new Command("Get History", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ _pubnub.history(txtChannel.getString(), Integer.parseInt(txtCount.getString()), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ }
+ });
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Presence.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Presence.java
new file mode 100644
index 000000000..13597ef54
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Presence.java
@@ -0,0 +1,50 @@
+package com.pubnub.examples.me;
+
+import java.util.Hashtable;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Presence extends PubnubCommand {
+
+ public Presence(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Presence");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel: ", "", 255, TextField.ANY);
+ form = new Form("Subscribe");
+ form.append(txtChannel);
+ form.addCommand(new Command("Subscribe", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+
+ try {
+ _pubnub.presence(txtChannel.getString(), new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser("Channel " + channel + " : " + message.toString());
+ }
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser("Channel " + channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ } catch (Exception e) {
+
+ }
+
+ }});
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Publish.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Publish.java
new file mode 100644
index 000000000..a23421df4
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Publish.java
@@ -0,0 +1,64 @@
+package com.pubnub.examples.me;
+
+import java.util.Hashtable;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+import com.pubnub.api.PubnubException;
+
+import org.json.me.JSONException;
+import org.json.me.JSONObject;
+
+public class Publish extends PubnubCommand {
+
+
+ public Publish(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display,menu, "Publish");
+ cmd = new Command("Publish", Command.ITEM, 0);
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel: ", "", 255, TextField.ANY);
+ final TextField txtMessage = new TextField("Message: ", "", 255, TextField.ANY);
+ form = new Form("Publish");
+ form.append(txtChannel);
+ form.append(txtMessage);
+ form.addCommand(new Command("Publish", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ try {
+ JSONObject message = new JSONObject();
+ message.put("message", txtMessage.getString());
+
+ Hashtable args = new Hashtable(2);
+ args.put("channel", txtChannel.getString()); // Channel Name
+ args.put("message", message); // JSON Message
+ _pubnub.publish(args, new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ } catch (JSONException ex) {
+
+ }
+
+ }});
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubCommand.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubCommand.java
new file mode 100644
index 000000000..9683fb0a5
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubCommand.java
@@ -0,0 +1,76 @@
+package com.pubnub.examples.me;
+
+import java.util.Enumeration;
+
+import javax.microedition.lcdui.Alert;
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Form;
+
+import org.json.me.JSONArray;
+import org.json.me.JSONObject;
+
+import com.pubnub.api.Pubnub;
+
+public abstract class PubnubCommand {
+
+ protected Display display;
+ protected Form menu;
+ protected Form form;
+ protected Pubnub _pubnub;
+
+ protected Command cmd;
+
+
+ protected abstract void initForm();
+
+ public PubnubCommand(Pubnub pubnub, Display display, Form menu, String command) {
+ this.display = display;
+ this.menu = menu;
+ this._pubnub = pubnub;
+ this.cmd = new Command(command, Command.ITEM, 0);
+ }
+
+ public void notifyUser(Object message) {
+ try {
+ if (message instanceof JSONObject) {
+ JSONObject obj = (JSONObject) message;
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ display.setCurrent(a, menu);
+
+ Enumeration keys = obj.keys();
+ while (keys.hasMoreElements()) {
+ }
+
+ } else if (message instanceof String) {
+ String obj = (String) message;
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ display.setCurrent(a, menu);
+ } else if (message instanceof JSONArray) {
+ JSONArray obj = (JSONArray) message;
+ Alert a = new Alert("Received", obj.toString(), null, null);
+ a.setTimeout(Alert.FOREVER);
+ display.setCurrent(a, menu);
+ }
+ } catch (Exception e) {
+
+ }
+
+ }
+
+ public void handler() {
+
+ if (form == null)
+ initForm();
+ display.setCurrent(form);
+
+ }
+
+ public Command getCommand() {
+ return cmd;
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubDemoConsole.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubDemoConsole.java
new file mode 100644
index 000000000..7c64dfd84
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubDemoConsole.java
@@ -0,0 +1,106 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.midlet.MIDlet;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubException;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import javax.microedition.lcdui.*;
+
+import org.json.me.JSONArray;
+import org.json.me.JSONException;
+import org.json.me.JSONObject;
+
+public class PubnubDemoConsole extends MIDlet {
+
+ private boolean midletPaused = false;
+
+ Pubnub _pubnub;
+ Display display;
+
+ PubnubMenu menu;
+
+ public PubnubDemoConsole() {
+ }
+
+
+
+
+
+ private void init() {
+ _pubnub = new Pubnub("demo", "demo", "demo", false);
+ display = Display.getDisplay(this);
+ menu = new PubnubMenu(_pubnub, display, this);
+
+ }
+
+ /**
+ * Performs an action assigned to the Mobile Device - MIDlet Started point.
+ */
+ public void startMIDlet() {
+ init();
+ switchDisplayable(null, menu.getMenu());
+ _pubnub.setResumeOnReconnect(true);
+ }
+
+ /**
+ * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
+ */
+ public void resumeMIDlet() {
+ }
+
+ public void switchDisplayable(Alert alert, Displayable nextDisplayable) {
+ Display display = this.display;
+ if (alert == null) {
+ display.setCurrent(nextDisplayable);
+ } else {
+ display.setCurrent(alert, nextDisplayable);
+ }
+ }
+
+ /**
+ * Exits MIDlet.
+ */
+ public void exitMIDlet() {
+ switchDisplayable(null, null);
+ destroyApp(true);
+ notifyDestroyed();
+ }
+
+ /**
+ * Called when MIDlet is started. Checks whether the MIDlet have been
+ * already started and initialize/starts or resumes the MIDlet.
+ */
+ public void startApp() {
+
+ if (midletPaused) {
+ resumeMIDlet();
+ } else {
+
+ startMIDlet();
+ }
+ midletPaused = false;
+ }
+
+ /**
+ * Called when MIDlet is paused.
+ */
+ public void pauseApp() {
+ midletPaused = true;
+ }
+
+ /**
+ * Called to signal the MIDlet to terminate.
+ *
+ * @param unconditional
+ * if true, then the MIDlet has to be unconditionally terminated
+ * and all resources has to be released.
+ */
+ public void destroyApp(boolean unconditional) {
+ }
+
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubMenu.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubMenu.java
new file mode 100644
index 000000000..cde87198e
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/PubnubMenu.java
@@ -0,0 +1,128 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+
+import com.pubnub.api.Pubnub;
+
+public class PubnubMenu {
+ private Form menu;
+ private Pubnub pubnub;
+ private Display display;
+ private PubnubDemoConsole app;
+ public PubnubMenu(Pubnub pubnub, Display display, PubnubDemoConsole app) {
+ this.pubnub = pubnub;
+ this.display = display;
+ this.app = app;
+ }
+
+ public Form getMenu() {
+ final Publish publish;
+ final History history;
+ final Subscribe subscribe;
+ final DetailedHistory detailedHistory;
+ final HereNow hereNow;
+ final Presence presence;
+ final Unsubscribe unsubscribe;
+
+ final ToggleResumeOnReconnect toggleResumeOnReconnect;
+ final Time time;
+ final DisconnectAndResubscribe disconnectAndResubscribe;
+ final AuthKeyConfig authKeyConfig;
+ if (menu == null) {
+ final Command exitCommand;
+ final Command publishCommand;
+ final Command historyCommand;
+ final Command subscribeCommand;
+ final Command timeCommand;
+
+ final Command unsubscribeCommand;
+
+ final Command hereNowCommand;
+ final Command presenceCommand;
+ final Command detailedHistoryCommand;
+ final Command disconnectAndResubscribeCommand;
+ final Command toggleResumeOnReconnectCommand;
+ final Command authKeyConfigCommand;
+
+ menu = new Form("Pubnub Demo Console");
+ publish = new Publish(pubnub, display, menu);
+ history = new History(pubnub, display, menu);
+ subscribe = new Subscribe(pubnub,display,menu);
+ presence = new Presence(pubnub,display,menu);
+ detailedHistory = new DetailedHistory(pubnub,display,menu);
+ hereNow = new HereNow(pubnub,display,menu);
+ unsubscribe = new Unsubscribe(pubnub,display,menu);
+ toggleResumeOnReconnect = new ToggleResumeOnReconnect(pubnub,display,menu);
+ disconnectAndResubscribe = new DisconnectAndResubscribe(pubnub,display,menu);
+ authKeyConfig = new AuthKeyConfig(pubnub,display,menu);
+ time = new Time(pubnub,display,menu);
+
+
+ toggleResumeOnReconnectCommand = new Command("ToggleResumeOnReconnect", Command.ITEM, 0);
+ menu.addCommand(toggleResumeOnReconnectCommand);
+ disconnectAndResubscribeCommand = new Command("DisconnectAndResubscribe",Command.ITEM, 0);
+ menu.addCommand(disconnectAndResubscribeCommand);
+ detailedHistoryCommand = new Command("DetailedHistory", Command.ITEM, 0);
+ menu.addCommand(detailedHistoryCommand);
+ presenceCommand = new Command("Presence", Command.ITEM, 0);
+ menu.addCommand(presenceCommand);
+ publishCommand = publish.getCommand();
+ menu.addCommand(publishCommand);
+ timeCommand = new Command("Time", Command.ITEM, 2);
+ menu.addCommand(timeCommand);
+ historyCommand = new Command("History", Command.ITEM, 1);
+ menu.addCommand(historyCommand);
+ subscribeCommand = new Command("Subscribe", Command.ITEM, 0);
+ menu.addCommand(subscribeCommand);
+ unsubscribeCommand = new Command("Unsubscribe", Command.ITEM, 0);
+ menu.addCommand(unsubscribeCommand);
+
+ hereNowCommand = new Command("HereNow", Command.ITEM, 1);
+ menu.addCommand(hereNowCommand);
+ exitCommand = new Command("Exit", Command.EXIT, 0);
+ menu.addCommand(exitCommand);
+ authKeyConfigCommand = new Command("Set Auth Key", Command.ITEM, 0);
+ menu.addCommand(authKeyConfigCommand);
+
+ menu.setCommandListener(new CommandListener() {
+
+ public void commandAction(Command command, Displayable displayable) {
+ if (command == exitCommand) {
+ app.exitMIDlet();
+ } else if (command == historyCommand) {
+ history.handler();
+ } else if (command == publishCommand) {
+ publish.handler();
+ } else if (command == subscribeCommand) {
+ subscribe.handler();
+ } else if (command == timeCommand) {
+ time.handler();
+ } else if (command == unsubscribeCommand) {
+ unsubscribe.handler();
+ } else if (command == hereNowCommand) {
+ hereNow.handler();
+ } else if (command == presenceCommand) {
+ presence.handler();
+ } else if (command == detailedHistoryCommand) {
+ detailedHistory.handler();
+ } else if (command == disconnectAndResubscribeCommand) {
+ disconnectAndResubscribe.handler();
+ } else if (command == toggleResumeOnReconnectCommand) {
+ toggleResumeOnReconnect.handler();
+ } else if (command == authKeyConfigCommand) {
+ authKeyConfig.handler();
+ }
+
+
+ }
+ });
+ }
+
+ return menu;
+
+ }
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Subscribe.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Subscribe.java
new file mode 100644
index 000000000..7599ece05
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Subscribe.java
@@ -0,0 +1,65 @@
+package com.pubnub.examples.me;
+
+import java.util.Hashtable;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Subscribe extends PubnubCommand {
+
+ public Subscribe(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Subscribe");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel: ", "", 255, TextField.ANY);
+ form = new Form("Subscribe");
+ form.append(txtChannel);
+ form.addCommand(new Command("Subscribe", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ Hashtable args = new Hashtable();
+ args.put("channel", txtChannel.getString());
+
+ try {
+ _pubnub.subscribe(args, new Callback() {
+ public void connectCallback(String channel, Object message) {
+ notifyUser("CONNECT on channel:" + channel);
+ }
+
+ public void disconnectCallback(String channel, Object message) {
+ notifyUser("DISCONNECT on channel:" + channel);
+ }
+
+ public void reconnectCallback(String channel, Object message) {
+ notifyUser("RECONNECT on channel:" + channel);
+ }
+
+ public void successCallback(String channel, Object message) {
+ notifyUser("Channel " + channel + " : " + message.toString());
+ }
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser("Channel " + channel + " : " + error.toString());
+ }
+ });
+ display.setCurrent(menu);
+
+ } catch (Exception e) {
+
+ }
+
+ }});
+
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Time.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Time.java
new file mode 100644
index 000000000..824e0bc8a
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Time.java
@@ -0,0 +1,29 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Form;
+
+import com.pubnub.api.Callback;
+import com.pubnub.api.Pubnub;
+import com.pubnub.api.PubnubError;
+
+public class Time extends PubnubCommand {
+
+ public Time(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Time");
+ }
+
+ protected void initForm() {
+ }
+ public void handler() {
+ _pubnub.time( new Callback() {
+ public void successCallback(String channel, Object message) {
+ notifyUser(message.toString());
+ }
+
+ public void errorCallback(String channel, PubnubError error) {
+ notifyUser(error.toString());
+ }
+ });
+ }
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/ToggleResumeOnReconnect.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/ToggleResumeOnReconnect.java
new file mode 100644
index 000000000..57bbcf036
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/ToggleResumeOnReconnect.java
@@ -0,0 +1,22 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Form;
+
+import com.pubnub.api.Pubnub;
+
+public class ToggleResumeOnReconnect extends PubnubCommand {
+
+ public ToggleResumeOnReconnect(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Toggle Resume on Reconnect");
+ }
+
+ public void handler() {
+ _pubnub.setResumeOnReconnect((_pubnub.isResumeOnReconnect())?false:true);
+ }
+
+ protected void initForm() {
+
+ }
+
+}
diff --git a/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Unsubscribe.java b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Unsubscribe.java
new file mode 100644
index 000000000..6b579676f
--- /dev/null
+++ b/j2me/examples/PubnubExample/src/com/pubnub/examples/me/Unsubscribe.java
@@ -0,0 +1,35 @@
+package com.pubnub.examples.me;
+
+import javax.microedition.lcdui.Command;
+import javax.microedition.lcdui.CommandListener;
+import javax.microedition.lcdui.Display;
+import javax.microedition.lcdui.Displayable;
+import javax.microedition.lcdui.Form;
+import javax.microedition.lcdui.TextField;
+
+import com.pubnub.api.Pubnub;
+
+public class Unsubscribe extends PubnubCommand {
+
+ public Unsubscribe(Pubnub pubnub, Display display, Form menu) {
+ super(pubnub, display, menu, "Unsubscribe");
+ }
+
+ protected void initForm() {
+ final TextField txtChannel = new TextField("Channel: ", "", 255, TextField.ANY);
+ form = new Form("Unsubscribe");
+ form.append(txtChannel);
+ form.addCommand(new Command("Unsubscribe", Command.OK, 2));
+
+ form.setCommandListener(new CommandListener() {
+ public void commandAction(Command arg0, Displayable arg1) {
+ _pubnub.unsubscribe(txtChannel.getString());
+ display.setCurrent(menu);
+
+ }
+ });
+
+
+ }
+
+}
diff --git a/j2me/libs/bouncycastle.jar b/j2me/libs/bouncycastle.jar
new file mode 100644
index 000000000..61c4c38d7
Binary files /dev/null and b/j2me/libs/bouncycastle.jar differ
diff --git a/j2me/libs/cldc_1.1.jar b/j2me/libs/cldc_1.1.jar
new file mode 100644
index 000000000..670fe0a1b
Binary files /dev/null and b/j2me/libs/cldc_1.1.jar differ
diff --git a/j2me/libs/jsonme.jar b/j2me/libs/jsonme.jar
new file mode 100644
index 000000000..a55f7dcad
Binary files /dev/null and b/j2me/libs/jsonme.jar differ
diff --git a/j2me/libs/jsr177_1.0.jar b/j2me/libs/jsr177_1.0.jar
new file mode 100644
index 000000000..9ab4f2b87
Binary files /dev/null and b/j2me/libs/jsr177_1.0.jar differ
diff --git a/j2me/libs/midp_2.0.jar b/j2me/libs/midp_2.0.jar
new file mode 100644
index 000000000..0eb005a99
Binary files /dev/null and b/j2me/libs/midp_2.0.jar differ
diff --git a/j2me/libs/tinylinegzip.jar b/j2me/libs/tinylinegzip.jar
new file mode 100644
index 000000000..40cfcd1ca
Binary files /dev/null and b/j2me/libs/tinylinegzip.jar differ
diff --git a/j2me/src/com/pubnub/api/Pubnub.java b/j2me/src/com/pubnub/api/Pubnub.java
new file mode 100644
index 000000000..f22549dee
--- /dev/null
+++ b/j2me/src/com/pubnub/api/Pubnub.java
@@ -0,0 +1,89 @@
+package com.pubnub.api;
+
+import org.bouncycastle.util.SecureRandom;
+import org.json.me.*;
+
+public class Pubnub extends PubnubCore {
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ String cipher_key, boolean ssl_on, String initialization_vector) {
+ super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on, initialization_vector);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key,
+ boolean ssl_on) {
+ super(publish_key, subscribe_key, secret_key, "", ssl_on);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key) {
+ super(publish_key, subscribe_key, "", "", false);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, boolean ssl) {
+ super(publish_key, subscribe_key, "", "", ssl);
+ }
+
+ public Pubnub(String publish_key, String subscribe_key, String secret_key) {
+ super(publish_key, subscribe_key, secret_key, "", false);
+ }
+
+ /**
+ * UUID
+ *
+ * 32 digit UUID generation at client side.
+ *
+ * @return String uuid.
+ */
+ public String uuid() {
+
+ String valueBeforeMD5;
+ String valueAfterMD5;
+ SecureRandom mySecureRand = new SecureRandom();
+ String s_id = String.valueOf(PubnubCore.class.hashCode());
+ StringBuffer sbValueBeforeMD5 = new StringBuffer();
+ try {
+ long time = System.currentTimeMillis();
+ long rand = 0;
+ rand = mySecureRand.nextLong();
+ sbValueBeforeMD5.append(s_id);
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(time));
+ sbValueBeforeMD5.append(":");
+ sbValueBeforeMD5.append(Long.toString(rand));
+ valueBeforeMD5 = sbValueBeforeMD5.toString();
+ byte[] array = PubnubCrypto.md5(valueBeforeMD5);
+ StringBuffer sb = new StringBuffer();
+ for (int j = 0; j < array.length; ++j) {
+ int b = array[j] & 0xFF;
+ if (b < 0x10) {
+ sb.append('0');
+ }
+ sb.append(Integer.toHexString(b));
+ }
+ valueAfterMD5 = sb.toString();
+ String raw = valueAfterMD5.toUpperCase();
+ sb = new StringBuffer();
+ sb.append(raw.substring(0, 8));
+ sb.append("-");
+ sb.append(raw.substring(8, 12));
+ sb.append("-");
+ sb.append(raw.substring(12, 16));
+ sb.append("-");
+ sb.append(raw.substring(16, 20));
+ sb.append("-");
+ sb.append(raw.substring(20));
+ return sb.toString();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ protected String getUserAgent() {
+ return "J2me/" + VERSION;
+ }
+}
diff --git a/j2me/src1/com/pubnub/api/HttpClientCore.java b/j2me/src1/com/pubnub/api/HttpClientCore.java
new file mode 100644
index 000000000..c66d3744c
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/HttpClientCore.java
@@ -0,0 +1,228 @@
+package com.pubnub.api;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.microedition.io.Connector;
+import javax.microedition.io.HttpConnection;
+
+import com.tinyline.util.GZIPInputStream;
+
+import org.json.me.*;
+
+public class HttpClientCore extends HttpClient {
+ private int requestTimeout = 310000;
+ private int connectionTimeout = 5000;
+ private HttpConnection hc;
+
+ private void init() {
+
+ }
+
+ public HttpClientCore(int connectionTimeout, int requestTimeout, Hashtable headers) {
+ init();
+ this.setRequestTimeout(requestTimeout);
+ this.setConnectionTimeout(connectionTimeout);
+ this._headers = headers;
+ }
+
+
+ public int getRequestTimeout() {
+ return requestTimeout;
+ }
+
+ public void setRequestTimeout(int requestTimeout) {
+ this.requestTimeout = requestTimeout;
+ }
+
+ private String readResponse(HttpConnection hconn) {
+ InputStream in = null;
+ String prefix = "";
+ try {
+ StringBuffer b = new StringBuffer();
+ int ch;
+ b.append(prefix);
+ in = hconn.openInputStream();
+ if ("gzip".equals(hconn.getEncoding()))
+ in= new GZIPInputStream(in);
+
+ byte[] data = null;
+ ByteArrayOutputStream tmp = new ByteArrayOutputStream();
+
+ while ((ch = in.read()) != -1) {
+ tmp.write(ch);
+ }
+ data = tmp.toByteArray();
+ tmp.close();
+ b.append(new String(data, "UTF-8"));
+
+ if (b.length() > 0) {
+ return b.toString();
+ } else
+ return null;
+
+ } catch (IOException ioe) {
+ return null;
+ } finally {
+ if (in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+
+ public boolean isRedirect(int rc) {
+ return (rc == HttpConnection.HTTP_MOVED_PERM
+ || rc == HttpConnection.HTTP_MOVED_TEMP
+ || rc == HttpConnection.HTTP_SEE_OTHER || rc == HttpConnection.HTTP_TEMP_REDIRECT);
+ }
+
+ public boolean isOk(int rc) {
+ return (rc == HttpConnection.HTTP_OK);
+ }
+
+ public boolean checkResponse(int rc) {
+
+ return (rc == HttpConnection.HTTP_OK || isRedirect(rc));
+ }
+
+ public HttpResponse fetch(String url) throws PubnubException, IOException {
+ return fetch(url, null);
+ }
+
+ public HttpResponse fetch(String url, Hashtable headers) throws PubnubException, IOException {
+ if (url == null)
+ throw new IOException("Invalid Url");
+
+ int follow = 5;
+ int rc = 0;
+ hc = null;
+ String response = null;
+
+ while (follow-- > 0) {
+
+ hc = (HttpConnection) Connector.open(url, Connector.READ_WRITE,
+ true);
+ hc.setRequestMethod(HttpConnection.GET);
+ if (_headers != null) {
+ Enumeration en = _headers.keys();
+ while (en.hasMoreElements()) {
+ String key = (String) en.nextElement();
+ String val = (String) _headers.get(key);
+ hc.setRequestProperty(key, val);
+ }
+ }
+ if (headers != null) {
+ Enumeration en = headers.keys();
+ while (en.hasMoreElements()) {
+ String key = (String) en.nextElement();
+ String val = (String) headers.get(key);
+ hc.setRequestProperty(key, val);
+ }
+ }
+
+ rc = hc.getResponseCode();
+
+
+
+ if (!checkResponse(rc)) {
+ break;
+ } else if (!isRedirect(rc)) {
+ break;
+ }
+
+ url = hc.getHeaderField("Location");
+
+ if (url == null) {
+ throw new IOException("No Location header");
+ }
+
+ if (url.startsWith("/")) {
+ StringBuffer b = new StringBuffer();
+ b.append("https://");
+ b.append(hc.getHost());
+ b.append(':');
+ b.append(hc.getPort());
+ b.append(url);
+ url = b.toString();
+ } else if (url.startsWith("ttp:")) {
+ url = "h" + url;
+ }
+ hc.close();
+ }
+
+ if (follow == 0) {
+ throw new IOException("Too many redirects");
+ }
+
+ response = readResponse(hc);
+ switch (rc) {
+ case HttpUtil.HTTP_FORBIDDEN:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_FORBIDDEN, response));
+ case HttpUtil.HTTP_UNAUTHORIZED:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_UNAUTHORIZED, response));
+ case HttpUtil.HTTP_BAD_REQUEST:
+ try {
+ JSONArray jsarr = new JSONArray(response);
+ String error = jsarr.get(1).toString();
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_BAD_REQUEST, 1, error));
+ } catch (JSONException e) {
+ JSONObject jso;
+ try {
+ jso = new JSONObject(response);
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_BAD_REQUEST, 2, jso.toString()));
+ } catch (JSONException e1) {
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_INVALID_JSON, 2));
+ }
+ }
+ case HttpUtil.HTTP_BAD_GATEWAY:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_BAD_GATEWAY, url));
+ case HttpUtil.HTTP_CLIENT_TIMEOUT:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_CLIENT_TIMEOUT, url));
+ case HttpUtil.HTTP_GATEWAY_TIMEOUT:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_GATEWAY_TIMEOUT, url));
+ case HttpUtil.HTTP_INTERNAL_ERROR:
+ throw new PubnubException(PubnubError.getErrorObject(PubnubError.PNERROBJ_INTERNAL_ERROR, url));
+ default:
+ break;
+ }
+
+ hc.close();
+ return new HttpResponse(rc, response);
+ }
+
+ public int getConnectionTimeout() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void setConnectionTimeout(int connectionTimeout) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void abortCurrentRequest() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean checkResponseSuccess(int rc) {
+ return (rc == HttpConnection.HTTP_OK);
+ }
+
+ public void shutdown() {
+ try {
+ if (hc != null) {
+ hc.close();
+ }
+
+ } catch (IOException e) {
+
+ }
+ }
+}
diff --git a/j2me/src1/com/pubnub/api/NonSubscribeManager.java b/j2me/src1/com/pubnub/api/NonSubscribeManager.java
new file mode 100644
index 000000000..91310d1c7
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/NonSubscribeManager.java
@@ -0,0 +1,13 @@
+package com.pubnub.api;
+
+class NonSubscribeManager extends AbstractNonSubscribeManager {
+
+ public NonSubscribeManager(String name, int connectionTimeout,
+ int requestTimeout) {
+ super(name, connectionTimeout, requestTimeout);
+ }
+
+ public void clearRequestQueue() {
+ _waiting.removeAllElements();
+ }
+}
diff --git a/j2me/src1/com/pubnub/api/PubnubCrypto.java b/j2me/src1/com/pubnub/api/PubnubCrypto.java
new file mode 100644
index 000000000..46963fc11
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/PubnubCrypto.java
@@ -0,0 +1,47 @@
+package com.pubnub.api;
+
+import org.bouncycastle.crypto.digests.SHA256Digest;
+import org.bouncycastle.crypto.macs.HMac;
+import org.bouncycastle.crypto.params.KeyParameter;
+import org.bouncycastle.util.BigInteger;
+
+public class PubnubCrypto extends PubnubCryptoCore {
+
+ public PubnubCrypto(String CIPHER_KEY) {
+ super(CIPHER_KEY);
+ }
+
+ public PubnubCrypto(String CIPHER_KEY, String IV) {
+ super(CIPHER_KEY, IV);
+ }
+
+ /**
+ * Sign Message
+ *
+ * @param String
+ * input
+ * @return String as HashText
+ */
+ public String getHMacSHA256(String secret_key, String input) {
+
+ String signature = "0";
+ try {
+ HMac m = new HMac(new SHA256Digest());
+ m.init(new KeyParameter(secret_key.getBytes("UTF-8")));
+ byte[] bytes = input.getBytes("UTF-8");
+ m.update(bytes, 0, bytes.length);
+ byte[] mac = new byte[m.getMacSize()];
+ m.doFinal(mac, 0);
+ BigInteger number = new BigInteger(1,mac);
+ String hashtext = number.toString();
+ signature = hashtext;
+ } catch (java.io.UnsupportedEncodingException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return signature;
+ }
+
+}
diff --git a/j2me/src1/com/pubnub/api/PubnubUtil.java b/j2me/src1/com/pubnub/api/PubnubUtil.java
new file mode 100644
index 000000000..2b4c59679
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/PubnubUtil.java
@@ -0,0 +1,147 @@
+package com.pubnub.api;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import org.json.me.*;
+
+public class PubnubUtil extends PubnubUtilCore {
+
+
+ private static String replace( String str, String pattern, String replace ) {
+ int s = 0;
+ int e = 0;
+ StringBuffer result = new StringBuffer();
+
+ while ( (e = str.indexOf( pattern, s ) ) >= 0 ) {
+ result.append(str.substring( s, e ) );
+ result.append( replace );
+ s = e+pattern.length();
+ }
+ result.append( str.substring( s ) );
+ return result.toString();
+ }
+
+ /**
+ * Returns encoded String
+ *
+ * @param sUrl
+ * , input string
+ * @return , encoded string
+ */
+ public static String urlEncode(String sUrl) {
+ try {
+ return replace(encode(sUrl, "UTF-8"),"+", "%20");
+ } catch (UnsupportedEncodingException e) {
+ return null;
+ }
+ }
+
+
+ public static String encode(String s, String enc)
+ throws UnsupportedEncodingException {
+
+ boolean needToChange = false;
+ boolean wroteUnencodedChar = false;
+ int maxBytesPerChar = 10;
+ StringBuffer out = new StringBuffer(s.length());
+ ByteArrayOutputStream buf = new ByteArrayOutputStream(maxBytesPerChar);
+
+ OutputStreamWriter writer = new OutputStreamWriter(buf, enc);
+
+ for (int i = 0; i < s.length(); i++) {
+ int c = (int) s.charAt(i);
+ if (dontNeedEncoding(c)) {
+ if (c == ' ') {
+ c = '+';
+ needToChange = true;
+ }
+ out.append((char)c);
+ wroteUnencodedChar = true;
+ } else {
+ try {
+ if (wroteUnencodedChar) {
+ writer = new OutputStreamWriter(buf, enc);
+ wroteUnencodedChar = false;
+ }
+ writer.write(c);
+ if (c >= 0xD800 && c <= 0xDBFF) {
+
+ if ( (i+1) < s.length()) {
+ int d = (int) s.charAt(i+1);
+ if (d >= 0xDC00 && d <= 0xDFFF) {
+ writer.write(d);
+ i++;
+ }
+ }
+ }
+ writer.flush();
+ } catch (IOException e) {
+ buf.reset();
+ continue;
+ }
+ byte[] ba = buf.toByteArray();
+ for (int j = 0; j < ba.length; j++) {
+ out.append('%');
+ char ch = CCharacter.forDigit((ba[j] >> 4) & 0xF, 16);
+ out.append(ch);
+ ch = CCharacter.forDigit(ba[j] & 0xF, 16);
+ out.append(ch);
+ }
+ buf.reset();
+ needToChange = true;
+ }
+ }
+
+ return (needToChange? out.toString() : s);
+ }
+
+ static class CCharacter {
+ public static char forDigit(int digit, int radix) {
+ if ((digit >= radix) || (digit < 0)) {
+ return '\0';
+ }
+ if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) {
+ return '\0';
+ }
+ if (digit < 10) {
+ return (char)('0' + digit);
+ }
+ return (char)('a' - 10 + digit);
+ }
+ }
+ public static boolean dontNeedEncoding(int ch) {
+ int len = _dontNeedEncoding.length();
+ boolean en = false;
+ for (int i =0; i< len; i++) {
+ if (_dontNeedEncoding.charAt(i) == ch) {
+ en = true;
+ break;
+ }
+ }
+
+ return en;
+ }
+
+ /**
+ * Convert input String to JSONObject, JSONArray, or String
+ *
+ * @param str
+ * JSON data in string format
+ *
+ * @return JSONArray or JSONObject or String
+ */
+ static Object stringToJSON(String str) {
+ try {
+ return new JSONArray(str);
+ } catch (JSONException e) {
+ }
+ try {
+ return new JSONObject(str);
+ } catch (JSONException ex) {
+ }
+ return str;
+ }
+ private static String _dontNeedEncoding = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_.*";
+}
diff --git a/j2me/src1/com/pubnub/api/SubscribeManager.java b/j2me/src1/com/pubnub/api/SubscribeManager.java
new file mode 100644
index 000000000..f6105f943
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/SubscribeManager.java
@@ -0,0 +1,24 @@
+package com.pubnub.api;
+
+class SubscribeManager extends AbstractSubscribeManager {
+
+ public SubscribeManager(String name, int connectionTimeout,
+ int requestTimeout) {
+ super(name, connectionTimeout, requestTimeout);
+ }
+
+ public void resetWorkersConnections() {
+ for (int i = 0; i < _workers.length; i++) {
+ _workers[i].die();
+ _workers[i].interruptWorker();
+ Worker w = getWorker();
+ w.setThread(new Thread(w,name));
+ _workers[i] = w;
+ w.startWorker();
+ }
+ }
+
+ public void clearRequestQueue() {
+ _waiting.removeAllElements();
+ }
+}
diff --git a/j2me/src1/com/pubnub/api/SubscribeWorker.java b/j2me/src1/com/pubnub/api/SubscribeWorker.java
new file mode 100644
index 000000000..d83faf446
--- /dev/null
+++ b/j2me/src1/com/pubnub/api/SubscribeWorker.java
@@ -0,0 +1,105 @@
+package com.pubnub.api;
+
+import java.util.Hashtable;
+import java.util.Vector;
+
+class SubscribeWorker extends AbstractSubscribeWorker {
+
+ private Exception excp = null;
+
+ SubscribeWorker(Vector _requestQueue, int connectionTimeout,
+ int requestTimeout, int maxRetries, int retryInterval, Hashtable headers) {
+ super(_requestQueue, connectionTimeout, requestTimeout,
+ maxRetries, retryInterval, headers);
+ }
+
+ SubscribeWorker(Vector _requestQueue, int connectionTimeout,
+ int requestTimeout, int maxRetries, int retryInterval, int windowInterval, Hashtable headers) {
+ super(_requestQueue, connectionTimeout, requestTimeout,
+ maxRetries, retryInterval, windowInterval, headers);
+ }
+
+ void process(HttpRequest hreq) {
+ HttpResponse hresp = null;
+ int currentRetryAttempt = (hreq.isDar())?1:maxRetries;
+ log.verbose("disconnectAndResubscribe is " + hreq.isDar());
+ boolean sleep = false;
+ if (!hreq.isSubzero() && windowInterval != 0) {
+ try {
+ Thread.sleep(windowInterval);
+ } catch (InterruptedException e) {
+ }
+ }
+ while (!_die && currentRetryAttempt <= maxRetries) {
+ if (sleep) {
+ try {
+ Thread.sleep(retryInterval);
+ } catch (InterruptedException e) {
+ }
+ sleep = true;
+ }
+ try {
+ log.debug(hreq.getUrl());
+ hresp = httpclient.fetch(hreq.getUrl(), hreq.getHeaders());
+ if (hresp != null
+ && HttpUtil.checkResponseSuccess(hresp
+ .getStatusCode())) {
+ currentRetryAttempt = 1;
+ break;
+ }
+ } /*catch (SocketTimeoutException e) {
+ log.verbose("No Traffic , Read Timeout Exception in Fetch : " + e.toString());
+ if (hreq.isDar()) {
+ hreq.getResponseHandler().handleBackFromDar(hreq);
+ return;
+ }
+ break;
+
+ }*/catch (PubnubException e) {
+ excp = e;
+ switch (e.getPubnubError().errorCode) {
+ case PubnubError.PNERR_FORBIDDEN:
+ case PubnubError.PNERR_UNAUTHORIZED:
+ log.verbose("Authentication Failure : " + e.toString());
+ currentRetryAttempt = maxRetries + 1;
+ break;
+ default:
+ log.verbose("Retry Attempt : " + ((currentRetryAttempt == maxRetries)?"last":String.valueOf(currentRetryAttempt))
+ + " Exception in Fetch : " + e.toString());
+ currentRetryAttempt++;
+ break;
+ }
+
+ } catch (Exception e) {
+ log.verbose("Retry Attempt : " + ((currentRetryAttempt == maxRetries)?"last":String.valueOf(currentRetryAttempt))
+ + " Exception in Fetch : " + e.toString());
+ currentRetryAttempt++;
+ }
+
+
+ }
+ if (!_die) {
+ if (hresp == null) {
+ log.debug("Error in fetching url : " + hreq.getUrl());
+ if (hreq.isDar()) {
+ log.verbose("Exhausted number of retries");
+ hreq.getResponseHandler().handleTimeout(hreq);
+ } else {
+ if (excp != null && excp instanceof PubnubException && ((PubnubException) excp).getPubnubError() != null) {
+ hreq.getResponseHandler().handleError(hreq, ((PubnubException) excp).getPubnubError());
+ } else {
+ hreq.getResponseHandler().handleError(hreq, PubnubError.getErrorObject(PubnubError.PNERROBJ_HTTP_ERROR, 1));
+ }
+ }
+ return;
+ }
+ log.debug(hresp.getResponse());
+ hreq.getResponseHandler().handleResponse(hreq, hresp.getResponse());
+ }
+
+ }
+ public void shutdown() {
+ if (httpclient != null) httpclient.shutdown();
+ }
+
+}
diff --git a/j2me/srcLogging/com/pubnub/api/Logger.java b/j2me/srcLogging/com/pubnub/api/Logger.java
new file mode 100644
index 000000000..087a1208d
--- /dev/null
+++ b/j2me/srcLogging/com/pubnub/api/Logger.java
@@ -0,0 +1,32 @@
+package com.pubnub.api;
+
+
+
+class Logger extends AbstractLogger {
+ private Class _class;
+
+ public Logger(Class _class) {
+ this._class = _class;
+ }
+
+ protected void nativeDebug(String s) {
+ System.out.println("["+Thread.activeCount()+ "] Thread ID : " + Thread.currentThread().hashCode() + " " + s);
+
+ }
+
+ protected void nativeVerbose(String s) {
+ System.out.println("["+Thread.activeCount()+ "] Thread ID : " + Thread.currentThread().hashCode() + " " + s);
+ }
+
+
+ protected void nativeError(String s) {
+ System.out.println("["+Thread.activeCount()+ "] Thread ID : " + Thread.currentThread().hashCode() + " " + s);
+
+ }
+
+ protected void nativeInfo(String s) {
+ System.out.println("["+Thread.activeCount()+ "] Thread ID : " + Thread.currentThread().hashCode() + " " + s);
+
+ }
+
+}
diff --git a/java/LICENSE b/java/LICENSE
new file mode 100644
index 000000000..3efa3922e
--- /dev/null
+++ b/java/LICENSE
@@ -0,0 +1,27 @@
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
+
+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.
+
+PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
+Copyright (c) 2013 PubNub Inc.
+http://www.pubnub.com/
+http://www.pubnub.com/terms
diff --git a/java/Pubnub-StandardEdition-3.5.6.jar b/java/Pubnub-StandardEdition-3.5.6.jar
new file mode 100644
index 000000000..ede71a8ac
Binary files /dev/null and b/java/Pubnub-StandardEdition-3.5.6.jar differ
diff --git a/java/Pubnub-StandardEdition-Debug-3.5.6.jar b/java/Pubnub-StandardEdition-Debug-3.5.6.jar
new file mode 100644
index 000000000..cf021e2b6
Binary files /dev/null and b/java/Pubnub-StandardEdition-Debug-3.5.6.jar differ
diff --git a/java/README.md b/java/README.md
new file mode 100644
index 000000000..aabcc3575
--- /dev/null
+++ b/java/README.md
@@ -0,0 +1,194 @@
+##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
+##### http://www.pubnub.com/account
+
+## PubNub 3.5 Real-time Cloud Push API - JAVA
+
+www.pubnub.com - PubNub Real-time Push Service in the Cloud.
+
+Please reference the demo app in jars/PubnubDemoConsole.jar for an example of using PubNub
+Asyncronously in your applications!
+
+Additional Java docs are available at [doc/index.html](doc/index.html)
+
+###To browse source
+Checkout [srcPubnubApi](/java/srcPubnubApi)
+
+###To setup with your IDE:
+[Check out the Eclipse video walkthrough here!](https://vimeo.com/69587309)
+
+1. Add new project with java/ as the root
+2. Set the new project source as java/srcPubnubApi
+3. Add java/Pubnub-Standardedition-3.5.jar and 3.5/libs/*.jar as project libaries
+4. You should be able to run PubnubDemoConsole and PubnubExample via your IDE
+
+###To build from the CL, run:
+```
+$ ant clean build
+$ ant
+```
+
+###To test from the CL, run:
+```
+$ ant test
+```
+
+###To be really cool and clean, build, and test at once!
+```
+$ ant clean build test
+```
+
+[A quick video demo of building with ant from the command line can be viewed here](https://vimeo.com/76488749).
+###Configuring Logging
+
+[Check out the logging video walkthrough here!](https://vimeo.com/71309975)
+
+Pubnub implements swappable logging using SLF4J, which allows you to switch different logging frameworks easily. All the logging calls using SLF4J API will be delegated to the underlying logging framework.
+
+Before you enable logging, you need to create a "debug-build" version of the Pubnub-StandardEdition.jar.
+
+####To create a debug-build
+
+1. Go to Terminal on Mac/Linux or command-line on Windows
+2. Change directory to the Java folder where you have cloned the git java repo of pubnub (https://github.com/pubnub/java.git)
+3. Type "ant debug-build"
+4. The debug version of Pubnub-StandardEdition jar file (e.g Pubnub-StandardEdition-3.x.x.jar) will be created.
+5. Add this jar as a reference in your project.
+
+To implement logging using log4j you need to add the following references to the project. Using log4j you can log to console or a file or both.
+
+1. slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API
+2. slf4j-log4j jar file (e.g. slf4j-log4j-1.7.5.jar or a latest version) which acts as a bridge between slf4j and log4j
+3. log4j jar file (log4j-1.2.17.jar or a latest version), which provides the underlying logging framework
+4. Along with these references you need to add the log4j.properties file in the CLASSPATH
+
+For example, in your log4j.properties file, configure it to write the logs to a log file:
+```java
+# Root logger option
+log4j.rootLogger=ALL, FILE
+
+# Direct log messages to a log file
+log4j.appender.FILE =org.apache.log4j.FileAppender
+log4j.appender.FILE.File=/Users/rajat/Projects/eclipsews/log4jloging.log
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
+```
+
+More info can be found here http://www.tutorialspoint.com/log4j/log4j_configuration.htm
+
+
+ii) To implement logging using simple slf4j you need to add the following references to the project
+- slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API
+- slf4j-simple jar file (e.g. slf4j-simple-1.7.5.jar or a latest version) which provides the underlying logging framework
+- Along with these references you need to add the simplelogger.properties file in the CLASSPATH
+
+iii) To implement logging using logback-classic you need to add the following references to the project
+- slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API
+- logback-classic and logback-core jar files which provide the underlying logging framework
+
+iv) To implement logging using java.util.logging you need to add the following references to the project
+- slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API
+- slf4j-jdk14 jar file which acts as a bridge between slf4j and java
+- JVM runtime provides the underlying logging framework
+
+v) To implement logging using commons-logging you need to add the following references to the project
+- slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API
+- slf4j-jcl jar file which acts as a bridge between slf4j and common-logging
+- common-logging.jar file which acts as an abstraction layer
+- The underlying logging framework is chosen dynamically by commons-logging
+
+vi) To implement no logging you have two options
+
+Option 1:
+- Add the reference of slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API and nothing else.
+
+Option 2:
+- Add the reference of slf4j-api jar file (e.g. slf4j-api-1.7.5.jar or a latest version) which is the SLF4J API.
+- And add a reference to slf4j-nop jar file (e.g. slf4j-nop-1.7.5.jar or a latest version).
+
+
+More info on SLF4J can be found at http://stackoverflow.com/questions/8737204/how-slf4j-works-no-log-getting-created
+
+###To run the DemoConsole:
+```
+$ cd jars
+$ java -jar PubnubDemoConsole.jar
+```
+
+###Heres an example of running PubnubDemoConsole:
+
+```
+$~/pubnub/java/java/jars$ java -jar PubnubDemoConsole.jar
+HINT: To test Re-connect and catch-up
+ Disconnect your machine from network/internet and
+ re-connect your machine after sometime
+Enable SSL ? Enter Y for Yes, else N
+N
+
+SSL not enabled
+Enter cipher key for encryption feature
+If you don't want to avail at this time, press ENTER
+
+No Cipher key provided
+ENTER 1 FOR Subscribe (Currently subscribed to no channels.)
+ENTER 2 FOR Publish
+ENTER 3 FOR Presence
+ENTER 4 FOR Detailed History
+ENTER 5 FOR Here_Now
+ENTER 6 FOR Unsubscribe
+ENTER 7 FOR Presence-Unsubscribe
+ENTER 8 FOR Time
+ENTER 9 FOR EXIT OR QUIT
+ENTER 10 FOR Disconnect-And-Resubscribe
+ENTER 11 FOR Toggle Resume On Reconnect
+
+ENTER 0 to display this menu
+1
+Subscribe: Enter Channel name
+hello_world
+Subscribed to following channels:
+hello_world
+ENTER 1 FOR Subscribe (Currently subscribed to hello_world)
+ENTER 2 FOR Publish
+ENTER 3 FOR Presence
+ENTER 4 FOR Detailed History
+ENTER 5 FOR Here_Now
+ENTER 6 FOR Unsubscribe
+ENTER 7 FOR Presence-Unsubscribe
+ENTER 8 FOR Time
+ENTER 9 FOR EXIT OR QUIT
+ENTER 10 FOR Disconnect-And-Resubscribe
+ENTER 11 FOR Toggle Resume On Reconnect
+
+ENTER 0 to display this menu
+
+SUBSCRIBE : CONNECT on channel:hello_world
+1
+Subscribe: Enter Channel name
+my_channel
+Subscribed to following channels:
+hello_world : my_channel
+ENTER 1 FOR Subscribe (Currently subscribed to hello_world,my_channel)
+ENTER 2 FOR Publish
+ENTER 3 FOR Presence
+ENTER 4 FOR Detailed History
+ENTER 5 FOR Here_Now
+ENTER 6 FOR Unsubscribe
+ENTER 7 FOR Presence-Unsubscribe
+ENTER 8 FOR Time
+ENTER 9 FOR EXIT OR QUIT
+ENTER 10 FOR Disconnect-And-Resubscribe
+ENTER 11 FOR Toggle Resume On Reconnect
+
+ENTER 0 to display this menu
+SUBSCRIBE : CONNECT on channel:my_channel
+2
+Publish: Enter Channel name
+hello_world
+Enter the message for publish. To exit loop enter QUIT
+"hello, world!"
+PUBLISH : [1,"Sent","13597534956712683"]
+SUBSCRIBE : hello_world : class java.lang.String : hello, world!
+SUBSCRIBE : hello_world : class java.lang.String : 3ZoxkVMB97lf09jpFU9gtw==
+SUBSCRIBE : hello_world : class java.lang.String : 3ZoxkVMB97lf09jpFU9gtw==
+```
+[](https://bitdeli.com/free "Bitdeli Badge")
diff --git a/java/build.xml b/java/build.xml
new file mode 100644
index 000000000..225d40938
--- /dev/null
+++ b/java/build.xml
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html
new file mode 100644
index 000000000..e6d022125
--- /dev/null
+++ b/java/doc/allclasses-frame.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+All Classes
+
+
+
+
+
+
+
+
+
+
+
+All Classes
+
+
+
errorCallback(java.lang.String channel,
+ PubnubError error)
+
+
+ This callback will be invoked when an error occurs
+
+
+
+ void
+
reconnectCallback(java.lang.String channel,
+ java.lang.Object message)
+
+
+ This callback is invoked on getting reconnected to a channel after
+ getting disconnected
+
+
+
+abstract void
+
successCallback(java.lang.String channel,
+ java.lang.Object message)
+
+
+ This callback will be invoked when a message is received on the channel
pamRevoke(java.lang.String channel,
+ java.lang.String auth_key,
+ Callback callback)
+
+
+ ULS revoke by channel and auth key
+
+
+
+ void
+
presence(java.lang.String channel,
+ Callback callback)
+
+
+ Listen for presence of subscribers on a channel
+
+
+
+ void
+
publish(java.util.Hashtable args)
+
+
+ Deprecated.As of version 3.5.2 . Will be removed in 3.6.0 . Methods
+ accepting Hashtable as arguments have been deprecated.
+
+
+
+ void
+
publish(java.util.Hashtable args,
+ Callback callback)
+
+
+ Deprecated.as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ accepting Hashtable as arguments have been deprecated.
+
+
+
+ void
+
publish(java.lang.String channel,
+ java.lang.Double message,
+ Callback callback)
+
+
+ Send a message to a channel.
+
+
+
+ void
+
publish(java.lang.String channel,
+ java.lang.Integer message,
+ Callback callback)
+
+
+ Send a message to a channel.
+
+
+
+ void
+
publish(java.lang.String channel,
+ org.json.JSONArray message,
+ Callback callback)
+
+
+ Send a message to a channel.
+
+
+
+ void
+
publish(java.lang.String channel,
+ org.json.JSONObject message,
+ Callback callback)
+
+
+ Send a message to a channel.
+
+
+
+ void
+
publish(java.lang.String channel,
+ java.lang.String message,
+ Callback callback)
+
+
+ Send a message to a channel.
+
+
+
+ void
+
setAuthKey(java.lang.String authKey)
+
+
+ This method sets auth key.
setResumeOnReconnect(boolean resumeOnReconnect)
+
+
+ If Resume on Reconnect is set to true, then Pubnub catches up on
+ reconnection after disconnection.
+
+
+
+ void
+
setRetryInterval(int retryInterval)
+
+
+ This method sets retry interval for subscribe.
+
+
+
+ void
+
setSubscribeTimeout(int timeout)
+
+
+ This method sets timeout value for subscribe/presence.
+
+
+
+ void
+
setUUID(java.lang.String uuid)
+
+
+ Sets value for UUID
+
+
+
+ void
+
setUUID(java.util.UUID uuid)
+
+
+ Sets value for UUID
+
+
+
+ void
+
setWindowInterval(int windowInterval)
+
+
+ This method sets window interval for subscribe.
+
+
+
+ void
+
shutdown()
+
+
+ This method when called stops Pubnub threads
+
+
+
+ void
+
subscribe(java.util.Hashtable args)
+
+
+ Deprecated.as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ accepting Hashtable as arguments have been deprecated.
+
+
+
+ void
+
subscribe(java.util.Hashtable args,
+ Callback callback)
+
+
+ Deprecated.as of version 3.5.2 and will be removed with 3.6.0 .
+
+
+
+ void
+
subscribe(java.lang.String[] channelsArr,
+ Callback callback)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
subscribe(java.lang.String[] channelsArr,
+ Callback callback,
+ long timetoken)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
subscribe(java.lang.String[] channelsArr,
+ Callback callback,
+ java.lang.String timetoken)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
subscribe(java.lang.String channel,
+ Callback callback)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
subscribe(java.lang.String channel,
+ Callback callback,
+ long timetoken)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
subscribe(java.lang.String channel,
+ Callback callback,
+ java.lang.String timetoken)
+
+
+ Listen for a message on a channel.
+
+
+
+ void
+
time(Callback callback)
+
+
+ Read current time from PubNub Cloud.
unsubscribe(java.util.Hashtable args)
+
+
+ Deprecated.as of version 3.5.2 and will be removed with 3.6.0 . Methods
+ accepting Hashtable as arguments have been deprecated.
+
+
+
+ void
+
unsubscribe(java.lang.String channel)
+
+
+ Unsubscribe/Disconnect from channel.
+
+
+
+ void
+
unsubscribe(java.lang.String[] channels)
+
+
+ Unsubscribe from channels.
This method returns the state of Resume on Reconnect setting
+
+
+
+
Returns:
Current state of Resume On Reconnect Setting
+
+
+
+
+
+setRetryInterval
+
+public void setRetryInterval(int retryInterval)
+
+
This method sets retry interval for subscribe. Pubnub API will make
+ maxRetries attempts to connect to pubnub servers. These attemtps will be
+ made at an interval of retryInterval milliseconds.
+
This methods sets maximum number of retries for subscribe. Pubnub API
+ will make maxRetries attempts to connect to pubnub servers before timing
+ out.
+
If Resume on Reconnect is set to true, then Pubnub catches up on
+ reconnection after disconnection. If false, then messages sent on the
+ channel between disconnection and reconnection are not received.
+
+
+
Parameters:
resumeOnReconnect - True or False setting for Resume on Reconnect
hashtableKeysToArray(java.util.Hashtable ht)
+
+
+ Returns string keys in a hashtable as array of string
+
+
+
+static java.lang.String
+
hashTableKeysToDelimitedString(java.util.Hashtable ht,
+ java.lang.String delimiter)
+
+
+ Returns string keys in a hashtable as delimited string
+
+
+
+static java.lang.String
+
joinString(java.lang.String[] sourceArray,
+ java.lang.String delimiter)
+
+
+ Takes String[] of tokens, and String delimiter as input and returns
+ joined String
+
+
+
+static java.lang.String[]
+
splitString(java.lang.String source,
+ java.lang.String delimiter)
+
+
+ Takes source and delimiter string as inputs and returns splitted string
+ in form of tokens in String array
+This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+Package
+
+
+
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
+
Interfaces (italic)
Classes
Enums
Exceptions
Errors
Annotation Types
+
+
+Class/Interface
+
+
+
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
Class inheritance diagram
Direct Subclasses
All Known Subinterfaces
All Known Implementing Classes
Class/interface declaration
Class/interface description
+
+
Nested Class Summary
Field Summary
Constructor Summary
Method Summary
+
+
Field Detail
Constructor Detail
Method Detail
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+Annotation Type
+
+
+
+Each annotation type has its own separate page with the following sections:
+
Annotation Type declaration
Annotation Type description
Required Element Summary
Optional Element Summary
Element Detail
+
+
+
+Enum
+
+
+
+Each enum has its own separate page with the following sections:
+
Enum declaration
Enum description
Enum Constant Summary
Enum Constant Detail
+
+
+Tree (Class Hierarchy)
+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+
+
+Deprecated API
+
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+Index
+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+
+Prev/Next
+These links take you to the next or previous class, interface, package, or related page.
+Frames/No Frames
+These links show and hide the HTML frames. All pages are available with or without frames.
+
+
+Serialized Form
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+