4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.MessageProcessor Class Reference

Static class which parses and process XML with messages. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.MessageProcessor:
Collaboration graph

Static Public Member Functions

static RequestInfo processXML (String XMLString)
 
static String getElementContent (Element contentEl)
 
static String replaceArrows (String aString)
 
static String unescapeXML (String escaped)
 
static String getHexString (byte[] b)
 
static boolean isGroupIncluded (String gStr)
 

Static Private Member Functions

static Document parseXml (String XMLString)
 

Static Private Attributes

static String unescapeXMLApos = "'"
 
static String unescapeXMLQuotes = """
 
static String unescapeXMLLT = "<"
 
static String unescapeXMLGT = ">"
 
static String unescapeXMLAmp = "&"
 

Detailed Description

Static class which parses and process XML with messages.

Static class which parses and process XML with messages

Author
idytrych

Definition at line 44 of file MessageProcessor.java.

Member Function Documentation

static String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.getElementContent ( Element  contentEl)
static

Gets content of XML emement If element have only child with textual content, it returns this content. If element have CDATA section eventually surrounded with text nodes, content of CDATA section is returned.

Parameters
contentElElement with content
Returns
Content of XML emement

Definition at line 422 of file MessageProcessor.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.getHexString ( byte[]  b)
static

Converts array of bytes to hex string from http://rgagnon.com/javadetails/java-0596.html

Parameters
bArray of bytes
Returns
Hex string

Definition at line 497 of file MessageProcessor.java.

static boolean cz.vutbr.fit.knot.annotations.comet.MessageProcessor.isGroupIncluded ( String  gStr)
static

Checks whether id of user group is included in beginning of given string

Parameters
gStrChecked string
Returns
If id of user group is included, returns true, false otherwise

Definition at line 511 of file MessageProcessor.java.

Here is the caller graph for this function:

static Document cz.vutbr.fit.knot.annotations.comet.MessageProcessor.parseXml ( String  XMLString)
staticprivate

Parses XML with messages from client

Parameters
XMLStringString with XML with messages from client
Returns
Parsed XML in w3c.dom.Document

Definition at line 380 of file MessageProcessor.java.

Here is the caller graph for this function:

static RequestInfo cz.vutbr.fit.knot.annotations.comet.MessageProcessor.processXML ( String  XMLString)
static

Parses and process XML with messages from client

Parameters
XMLStringString with XML with messages from client
Returns
Object with informations about client request

Definition at line 59 of file MessageProcessor.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.replaceArrows ( String  aString)
static

Replaces arrows with spaces in given string by slashes " -> ", " ->", "-> " and "->" are replaced by "/"

Parameters
aStringString with arrows
Returns
Returns string with slashes instead arrows

Definition at line 465 of file MessageProcessor.java.

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXML ( String  escaped)
static

Replaces escaped characters in XML with its original character representation.

Parameters
escapedCharacter string containing items escaped by XML processor
Returns
Common character string free of escaped version of characters

Definition at line 479 of file MessageProcessor.java.

Here is the caller graph for this function:

Member Data Documentation

String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXMLAmp = "&"
staticprivate

Definition at line 51 of file MessageProcessor.java.

String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXMLApos = "'"
staticprivate

Definition at line 47 of file MessageProcessor.java.

String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXMLGT = ">"
staticprivate

Definition at line 50 of file MessageProcessor.java.

String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXMLLT = "<"
staticprivate

Definition at line 49 of file MessageProcessor.java.

String cz.vutbr.fit.knot.annotations.comet.MessageProcessor.unescapeXMLQuotes = """
staticprivate

Definition at line 48 of file MessageProcessor.java.


The documentation for this class was generated from the following file: