public class MxParser extends Object
ApplicationHeader
object, mainly used to identify the
specific message.Constructor and Description |
---|
MxParser()
Deprecated.
|
MxParser(File file)
Construct a parser for a file containing a single MX message
|
MxParser(InputStream stream)
Construct a parser for a stream containing a single MX message
|
MxParser(String message)
Creates the parser initializing its content source from the given string.
|
Modifier and Type | Method and Description |
---|---|
MxId |
detectMessage()
Takes an xml with an MX message and detects the specific message type
parsing just the namespace from the Document element.
|
MxPayload |
mx() |
MxNode |
parse()
Non-namespace aware parse.
Parses the complete message content into an MXNode tree structure. |
MxNode |
parse(InputStream stream)
Deprecated.
|
MxNode |
parse(Reader reader)
Deprecated.
|
ApplicationHeader |
parseApplicationHeader()
Parses the application header from the internal message source.
|
BusinessApplicationHeaderV01 |
parseBusinessApplicationHeaderV01()
Parses the application header from the internal message source.
|
BusinessHeader |
parseBusinessHeader() |
MxPayload |
payload()
Attempt to parse the full payload of an MX message.
|
@Deprecated public MxParser()
public MxParser(File file) throws IOException
file
- the file containing a single unit of a messageIOException
- if an error occurs during the read of the filepublic MxParser(InputStream stream) throws IOException
file
- the file containing a single unit of a messagestream
- non null stream containing a single unit of messageIOException
public MxParser(String message)
@Deprecated public MxNode parse(InputStream stream)
@Deprecated public MxNode parse(Reader reader) throws IOException
IOException
public MxNode parse()
MXNode
tree structure.
The parser should be initialized with a valid source.public MxPayload payload()
public BusinessHeader parseBusinessHeader()
public ApplicationHeader parseApplicationHeader()
null
if the content cannot be parsed or the header is not present in the xmlpublic BusinessApplicationHeaderV01 parseBusinessApplicationHeaderV01()
null
if the content cannot be parsed or the header is not present in the xmlpublic MxId detectMessage()
public MxPayload mx()