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

## jChatBox.Service
Class UserProcessor

    java.lang.Object
      |
      +--jChatBox.Service.UserProcessor

public class UserProcessor
extends java.lang.Object

This class handles all USERS HttpRequests once logged.

Constructor Summary
`UserProcessor()` Dummy constructor.

Method Summary
`java.lang.String` | `checkUserLogin(javax.servlet.http.HttpSession session)` Checks if user is logged.
`int` | `computeRefresh(long top, long last, int model, int limit, int nusers)` Computes refresh time.
`java.lang.String` | `execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpSession session, javax.servlet.ServletContext application)` Processes all USERS commands.
`java.lang.String` | `getSysMessage()` Returns message or error.
`void` | `setSysMessage(java.lang.String message)` Sets message or error.

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

Constructor Detail

### UserProcessor

    public UserProcessor()

  Dummy constructor.

Method Detail

### execute

    public java.lang.String execute(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    javax.servlet.http.HttpSession session,
                                    javax.servlet.ServletContext application)

  Processes all USERS commands.
  CHAT(msg,to)
  REFRESH
  LOGOUT()
  QUIT()
  Current chatroom ID is stored in user's session.
  For BUFFEREDFRAMED mode, when content.jsp is called with no "buffering" parameter
  then this class re-calls content.jsp with "buffering=true" to buffer chatroom's content.
  The resulting HTML is stored in "bufferedChat" session variable.

### checkUserLogin

    public java.lang.String checkUserLogin(javax.servlet.http.HttpSession session)

  Checks if user is logged.
  User is logged if ChatroomUser is attached to HttpSession

### computeRefresh

    public int computeRefresh(long top,
                              long last,
                              int model,
                              int limit,
                              int nusers)

  Computes refresh time.

### setSysMessage

    public void setSysMessage(java.lang.String message)

  Sets message or error.

### getSysMessage

    public java.lang.String getSysMessage()

  Returns message or error.

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