Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

Fields inherited from class jChatBox.Chat.User
`MODERATOR, NORMAL, SYSTEM`

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.

Method Summary
`LogListener` | `getChatroomLogListener()` Returns Chatroom LogListener.
`LogListener` | `getMonitorLogListener()` Returns Monitor LogListener.
`void` | `updateChatroomLogListener(LogListener newChatroom)` Updates Chatroom LogListener.
`void` | `updateMonitorLogListener(LogListener newMonitor)` Updates Monitor LogListener.
`void` | `valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)` Interface HttpSessionBindingListenner.
`void` | `valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)` Interface HttpSessionBindingListenner.

Methods inherited from class jChatBox.Chat.User
`getIP, getName, getParams, getType, setParams`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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.

Method Detail

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD