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

## jChatBox.Service
Class UserProcessor

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

public class UserProcessor
extends ModeratorProcessor

This class handles all USERS HttpRequests once logged.

Field Summary

Fields inherited from class jChatBox.Service.SystemProcessor
`_commands`

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 actions.
`java.lang.String` | `execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session, javax.servlet.ServletContext application)` Processes all USERS actions.
`java.lang.String` | `getSysMessage(javax.servlet.http.HttpSession session)` Returns message or error.
`void` | `setSysMessage(javax.servlet.http.HttpSession session, java.lang.String message)` Sets message or error.

Methods inherited from class jChatBox.Service.ModeratorProcessor
`checkSystemLogin, getCommand`

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.HttpSession session,
                                    javax.servlet.ServletContext application)

  Processes all USERS actions.

  Overrides:
    `execute` in class `ModeratorProcessor`

### 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 actions.
  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(javax.servlet.http.HttpSession session,
                              java.lang.String message)

  Sets message or error.

  Overrides:
    `setSysMessage` in class `ModeratorProcessor`

### getSysMessage

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

  Returns message or error.

  Overrides:
    `getSysMessage` in class `ModeratorProcessor`

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