Synergy Home Page

au.edu.swin.synergy.plugin.rooms
Class BRoom

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.rooms.BRoom

public class BRoom
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
BRoom()
          Default constructor.
 
Method Summary
 void addDoor(String door)
          Add a door to another room.
 void addFile(String fileName)
          Add file to room.
 void addUser(BChatUser user)
          Add a user to this room.
 void editUser(BChatUser oldUser, BChatUser newUser)
          Edit user residing in room.
 BStringList getDoors()
          Get ajoining rooms.
 BStringList getFiles()
          Get files which are contained in this room.
 String getName()
          Get the name of the room.
 Vector getUsers()
          Get users currently chatting in this room.
 void removeUser(int connectionId)
          Remove user from list of users.
 void setName(String fName)
          Set the name of this room.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BRoom

public BRoom()
Default constructor.
Method Detail

getName

public String getName()
Get the name of the room.
Returns:
Name of this room.
Pre Condition:
Room exists.

setName

public void setName(String fName)
Set the name of this room.
Parameters:
fName - String to name room.
Pre Condition:
Room exists.
Post Condition:
Room has been named.

getDoors

public BStringList getDoors()
Get ajoining rooms.
Returns:
List of available doors.
Pre Condition:
Doors have been created to other rooms.

getFiles

public BStringList getFiles()
Get files which are contained in this room.
Returns:
List of files stored in this room.
Pre Condition:
Files have been stored.

getUsers

public Vector getUsers()
Get users currently chatting in this room.
Returns:
List of users in this room.
Pre Condition:
Room exists and is occupied by 1 < users.

addDoor

public void addDoor(String door)
Add a door to another room.
Parameters:
door - Additional door to add.
Pre Condition:
Room has been instanciated.
Post Condition:
Room contains new door.

addUser

public void addUser(BChatUser user)
Add a user to this room.
Parameters:
user - New user to join chat.
Pre Condition:
Room exists.
Post Condition:
User added to room.

removeUser

public void removeUser(int connectionId)
Remove user from list of users.
Parameters:
connectionId - Id for user wishing to leave.
Pre Condition:
User exists in room.
Post Condition:
User no longer exists in room.

addFile

public void addFile(String fileName)
Add file to room.
Parameters:
fileName - File for room to own.
Pre Condition:
File has been saved on server.

editUser

public void editUser(BChatUser oldUser,
                     BChatUser newUser)
Edit user residing in room.
Parameters:
oldUser - Old details of user.
newUser - New details of user.
Pre Condition:
User exists in room.
Post Condition:
User contains new details.

Synergy Home Page