All Packages Class Hierarchy This Package Previous Next Index
Interface net.tabuleiro.nebulae.ServerGroup
- public abstract interface ServerGroup
Interface representing a group on a movie.
Scripts can use methods of the ServerMovie interface to retrieve pointers to existing groups.
-
addUser(ServerUser)
-
Adds an user to this server group
-
getServerUser(int)
-
Retrieves a pointer to a ServerUser object representing a user connected to the movie.
-
getServerUser(String)
-
Retrieves a pointer to a ServerUser object representing a user connected to the movie.
-
name()
-
Returns the name of the group as a String
-
persists()
-
Checks if the group is set to persist on the movie even when no users members of it.
-
removeUser(ServerUser)
-
Removes an user from this server group.
-
sendMessage(MUSMessage)
-
Sends a message to all users that are members of this group
-
serverUserCount()
-
Gets the number of users in this group.
-
setpersists(boolean)
-
Toggles the group persistent flag for this group.
-
setuserLimit(int)
-
Sets the maximum number of users allowed to join this group.
-
userLimit()
-
Returns the maximum number of users allowed to join this group.
getServerUser
public abstract net.tabuleiro.nebulae.ServerUser getServerUser(java.lang.String username) throws net.tabuleiro.nebulae.UserNotFoundException
- Retrieves a pointer to a ServerUser object representing a user connected to the movie.
- Parameters:
- username - String with the name of the user to be returned
- Returns:
- ServerUser pointer, or throws a UserNotFoundException
getServerUser
public abstract net.tabuleiro.nebulae.ServerUser getServerUser(int useridx) throws net.tabuleiro.nebulae.UserNotFoundException
- Retrieves a pointer to a ServerUser object representing a user connected to the movie.
- Parameters:
- useridx - index of the user to be returned
- Returns:
- ServerUser pointer, or throws a UserNotFoundException
addUser
public abstract void addUser(net.tabuleiro.nebulae.ServerUser oneuser) throws net.tabuleiro.nebulae.MUSErrorCode
- Adds an user to this server group
- Parameters:
- oneuser - ServerUser object to be added
removeUser
public abstract void removeUser(net.tabuleiro.nebulae.ServerUser oneuser)
- Removes an user from this server group.
- Parameters:
- oneuser - ServerUser object to be removed
serverUserCount
public abstract int serverUserCount()
- Gets the number of users in this group.
- Returns:
- the number of users
sendMessage
public abstract void sendMessage(net.tabuleiro.nebulae.MUSMessage msg)
- Sends a message to all users that are members of this group
- Parameters:
- msg - Message to send
name
public abstract java.lang.String name()
- Returns the name of the group as a String
userLimit
public abstract int userLimit()
- Returns the maximum number of users allowed to join this group.
By default there is no limit on the number of users, unless the
GroupSizeLimits directive in specified in a movie configuration file.
- Returns:
- the number of users allowed to join the group, or -1 for unlimited users
setuserLimit
public abstract void setuserLimit(int level)
- Sets the maximum number of users allowed to join this group.
By default there is no limit on the number of users, unless the
GroupSizeLimits directive in specified in a movie configuration file.
- Parameters:
- level - the number of users allowed to join the group, or -1 for unlimited users
persists
public abstract boolean persists()
- Checks if the group is set to persist on the movie even when no users members of it.
Groups are not persistent by default.
- Returns:
- TRUE if the group is set to persist, FALSE otherwise
setpersists
public abstract void setpersists(boolean persistflag)
- Toggles the group persistent flag for this group.
Persistent groups are not destroyed even when no users are connected to it.
- Parameters:
- persistflag - TRUE if the group needs to persist on the movie, FALSE otherwise
All Packages Class Hierarchy This Package Previous Next Index