public class SwarmUser
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SwarmUser.GotUserCB |
static class |
SwarmUser.GotUserStatusCB |
Modifier and Type | Field and Description |
---|---|
int |
points
This SwarmUser's current Swarm Point balance.
|
int |
userId
This SwarmUser's unique SwarmID.
|
java.lang.String |
username
This SwarmUser's Swarm Username.
|
Modifier and Type | Method and Description |
---|---|
void |
getOnlineStatus(SwarmUser.GotUserStatusCB cb)
Get the SwarmUser's online status and if the user is online, which SwarmApplication the user is logged into.
|
static void |
getUser(int userId,
SwarmUser.GotUserCB cb)
Get a requested SwarmUser by id.
|
static void |
getUser(java.lang.String name,
SwarmUser.GotUserCB cb)
Get a requested SwarmUser by username.
|
public int userId
public java.lang.String username
public int points
public void getOnlineStatus(SwarmUser.GotUserStatusCB cb)
cb
- When successful, the GotUserStatusCB callback returns a boolean that indicates if this SwarmUser is online (true) or offline (false).
The GotUserStatusCB callback also returns the SwarmApplication app object to indicate which Swarm-enabled application
the user is currently logged in to. If the user is not online the SwarmApplication app object is null.public static void getUser(int userId, SwarmUser.GotUserCB cb)
userId
- The unique SwarmUser identification number of the requested SwarmUser.cb
- The GotUserCB callback returns the requested SwarmUser object when the callback succeeds.public static void getUser(java.lang.String name, SwarmUser.GotUserCB cb)
name
- The username of the requested SwarmUser.cb
- The GotUserCB callback returns the requested SwarmUser object when the callback succeeds.