|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectraccoon.core.badhnati.xml.MessageToXml
public class MessageToXml
Converts an IMessage
instance into an XML String.
Constructor Summary | |
---|---|
MessageToXml()
Default constructor. |
Method Summary | |
---|---|
protected void |
extractBusMsgParams(java.lang.StringBuffer pXmlBuffer,
IBusMessage pMessage)
Generates the parameters that are specific to a bus message. |
protected void |
extractMsgPayload(java.lang.String pIndent,
java.lang.StringBuffer pXmlBuffer,
IMessage pMessage)
Walks through all the fields of the given IMessage instance. |
int |
getIndent()
The number of spaces used for thie indentation. |
boolean |
isFastMode()
Indicates whether the Renderer is in fast mode. |
java.lang.String |
marshal(IField pField)
Generates the XML String for a IField instance. |
java.lang.String |
marshal(IMessage pMessage)
Converts the contents of an IBusMessage into an XML String. |
void |
setFastMode(boolean pFastMode)
Defines the rendering mode. |
void |
setIndent(int pNbSpaces)
Defines the number of spaces to use for the indentation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageToXml()
Method Detail |
---|
public boolean isFastMode()
true
if in fast mode.public void setFastMode(boolean pFastMode)
pFastMode
- true
if fast XML generation is required (not beautiful)public void setIndent(int pNbSpaces)
pNbSpaces
- the number of spaces, ignored if less than 1.public int getIndent()
public java.lang.String marshal(IMessage pMessage)
IBusMessage
into an XML String.
pMessage
- the message to be serialized.
protected void extractBusMsgParams(java.lang.StringBuffer pXmlBuffer, IBusMessage pMessage)
pXmlBuffer
- the current XML Buffer to which the elements are to be added.pMessage
- the bus message instance to handle.protected final void extractMsgPayload(java.lang.String pIndent, java.lang.StringBuffer pXmlBuffer, IMessage pMessage)
IMessage
instance.
pIndent
- the current level of indentation within the XML StringpXmlBuffer
- the current XML Buffer to which the elements are to be added.pMessage
- the message whose fields are to be marshalledpublic java.lang.String marshal(IField pField)
IField
instance.
pField
- the field to marshal.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |