ch.epfl.lsr.apex
Class APEXMessageParser
java.lang.Object
ch.epfl.lsr.apex.APEXMessageParser
- class APEXMessageParser
- extends Object
The APEXMessageParser
parses a message according the
Application Exchange (APEX) Protocol RFC3340 DTD. It returns an APEXMessage
which may be:
- a
APEXAttachMessage
,
- a
APEXBindMessage
,
- a
APEXTerminateMessage
, or
- a
APEXDataMessage
which may contain either
- an XML content (identified by
APEXMessage.XMLCONTENT
)
- a MIME structured content (identified by
APEXMessage.MIMECONTENT
)
- Author:
- Marc Stoecklin
- See Also:
APEXAttachMessage
,
APEXBindMessage
,
APEXTerminateMessage
,
APEXDataMessage
,
APEXDataMessage.getContentType()
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APEXMessageParser
APEXMessageParser()
parseMessage
public static APEXMessage parseMessage(Document doc)
throws APEXParsingException,
NumberFormatException
Extracts and returnes a parsed APEXMessage
or throws an
appropriate Exception
on failure.
This method splits up the four different operation types (attach, bind,
terminate, or data).
- Parameters:
doc
- A DocumentBuilder
parsed document
- Returns:
- The APEX Message
- Throws:
APEXParsingException
- Thrown on parsing errors (invalid format)
NumberFormatException
- On integer parsing errors (e.g. transIDs, priorities)