| Package | com.electrotank.electroserver4.user |
| Class | public class UserManager |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new instance of the UserManager class.
| UserManager | ||
|
addReference(u:User):void
Adds a reference to a User.
| UserManager | ||
|
Adds a user.
| UserManager | ||
|
doesUserExist(id:String):Boolean
Useful method that allows you to check to see if a specific user is currently being managed by your instnace of the UserManager.
| UserManager | ||
|
Gets User that represents you.
| UserManager | ||
|
getUserById(id:String):User
Gets a User based on id.
| UserManager | ||
|
getUserByName(name:String):User
Gets a User based on the name.
| UserManager | ||
|
getUsers():Array
Gets the full list of managed users.
| UserManager | ||
|
removeReference(u:User):void
Removes a refence to a User.
| UserManager | ||
|
Sets the reference to yourself.
| UserManager | ||
| UserManager | () | constructor |
public function UserManager()Creates a new instance of the UserManager class.
| addReference | () | method |
public function addReference(u:User):voidAdds a reference to a User.
Parametersu:User — The User for which to add a reference.
|
| addUser | () | method |
| doesUserExist | () | method |
public function doesUserExist(id:String):BooleanUseful method that allows you to check to see if a specific user is currently being managed by your instnace of the UserManager. This doesn't mean that user is logged into the server or not, it just checks to see if that user is managed here.
Parametersid:String — Id of the User.
|
Boolean — True or false.
|
| getMe | () | method |
public function getMe():UserGets User that represents you.
ReturnsUser —
User that represents you.
|
| getUserById | () | method |
public function getUserById(id:String):UserGets a User based on id.
Parametersid:String — The id of the User.
|
User —
The User whose id was passed in.
|
| getUserByName | () | method |
public function getUserByName(name:String):UserGets a User based on the name.
Parametersname:String — Name of the User to find.
|
User —
The User with the name passed in.
|
| getUsers | () | method |
public function getUsers():ArrayGets the full list of managed users.
ReturnsArray — The full list of managed users.
|
| removeReference | () | method |
public function removeReference(u:User):voidRemoves a refence to a User.
Parametersu:User — User for whom a reference is removed.
|
| setMe | () | method |
public function setMe(u:User):voidSets the reference to yourself. This is a permanent reference so that your own User class intance won't be removed.
Parametersu:User — User that represents you.
|