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.


Method Index

 o addUser(ServerUser)
Adds an user to this server group
 o getServerUser(int)
Retrieves a pointer to a ServerUser object representing a user connected to the movie.
 o getServerUser(String)
Retrieves a pointer to a ServerUser object representing a user connected to the movie.
 o name()
Returns the name of the group as a String
 o persists()
Checks if the group is set to persist on the movie even when no users members of it.
 o removeUser(ServerUser)
Removes an user from this server group.
 o sendMessage(MUSMessage)
Sends a message to all users that are members of this group
 o serverUserCount()
Gets the number of users in this group.
 o setpersists(boolean)
Toggles the group persistent flag for this group.
 o setuserLimit(int)
Sets the maximum number of users allowed to join this group.
 o userLimit()
Returns the maximum number of users allowed to join this group.

Methods

 o 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
 o 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
 o 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
 o removeUser
 public abstract void removeUser(net.tabuleiro.nebulae.ServerUser oneuser)
Removes an user from this server group.

Parameters:
oneuser - ServerUser object to be removed
 o serverUserCount
 public abstract int serverUserCount()
Gets the number of users in this group.

Returns:
the number of users
 o 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
 o name
 public abstract java.lang.String name()
Returns the name of the group as a String

 o 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
 o 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
 o 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
 o 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