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

## jChatBox.Chat
Class Monitor

    java.lang.Object
      |
      +--jChatBox.Chat.Monitor

All Implemented Interfaces:
  LogListener

public class Monitor
extends java.lang.Object
implements LogListener

This class (Singleton) is an Hashtable. We need this to associate a ChatroomUser and an HttpSession.
Monitor is a bean with an application scope. It's the way SYSTEM user knows about chatroom's users.
This class doesn't implement Serializable interface. Depending on Servlet/JSP engine we can't be sure that HttpSession will be Serializable. All HttpSessions are lost when Servlet/JSP engine stops.

Method Summary
`static Monitor` | `getInstance()`
`java.util.Hashtable` | `getTable()`
`void` | `performLogin(ChatroomUser user)`
`void` | `performLogout(ChatroomUser user)` Remove ChatroomUser and its HttpSession.

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

Method Detail

### getInstance

    public static Monitor getInstance()

### getTable

    public java.util.Hashtable getTable()

### performLogout

    public void performLogout(ChatroomUser user)

  Remove ChatroomUser and its HttpSession.

  Specified by:
    `performLogout` in interface `LogListener`

### performLogin

    public void performLogin(ChatroomUser user)

  Specified by:
    `performLogin` in interface `LogListener`

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