Skip to content

Commit

Permalink
Merge branch 'CL-6369728740416' into CL-6301470768258
Browse files Browse the repository at this point in the history
  • Loading branch information
Devendra committed Jul 8, 2013
2 parents be4d83b + b6d49f2 commit e404d40
Show file tree
Hide file tree
Showing 92 changed files with 1,549 additions and 1,469 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
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

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.1
3.5.2
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void onCreate() {
Toast.makeText(this, "PubnubService created...", Toast.LENGTH_LONG).show();
Log.i("PUBNUB", "PubnubService created...");
try {
pubnub.subscribe(new String[]{channel}, new Callback() {
pubnub.subscribe(new String[] {channel}, new Callback() {
@Override
public void connectCallback(String channel) {
notifyUser("CONNECT on channel:" + channel);
Expand Down
8 changes: 4 additions & 4 deletions android/src/com/pubnub/api/Pubnub.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Pubnub extends PubnubCore {
* SSL on ?
*/
public Pubnub(String publish_key, String subscribe_key, String secret_key,
String cipher_key, boolean ssl_on) {
String cipher_key, boolean ssl_on) {
super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
}

Expand All @@ -43,7 +43,7 @@ public Pubnub(String publish_key, String subscribe_key, String secret_key,
* SSL on ?
*/
public Pubnub(String publish_key, String subscribe_key, String secret_key,
boolean ssl_on) {
boolean ssl_on) {
super(publish_key, subscribe_key, secret_key, "", ssl_on);
}

Expand Down Expand Up @@ -118,7 +118,7 @@ public void setNonSubscribeTimeout(int timeout) {

protected String getUserAgent() {
return "(Android " + android.os.Build.VERSION.RELEASE +
"; " + android.os.Build.MODEL +
" Build) PubNub-Java/Android/" + VERSION;
"; " + android.os.Build.MODEL +
" Build) PubNub-Java/Android/" + VERSION;
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public void errorCallback(String channel, PubnubError message) {
}
});
close();
}});
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public void errorCallback(String channel, PubnubError message) {
}
});
close();
}});
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void errorCallback(String channel, PubnubError error) {
}
});
close();
}});
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void errorCallback(String channel, PubnubError error) {

}
}});
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public void errorCallback(String channel, PubnubError message) {
}
});
close();
}});
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class PubnubCommand {
* The text to display
*/
private void alertDialog(final String message) {
uiapp.invokeLater(new Runnable() {
uiapp.invokeLater(new Runnable() {
public void run() {
Dialog.alert(message);
}
Expand All @@ -44,10 +44,8 @@ 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)
{
this.menuItem.setCommand(new Command(new CommandHandler() {
public void execute(ReadOnlyCommandMetadata metadata, Object context) {
handler();
}
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
* This class extends the UiApplication class, providing a
* graphical user interface.
*/
public class PubnubDemoConsole extends UiApplication
{
public class PubnubDemoConsole extends UiApplication {
/**
* Entry point for application
* @param args Command line arguments (not used)
*/
public static void main(String[] args)
{
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.
Expand All @@ -26,8 +24,7 @@ public static void main(String[] args)
/**
* Creates a new PubnubExample object
*/
public PubnubDemoConsole()
{
public PubnubDemoConsole() {
Screen sc = new PubnubDemoConsoleScreen();
// Push a screen onto the UI stack for rendering.
pushScreen(sc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
* A class extending the MainScreen class, which provides default standard
* behavior for BlackBerry GUI applications.
*/
public final class PubnubDemoConsoleScreen extends MainScreen
{
public final class PubnubDemoConsoleScreen extends MainScreen {
String channel = "hello_world";
String[] channels = { "hello_world1", "hello_world2", "hello_world3",
"hello_world4" };
"hello_world4"
};
Pubnub _pubnub = new Pubnub("demo","demo","demo", false);
/**
* Creates a new PubnubExampleScreen object
*/
public PubnubDemoConsoleScreen()
{
public PubnubDemoConsoleScreen() {
// Set the displayed title of the screen
setTitle("Pubnub Demo Console");
addMenuItem(new Publish(_pubnub).getMenuItem());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public void errorCallback(String channel, PubnubError error) {
} catch (Exception e) {

}
}}); }
}});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ protected void initScreen() {
public void fieldChanged(Field field, int context) {
_pubnub.unsubscribe(txtChannel.toString());
close();
}});
}
});
}

}
4 changes: 2 additions & 2 deletions blackberry/src/com/pubnub/api/Pubnub.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
public class Pubnub extends PubnubCore {

public Pubnub(String publish_key, String subscribe_key, String secret_key,
String cipher_key, boolean ssl_on) {
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) {
boolean ssl_on) {
super(publish_key, subscribe_key, secret_key, "", ssl_on);
}

Expand Down
10 changes: 5 additions & 5 deletions gwt/3.3/api/src/com/pubnub/gwt/api/client/Callback.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
*
*/
public abstract class Callback {
public void callback(String channel, Object message){}
public void callback(String channel, Object message) {}

public void error(String channel, Object message){}
public void error(String channel, Object message) {}

public void connect(String channel){}
public void connect(String channel) {}

public void reconnect(String channel){}
public void reconnect(String channel) {}

public void disconnect(String channel){}
public void disconnect(String channel) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private native String toStr(Object message) /*-{
return JSON.stringify(message);
}-*/;
@Override
public void callback(String channel, Object message){
public void callback(String channel, Object message) {
html.setHTML("");
responses.offer(toStr(message));
if (noOfLines <= 4)
Expand All @@ -59,7 +59,7 @@ public void callback(String channel, Object message){

}

public ExamplePanel(HTML html){
public ExamplePanel(HTML html) {
super();
this.html = html;
this.add(html);
Expand All @@ -68,7 +68,7 @@ public ExamplePanel(HTML html){
html.setWidth("750px");

}
public void clearHTML(){
public void clearHTML() {
html.setHTML("");
responses.clear();
noOfLines = 0;
Expand Down Expand Up @@ -167,7 +167,7 @@ public void onClick(ClickEvent event) {
tabPanel.selectTab(0);

}
private void setupTimeUuidPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel){
private void setupTimeUuidPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(10);
panel.add(horizontalPanel);
Expand All @@ -189,7 +189,7 @@ public void onClick(ClickEvent event) {

}

private void setupHereNowPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel){
private void setupHereNowPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(10);
panel.add(horizontalPanel);
Expand All @@ -212,7 +212,7 @@ public void onClick(ClickEvent event) {
}


private void setupDetailedHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel){
private void setupDetailedHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {
HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(10);
panel.add(horizontalPanel);
Expand Down Expand Up @@ -297,7 +297,7 @@ public void onClick(ClickEvent event) {
btn.addClickHandler(new Handler());
}

private void setupHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel){
private void setupHistoryPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {

HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(10);
Expand Down Expand Up @@ -330,7 +330,7 @@ public void onClick(ClickEvent event) {
btn.addClickHandler(new Handler());
}

private void setupPublishPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel){
private void setupPublishPanel(final Pubnub pubnub, final ExamplePanel panel, final TextBox txtChannel) {

HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(10);
Expand Down
14 changes: 7 additions & 7 deletions gwt/3.3/src/org/json/CDL.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
return ja;
}
throw x.syntaxError("Bad character '" + c + "' (" +
(int)c + ").");
(int)c + ").");
}
c = x.next();
}
Expand All @@ -129,7 +129,7 @@ public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
* @throws JSONException
*/
public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x)
throws JSONException {
throws JSONException {
JSONArray ja = rowToJSONArray(x);
return ja != null ? ja.toJSONObject(names) : null;
}
Expand Down Expand Up @@ -165,7 +165,7 @@ public static JSONArray toJSONArray(JSONTokener x) throws JSONException {
* @throws JSONException
*/
public static JSONArray toJSONArray(JSONArray names, String string)
throws JSONException {
throws JSONException {
return toJSONArray(names, new JSONTokener(string));
}

Expand All @@ -178,7 +178,7 @@ public static JSONArray toJSONArray(JSONArray names, String string)
* @throws JSONException
*/
public static JSONArray toJSONArray(JSONArray names, JSONTokener x)
throws JSONException {
throws JSONException {
if (names == null || names.length() == 0) {
return null;
}
Expand Down Expand Up @@ -214,8 +214,8 @@ public static String rowToString(JSONArray ja) {
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) == '"')) {
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) {
Expand Down Expand Up @@ -263,7 +263,7 @@ public static String toString(JSONArray ja) throws JSONException {
* @throws JSONException
*/
public static String toString(JSONArray names, JSONArray ja)
throws JSONException {
throws JSONException {
if (names == null || names.length() == 0) {
return null;
}
Expand Down
Loading

0 comments on commit e404d40

Please sign in to comment.