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 XMLConnector

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

public class XMLConnector
extends java.lang.Object

This implements an XMLConnector for jChatBox.

Constructor Summary
`XMLConnector()` XMLConnector constructor.

Method Summary
`java.lang.String` | `execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session)` Processes all USERS commands.
`protected Login` | `getLoginInstance(java.lang.String classname)` Returns Login instantied from full qualified class name.
`void` | `init()` Initialize global variables
`void` | `setDTDEnabled(boolean en)` Enables/Disables DTD.
`void` | `setLoginModule(java.lang.String logm)` Sets UserLogin Module.
`void` | `setXMLEncoding(java.lang.String enc)` Sets XML Encoding.
`void` | `setXSLError(java.lang.String xsl)` Sets xml-stylesheet for xmlGetChat.
`void` | `setXSLGetChat(java.lang.String xsl)` Sets xml-stylesheet for xmlGetChat.
`void` | `setXSLGetChatroom(java.lang.String xsl)` Sets xml-stylesheet for xmlGetChatroom.
`void` | `setXSLGetManager(java.lang.String xsl)` Sets xml-stylesheet for xmlGetManager.
`protected void` | `trace(int level, java.lang.String msg)` Sends trace to debug.
`protected java.lang.String` | `xmlError(java.lang.String errorMsg, int code)` Returns XML Error.
`protected java.lang.String` | `xmlGetChat(ChatroomUser cUser)` Returns XML Chat.
`protected java.lang.String` | `xmlGetChat(ChatroomUser cUser, javax.servlet.http.HttpSession session)` Returns XML Chat (only new messages).
`protected java.lang.String` | `xmlGetChatroom(int cID)` Returns XML Chatroom.
`protected java.lang.String` | `xmlGetLanguages()` Returns languages list.
`protected java.lang.String` | `xmlGetManager()` Returns XML Manager.
`protected java.lang.String` | `xmlGetResource(java.lang.String language)` Returns XML Resource.

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

Constructor Detail

### XMLConnector

    public XMLConnector()

  XMLConnector constructor.

Method Detail

### init

    public void init()

  Initialize global variables

### setXMLEncoding

    public void setXMLEncoding(java.lang.String enc)

  Sets XML Encoding.

### setLoginModule

    public void setLoginModule(java.lang.String logm)

  Sets UserLogin Module.

### setXSLGetManager

    public void setXSLGetManager(java.lang.String xsl)

  Sets xml-stylesheet for xmlGetManager.

### setXSLGetChat

    public void setXSLGetChat(java.lang.String xsl)

  Sets xml-stylesheet for xmlGetChat.

### setXSLError

    public void setXSLError(java.lang.String xsl)

  Sets xml-stylesheet for xmlGetChat.

### setXSLGetChatroom

    public void setXSLGetChatroom(java.lang.String xsl)

  Sets xml-stylesheet for xmlGetChatroom.

### setDTDEnabled

    public void setDTDEnabled(boolean en)

  Enables/Disables DTD. Default is disabled.

### execute

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

  Processes all USERS commands.
  MANAGER() : Returns XML formated list of chatrooms
  RESOURCE() : Returns XML formated resource bundle
  LANGUAGES() : Returns XML formated supported languages list
  CHATROOM(id) : Returns XML formated chatroom info identified by id
  LOGIN(name,chatrooms) : Returns XML formated chatroom's content
  CHAT(msg,to) : Returns XML formated chatroom's content
  REFRESH() : Returns XML formated chatroom's content
  LOGOUT() : Returns XML formated list of chatrooms
  QUIT() : Returns XML formated list of chatrooms

### xmlError

    protected java.lang.String xmlError(java.lang.String errorMsg,
                                        int code)

  Returns XML Error.

### xmlGetManager

    protected java.lang.String xmlGetManager()

  Returns XML Manager.

### xmlGetLanguages

    protected java.lang.String xmlGetLanguages()
                                        throws ChatException

  Returns languages list.

    `ChatException`

### xmlGetResource

    protected java.lang.String xmlGetResource(java.lang.String language)
                                       throws ChatException

  Returns XML Resource.

    `ChatException`

### xmlGetChatroom

    protected java.lang.String xmlGetChatroom(int cID)
                                       throws ChatException

  Returns XML Chatroom.

    `ChatException`

### xmlGetChat

    protected java.lang.String xmlGetChat(ChatroomUser cUser)
                                   throws ChatException

  Returns XML Chat.

    `ChatException`

### xmlGetChat

    protected java.lang.String xmlGetChat(ChatroomUser cUser,
                                          javax.servlet.http.HttpSession session)
                                   throws ChatException

  Returns XML Chat (only new messages).

    `ChatException`

### getLoginInstance

    protected Login getLoginInstance(java.lang.String classname)

  Returns Login instantied from full qualified class name.

### trace

    protected void trace(int level,
                         java.lang.String msg)

  Sends trace to debug.

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