org.jbrain.qlink.chat
Class AbstractRoom

java.lang.Object
  |
  +--org.jbrain.qlink.chat.AbstractRoom
All Implemented Interfaces:
Room
Direct Known Subclasses:
Auditorium, NormalRoom

public abstract class AbstractRoom
extends java.lang.Object
implements Room


Field Summary
protected  QRoom _room
           
protected  QSeat _user
           
 
Constructor Summary
AbstractRoom(QRoom room, QSeat user)
           
 
Method Summary
 void addEventListener(RoomEventListener listener)
           
 boolean changeUserName(org.jbrain.qlink.user.QHandle handle, ChatProfile profile)
           
 GameInfo[] getGameInfoList()
           
 java.lang.String getName()
           
 int getPopulation()
           
 QSeat getSeatInfo(org.jbrain.qlink.user.QHandle handle)
           
 boolean isPublicRoom()
           
 void leave()
           
 ObservedGame observeGame(org.jbrain.qlink.user.QHandle handle)
           
protected  void processChatEvent(ChatEvent event)
           
protected  void processEvent(RoomEvent event)
           
protected  void processJoinEvent(JoinEvent event)
           
protected  void processQuestionStateEvent(QuestionStateEvent event)
           
protected  void processSystemMessageEvent(SystemMessageEvent event)
           
 void removeEventListener(RoomEventListener listener)
           
abstract  void say(java.lang.String text)
           
abstract  void say(java.lang.String[] text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbrain.qlink.chat.Room
createGame, getExtSeatInfoList, getInfo, getPendingGame, getSeatInfoList
 

Field Detail

_room

protected QRoom _room

_user

protected QSeat _user
Constructor Detail

AbstractRoom

public AbstractRoom(QRoom room,
                    QSeat user)
Parameters:
room -
user -
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Room
Returns:

getPopulation

public int getPopulation()
Specified by:
getPopulation in interface Room
Returns:

addEventListener

public void addEventListener(RoomEventListener listener)
Specified by:
addEventListener in interface Room

removeEventListener

public void removeEventListener(RoomEventListener listener)
Specified by:
removeEventListener in interface Room

observeGame

public ObservedGame observeGame(org.jbrain.qlink.user.QHandle handle)
Specified by:
observeGame in interface Room

getGameInfoList

public GameInfo[] getGameInfoList()
Specified by:
getGameInfoList in interface Room

isPublicRoom

public boolean isPublicRoom()
Specified by:
isPublicRoom in interface Room

getSeatInfo

public QSeat getSeatInfo(org.jbrain.qlink.user.QHandle handle)
Specified by:
getSeatInfo in interface Room

leave

public void leave()
Specified by:
leave in interface Room

say

public abstract void say(java.lang.String text)
Specified by:
say in interface Room

say

public abstract void say(java.lang.String[] text)
Specified by:
say in interface Room

changeUserName

public boolean changeUserName(org.jbrain.qlink.user.QHandle handle,
                              ChatProfile profile)
Specified by:
changeUserName in interface Room

processJoinEvent

protected void processJoinEvent(JoinEvent event)

processQuestionStateEvent

protected void processQuestionStateEvent(QuestionStateEvent event)

processChatEvent

protected void processChatEvent(ChatEvent event)

processSystemMessageEvent

protected void processSystemMessageEvent(SystemMessageEvent event)

processEvent

protected void processEvent(RoomEvent event)