Package sfs2x.client.entities.managers
Interface IUserManager
-
- All Known Implementing Classes:
SFSUserManager
public interface IUserManagerThe IUserManager interface defines all the methods and properties exposed by the client-side manager of the SmartFoxServer User entities.In the SmartFoxServer 2X client API this interface is implemented by the SFSUserManager class. Read the class description for additional informations.
- See Also:
SFSUserManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUser(User user)* API internal usage only *booleancontainsUser(User user)Indicates whether a user exists in the local users list or not.booleancontainsUserId(int userId)Indicates whether a user exists in the local users list or not from the id.booleancontainsUserName(java.lang.String userName)Indicates whether a user exists in the local users list or not from the name.ISmartFoxgetSmartFox()* API internal usage only *UsergetUserById(int userId)Retrieves a User object from its id property.UsergetUserByName(java.lang.String userName)Retrieves a User object from its name property.intgetUserCount()Returns the total number of users in the local users list.java.util.List<User>getUserList()Get the whole list of users inside the Rooms joined by the client.voidremoveUser(User user)* API internal usage only *voidremoveUserById(int id)* API internal usage only *voidreplaceAll(java.util.List<User> userList)* API internal usage only *
-
-
-
Method Detail
-
containsUserName
boolean containsUserName(java.lang.String userName)
Indicates whether a user exists in the local users list or not from the name.- Parameters:
userName- The name of the user whose presence in the users list is to be tested.- Returns:
trueif the passed user exists in the users list.- See Also:
User.getName()
-
containsUserId
boolean containsUserId(int userId)
Indicates whether a user exists in the local users list or not from the id.- Parameters:
userId- The id of the user whose presence in the users list is to be tested.- Returns:
trueif the passed user exists in the users list.- See Also:
User.getId()
-
containsUser
boolean containsUser(User user)
Indicates whether a user exists in the local users list or not.- Parameters:
user- The User object representing the user whose presence in the users list is to be tested.- Returns:
trueif the passed user exists in the users list.
-
getUserByName
User getUserByName(java.lang.String userName)
Retrieves a User object from its name property.- Parameters:
userName- The name of the user to be found.- Returns:
- The User object representing the user, or
nullif no user with the passed name exists in the local users list. - See Also:
User.getName(),getUserById(int)
-
getUserById
User getUserById(int userId)
Retrieves a User object from its id property.- Parameters:
userId- The id of the user to be found.- Returns:
- The User object representing the user, or
nullif no user with the passed id exists in the local users list. - See Also:
User.getId(),getUserByName(java.lang.String)
-
addUser
void addUser(User user)
* API internal usage only *
-
removeUser
void removeUser(User user)
* API internal usage only *
-
removeUserById
void removeUserById(int id)
* API internal usage only *
-
getUserCount
int getUserCount()
Returns the total number of users in the local users list.
-
getUserList
java.util.List<User> getUserList()
Get the whole list of users inside the Rooms joined by the client.- Returns:
- The list of User objects representing the users in the local users list.
-
getSmartFox
ISmartFox getSmartFox()
* API internal usage only *
-
replaceAll
void replaceAll(java.util.List<User> userList)
* API internal usage only *
-
-