-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathConnectClientOperation.java
More file actions
27 lines (22 loc) · 847 Bytes
/
ConnectClientOperation.java
File metadata and controls
27 lines (22 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.parse.livequery;
import org.json.JSONException;
import org.json.JSONObject;
class ConnectClientOperation extends ClientOperation {
private final String applicationId;
private final String sessionToken;
private final String clientKey;
ConnectClientOperation(String applicationId, String sessionToken, String clientKey) {
this.applicationId = applicationId;
this.sessionToken = sessionToken;
this.clientKey = clientKey;
}
@Override
JSONObject getJSONObjectRepresentation() throws JSONException {
JSONObject jsonObject = new JSONObject();
jsonObject.put("op", "connect");
jsonObject.put("applicationId", applicationId);
jsonObject.put("sessionToken", sessionToken);
jsonObject.put("clientKey", clientKey);
return jsonObject;
}
}