diff --git a/java/Pubnub-StandardEdition-3.5.4.jar b/java/Pubnub-StandardEdition-3.5.4.jar index df40bf54d..7f7882506 100644 Binary files a/java/Pubnub-StandardEdition-3.5.4.jar and b/java/Pubnub-StandardEdition-3.5.4.jar differ diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html index daa6e8b5a..0ea1dcc6d 100644 --- a/java/doc/allclasses-frame.html +++ b/java/doc/allclasses-frame.html @@ -2,12 +2,12 @@
- + void
pamGrant(java.lang.String channel,
+ boolean read,
+ boolean write,
+ Callback callback)
+
+ void
pamGrant(java.lang.String channel,
+ boolean read,
+ boolean write,
+ int ttl,
+ Callback callback)
+
+ void
pamGrant(java.lang.String channel,
java.lang.String auth_key,
boolean read,
@@ -555,6 +578,15 @@
void
+pamRevoke(java.lang.String channel,
+ Callback callback)
+
+
+ ULS revoke by channel
+
+
+
+ void
pamRevoke(java.lang.String channel,
java.lang.String auth_key,
Callback callback)
@@ -1479,6 +1511,39 @@
+
+pamGrant
+
+public void pamGrant(java.lang.String channel,
+ boolean read,
+ boolean write,
+ Callback callback)
+
+- Grant r/w access based on channel
+
+
+- Parameters:
channel
- read
- write
- callback
-
+
+
+
+
+
+pamGrant
+
+public void pamGrant(java.lang.String channel,
+ boolean read,
+ boolean write,
+ int ttl,
+ Callback callback)
+
+- Grant r/w access based on channel
+
+
+- Parameters:
channel
- read
- write
- ttl
- callback
-
+
+
+
+
pamGrant
@@ -1492,7 +1557,7 @@
Grant r/w access based on channel and auth key
-- Parameters:
channel
- auth_key
- read
- write
- callback
-
+ Parameters: channel
- auth_key
- read
- write
- ttl
- callback
-
@@ -1554,6 +1619,20 @@
+
+pamRevoke
+
+public void pamRevoke(java.lang.String channel,
+ Callback callback)
+
+- ULS revoke by channel
+
+
+- Parameters:
channel
- callback
-
+
+
+
+
shutdown
diff --git a/java/doc/com/pubnub/api/PubnubError.html b/java/doc/com/pubnub/api/PubnubError.html
index 8da71035a..3320548b9 100644
--- a/java/doc/com/pubnub/api/PubnubError.html
+++ b/java/doc/com/pubnub/api/PubnubError.html
@@ -2,12 +2,12 @@
-
+
PubnubError
-
+
diff --git a/java/doc/com/pubnub/api/PubnubException.html b/java/doc/com/pubnub/api/PubnubException.html
index dd9e79f1d..9b0d99b44 100644
--- a/java/doc/com/pubnub/api/PubnubException.html
+++ b/java/doc/com/pubnub/api/PubnubException.html
@@ -2,12 +2,12 @@
-
+
PubnubException
-
+
diff --git a/java/doc/com/pubnub/api/PubnubUtil.html b/java/doc/com/pubnub/api/PubnubUtil.html
index ca0fea9da..f9c7855c6 100644
--- a/java/doc/com/pubnub/api/PubnubUtil.html
+++ b/java/doc/com/pubnub/api/PubnubUtil.html
@@ -2,12 +2,12 @@
-
+
PubnubUtil
-
+
diff --git a/java/doc/com/pubnub/api/package-frame.html b/java/doc/com/pubnub/api/package-frame.html
index eb254c399..7a9ce08b6 100644
--- a/java/doc/com/pubnub/api/package-frame.html
+++ b/java/doc/com/pubnub/api/package-frame.html
@@ -2,12 +2,12 @@
-
+
com.pubnub.api
-
+
diff --git a/java/doc/com/pubnub/api/package-summary.html b/java/doc/com/pubnub/api/package-summary.html
index c80d3855f..4268389f4 100644
--- a/java/doc/com/pubnub/api/package-summary.html
+++ b/java/doc/com/pubnub/api/package-summary.html
@@ -2,12 +2,12 @@
-
+
com.pubnub.api
-
+
diff --git a/java/doc/com/pubnub/api/package-tree.html b/java/doc/com/pubnub/api/package-tree.html
index 3fdf78495..77e7086a0 100644
--- a/java/doc/com/pubnub/api/package-tree.html
+++ b/java/doc/com/pubnub/api/package-tree.html
@@ -2,12 +2,12 @@
-
+
com.pubnub.api Class Hierarchy
-
+
diff --git a/java/doc/constant-values.html b/java/doc/constant-values.html
index 6ef12179f..07a0f0975 100644
--- a/java/doc/constant-values.html
+++ b/java/doc/constant-values.html
@@ -2,12 +2,12 @@
-
+
Constant Field Values
-
+
diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html
index f06bb5d83..99645b4ff 100644
--- a/java/doc/deprecated-list.html
+++ b/java/doc/deprecated-list.html
@@ -2,12 +2,12 @@
-
+
Deprecated List
-
+
diff --git a/java/doc/help-doc.html b/java/doc/help-doc.html
index edee9f024..28f8e7648 100644
--- a/java/doc/help-doc.html
+++ b/java/doc/help-doc.html
@@ -2,12 +2,12 @@
-
+
API Help
-
+
diff --git a/java/doc/index-all.html b/java/doc/index-all.html
index 92475133c..980ff62ab 100644
--- a/java/doc/index-all.html
+++ b/java/doc/index-all.html
@@ -2,12 +2,12 @@
-
+
Index
-
+
@@ -261,12 +261,21 @@
pamGrant(String, String, boolean, boolean, Callback) -
Method in class com.pubnub.api.Pubnub
Grant r/w access based on channel and auth key
+ pamGrant(String, boolean, boolean, Callback) -
+Method in class com.pubnub.api.Pubnub
+ Grant r/w access based on channel
+ pamGrant(String, boolean, boolean, int, Callback) -
+Method in class com.pubnub.api.Pubnub
+ Grant r/w access based on channel
pamGrant(String, String, boolean, boolean, int, Callback) -
Method in class com.pubnub.api.Pubnub
Grant r/w access based on channel and auth key
pamRevoke(String, String, Callback) -
Method in class com.pubnub.api.Pubnub
ULS revoke by channel and auth key
+ pamRevoke(String, Callback) -
+Method in class com.pubnub.api.Pubnub
+ ULS revoke by channel
PNERR_CLIENT_TIMEOUT -
Static variable in class com.pubnub.api.PubnubError
Client Timeout .
diff --git a/java/doc/index.html b/java/doc/index.html
index a7db3f219..cea17a207 100644
--- a/java/doc/index.html
+++ b/java/doc/index.html
@@ -2,7 +2,7 @@
-
+
Generated Documentation (Untitled)
diff --git a/java/doc/overview-tree.html b/java/doc/overview-tree.html
index 55d4edd5d..f9a81ffaa 100644
--- a/java/doc/overview-tree.html
+++ b/java/doc/overview-tree.html
@@ -2,12 +2,12 @@
-
+
Class Hierarchy
-
+
diff --git a/java/doc/serialized-form.html b/java/doc/serialized-form.html
index 2e616b2b5..c664d89c2 100644
--- a/java/doc/serialized-form.html
+++ b/java/doc/serialized-form.html
@@ -2,12 +2,12 @@
-
+
Serialized Form
-
+
diff --git a/java/jars/Pubnub-UnitTests-3.5.4.jar b/java/jars/Pubnub-UnitTests-3.5.4.jar
index bf8af3fa9..acba62032 100644
Binary files a/java/jars/Pubnub-UnitTests-3.5.4.jar and b/java/jars/Pubnub-UnitTests-3.5.4.jar differ
diff --git a/java/jars/PubnubDemoConsole.jar b/java/jars/PubnubDemoConsole.jar
index fe61e6fee..d0b54cb5f 100644
Binary files a/java/jars/PubnubDemoConsole.jar and b/java/jars/PubnubDemoConsole.jar differ
diff --git a/java/jars/PubnubExample.jar b/java/jars/PubnubExample.jar
index 4fbc677b3..03f251d93 100644
Binary files a/java/jars/PubnubExample.jar and b/java/jars/PubnubExample.jar differ
diff --git a/java/src/com/pubnub/api/Pubnub.java b/java/src/com/pubnub/api/Pubnub.java
index 5a5f38e8e..3558d3e27 100644
--- a/java/src/com/pubnub/api/Pubnub.java
+++ b/java/src/com/pubnub/api/Pubnub.java
@@ -582,11 +582,35 @@ public void pamGrant(final String channel, String auth_key, boolean read,
pamGrant(channel, auth_key, read, write, -1, callback);
}
+ /** Grant r/w access based on channel
+ * @param channel
+ * @param read
+ * @param write
+ * @param callback
+ */
+ public void pamGrant(final String channel, boolean read,
+ boolean write, final Callback callback) {
+ pamGrant(channel, null, read, write, -1, callback);
+ }
+
+ /** Grant r/w access based on channel
+ * @param channel
+ * @param read
+ * @param write
+ * @param ttl
+ * @param callback
+ */
+ public void pamGrant(final String channel, boolean read,
+ boolean write, int ttl, final Callback callback) {
+ pamGrant(channel, null, read, write, ttl, callback);
+ }
+
/** Grant r/w access based on channel and auth key
* @param channel
* @param auth_key
* @param read
* @param write
+ * @param ttl
* @param callback
*/
public void pamGrant(final String channel, String auth_key, boolean read,
@@ -607,9 +631,12 @@ public void pamGrant(final String channel, String auth_key, boolean read,
return;
}
- String sign_input = this.SUBSCRIBE_KEY + "\n" + this.PUBLISH_KEY + "\n"
- + "grant" + "\n" + "auth=" + auth_key + "&" + "channel="
- + channel + "&" + "r=" + r + "&" + "timestamp=" + timestamp
+ String sign_input = this.SUBSCRIBE_KEY + "\n" + this.PUBLISH_KEY + "\n" + "grant" + "\n" ;
+
+ if (auth_key != null && auth_key.length() > 0)
+ sign_input += "auth=" + auth_key + "&" ;
+
+ sign_input += "channel=" + channel + "&" + "r=" + r + "&" + "timestamp=" + timestamp
+ ((ttl > -1)?"&" + "ttl=" + ttl:"")
+ "&" + "w=" + w;
@@ -628,7 +655,8 @@ public void pamGrant(final String channel, String auth_key, boolean read,
parameters.put("signature", signature);
parameters.put("r", r);
parameters.put("channel", channel);
- parameters.put("auth", auth_key);
+
+ if (auth_key != null && auth_key.length() > 0 ) parameters.put("auth", auth_key);
if (ttl > 0) parameters.put("ttl", String.valueOf(ttl));
String[] urlComponents = { getPubnubUrl(), "v1", "auth", "grant", "sub-key",
@@ -864,4 +892,13 @@ public void pamRevoke(String channel, String auth_key, Callback callback) {
pamGrant(channel, auth_key, false, false, callback);
}
+
+ /** ULS revoke by channel
+ * @param channel
+ * @param callback
+ */
+ public void pamRevoke(String channel, Callback callback) {
+ pamGrant(channel, null, false, false, callback);
+ }
+
}