jChatBox.Chat
Class ChatroomUser
java.lang.Object
|
+--jChatBox.Chat.User
|
+--jChatBox.Chat.ChatroomUser
- public class ChatroomUser
- extends User
- implements java.io.Serializable, javax.servlet.http.HttpSessionBindingListener
This class implements features to bound/unbound User to HttpSession.
- See Also:
- Serialized Form
Constructor Summary |
ChatroomUser(java.lang.String name,
java.lang.String IP,
int type,
UserParams extra,
LogListener chatroom)
Construct a ChatroomUser from name, email, IP address, type, extra and ChatRoom. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ChatroomUser
public ChatroomUser(java.lang.String name,
java.lang.String IP,
int type,
UserParams extra,
LogListener chatroom)
- Construct a ChatroomUser from name, email, IP address, type, extra and ChatRoom.
We need to know which chatroom the user has joined to send a message when the user logs out.
Message is sent through LogListener.
updateChatroomLogListener
public void updateChatroomLogListener(LogListener newChatroom)
- Updates Chatroom LogListener.
updateMonitorLogListener
public void updateMonitorLogListener(LogListener newMonitor)
- Updates Monitor LogListener.
getChatroomLogListener
public LogListener getChatroomLogListener()
- Returns Chatroom LogListener.
getMonitorLogListener
public LogListener getMonitorLogListener()
- Returns Monitor LogListener.
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
- Interface HttpSessionBindingListenner.
- Specified by:
- valueBound in interface javax.servlet.http.HttpSessionBindingListener
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
- Interface HttpSessionBindingListenner.
We notify the chatroom. We also need to notify Monitor bean.
- Specified by:
- valueUnbound in interface javax.servlet.http.HttpSessionBindingListener