Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 90ad606

Browse filesBrowse files
author
Devendra
committed
daemon thread changes
1 parent cb7650d commit 90ad606
Copy full SHA for 90ad606

File tree

Expand file treeCollapse file tree

18 files changed

+1086
-390
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

18 files changed

+1086
-390
lines changed
Open diff view settings
Collapse file

‎codenameone/src/com/pubnub/api/NonSubscribeManager.java‎

Copy file name to clipboardExpand all lines: codenameone/src/com/pubnub/api/NonSubscribeManager.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
class NonSubscribeManager extends AbstractNonSubscribeManager {
44

55
public NonSubscribeManager(String name, int connectionTimeout,
6-
int requestTimeout) {
7-
super(name, connectionTimeout, requestTimeout);
6+
int requestTimeout, boolean daemonThreads) {
7+
super(name, connectionTimeout, requestTimeout, daemonThreads);
88
}
99

1010
public void clearRequestQueue() {
Collapse file

‎codenameone/src/com/pubnub/api/Pubnub.java‎

Copy file name to clipboardExpand all lines: codenameone/src/com/pubnub/api/Pubnub.java
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,9 @@ public int getNonSubscribeTimeout() {
179179
protected String getUserAgent() {
180180
return "Java/" + VERSION;
181181
}
182+
void startNewThread(Runnable runnable, boolean daemonThreads) {
183+
Thread thread = new Thread(runnable);
184+
thread.start();
185+
}
182186

183187
}
Collapse file

‎codenameone/src/com/pubnub/api/SubscribeManager.java‎

Copy file name to clipboardExpand all lines: codenameone/src/com/pubnub/api/SubscribeManager.java
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package com.pubnub.api;
22

33
class SubscribeManager extends AbstractSubscribeManager {
4-
54
public SubscribeManager(String name, int connectionTimeout,
6-
int requestTimeout) {
7-
super(name, connectionTimeout, requestTimeout);
5+
int requestTimeout, boolean daemonThreads) {
6+
super(name, connectionTimeout, requestTimeout, daemonThreads);
87
}
9-
108
public void clearRequestQueue() {
119
_waiting.clear();
1210
}
Collapse file

‎j2me/src1/com/pubnub/api/NonSubscribeManager.java‎

Copy file name to clipboardExpand all lines: j2me/src1/com/pubnub/api/NonSubscribeManager.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
class NonSubscribeManager extends AbstractNonSubscribeManager {
44

55
public NonSubscribeManager(String name, int connectionTimeout,
6-
int requestTimeout) {
7-
super(name, connectionTimeout, requestTimeout);
6+
int requestTimeout, boolean daemonThreads) {
7+
super(name, connectionTimeout, requestTimeout, daemonThreads);
88
}
99

1010
public void clearRequestQueue() {
Collapse file

‎j2me/src1/com/pubnub/api/SubscribeManager.java‎

Copy file name to clipboardExpand all lines: j2me/src1/com/pubnub/api/SubscribeManager.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
class SubscribeManager extends AbstractSubscribeManager {
44

55
public SubscribeManager(String name, int connectionTimeout,
6-
int requestTimeout) {
7-
super(name, connectionTimeout, requestTimeout);
6+
int requestTimeout, boolean daemonThreads) {
7+
super(name, connectionTimeout, requestTimeout, daemonThreads);
88
}
99

1010
public void resetWorkersConnections() {
Collapse file

‎java/src/com/pubnub/api/Pubnub.java‎

Copy file name to clipboardExpand all lines: java/src/com/pubnub/api/Pubnub.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,5 @@ public Pubnub(String publish_key, String subscribe_key,
123123
protected String getUserAgent() {
124124
return "Java/" + VERSION;
125125
}
126+
126127
}
Collapse file

‎java/src1/com/pubnub/api/HttpClientCore.java‎

Copy file name to clipboardExpand all lines: java/src1/com/pubnub/api/HttpClientCore.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public HttpResponse fetch(String url) throws PubnubException, SocketTimeoutExcep
8686
public synchronized HttpResponse fetch(String url, Hashtable headers)
8787
throws PubnubException, SocketTimeoutException {
8888
URL urlobj = null;
89-
log.verbose("FETCHING URL : " + url);
89+
log.debug("FETCHING URL : " + url);
9090
try {
9191
urlobj = new URL(url);
9292
} catch (MalformedURLException e3) {
@@ -175,7 +175,7 @@ public synchronized HttpResponse fetch(String url, Hashtable headers)
175175
}
176176
}
177177

178-
log.verbose("URL = " + url + ", Status Code : " + rc + ", : RESPONSE = " + page);
178+
log.debug("URL = " + url + ", Status Code : " + rc + ", : RESPONSE = " + page);
179179
switch (rc) {
180180
case HttpURLConnection.HTTP_FORBIDDEN:
181181
{
Collapse file

‎java/src1/com/pubnub/api/PubnubCoreShared.java‎

Copy file name to clipboardExpand all lines: java/src1/com/pubnub/api/PubnubCoreShared.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,4 +455,5 @@ public void removeAllPushNotificationsForDeviceRegistrationId(String gcmRegistra
455455
public void removeAllPushNotificationsForDeviceRegistrationId(String gcmRegistrationId, final Callback callback) {
456456
_removeAllPushNotificationsForDeviceRegistrationId(gcmRegistrationId, callback, false);
457457
}
458+
458459
}
Collapse file

‎java/srcPubnubApi/com/pubnub/api/Callback.java‎

Copy file name to clipboardExpand all lines: java/srcPubnubApi/com/pubnub/api/Callback.java
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.pubnub.api;
22

3+
import org.json.JSONObject;
4+
35
/**
46
* Abstract class to be subclassed by objects being passed as callbacks to
57
* Pubnub APIs Default implementation for all methods is blank
@@ -36,11 +38,28 @@ public void successCallback(String channel, Object message, String timetoken) {
3638

3739
}
3840

41+
/**
42+
* This callback will be invoked when a message is received on the channel
43+
*
44+
* @param message
45+
* Message
46+
*/
47+
public void successCallbackV2(String channel, Object message, JSONObject envelope) {
48+
49+
}
50+
51+
3952
void successWrapperCallback(String channel, Object message, String timetoken) {
4053
successCallback(channel, message);
4154
successCallback(channel, message, timetoken);
4255
}
4356

57+
void successWrapperCallbackV2(String channel, Object message, JSONObject envelope, String timetoken) {
58+
successCallback(channel, message);
59+
successCallback(channel, message, timetoken);
60+
successCallbackV2(channel, message, envelope);
61+
}
62+
4463
/**
4564
* This callback will be invoked when an error occurs
4665
*
Collapse file

‎java/srcPubnubApi/com/pubnub/api/PubnubAsyncInterface.java‎

Copy file name to clipboardExpand all lines: java/srcPubnubApi/com/pubnub/api/PubnubAsyncInterface.java
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,5 +1077,8 @@ interface PubnubAsyncInterface {
10771077

10781078
public void setFilter(String filter);
10791079

1080-
public String getFilter(String filter);
1080+
public String getFilter();
1081+
1082+
public void setV2(boolean v2);
1083+
public boolean isV2();
10811084
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.