raccoon.tibco.tibrv.badhnati.xml
Class TibrvToXml

java.lang.Object
  extended by raccoon.tibco.tibrv.badhnati.xml.TibrvToXml

public class TibrvToXml
extends java.lang.Object

TODO Document this class.

Since:
Raccoon v1.0
Version:
$Id:$
Author:
Cedric ROUVRAIS

Constructor Summary
TibrvToXml()
          Default constructor.
 
Method Summary
protected  void extractBusMsgParams(java.lang.StringBuilder pXmlBuffer, com.tibco.tibrv.TibrvMsg pMessage)
          Generates the parameters that are specific to a bus message.
protected  void extractMsgPayload(java.lang.String pIndent, java.lang.StringBuilder pXmlBuffer, com.tibco.tibrv.TibrvMsg mTibrvMsg)
          Walks through all the fields of the given IMessage instance.
 int getIndent()
          The number of spaces used for thie indentation.
 boolean isNiceXml()
          Indicates whether the Renderer is in fast mode.
 java.lang.String marshal(com.tibco.tibrv.TibrvMsg pTibrvMsg)
          Converts the contents of an TibrvMsg into an XML String.
 void setIndent(int pNbSpaces)
          Defines the number of spaces to use for the indentation.
 void setNiceXml(boolean pNiceXml)
          Defines the rendering mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TibrvToXml

public TibrvToXml()
Default constructor.

Method Detail

isNiceXml

public boolean isNiceXml()
Indicates whether the Renderer is in fast mode.

Returns:
true if in nice XML mode.

setNiceXml

public void setNiceXml(boolean pNiceXml)
Defines the rendering mode.

Parameters:
pNiceXml - true if nice XML generation is required (slower than not nice)

setIndent

public void setIndent(int pNbSpaces)
Defines the number of spaces to use for the indentation.

Parameters:
pNbSpaces - the number of spaces, ignored if less than 1.

getIndent

public int getIndent()
The number of spaces used for thie indentation.

Returns:
number of spaces used for a tab

marshal

public java.lang.String marshal(com.tibco.tibrv.TibrvMsg pTibrvMsg)
                         throws com.tibco.tibrv.TibrvException
Converts the contents of an TibrvMsg into an XML String.

Parameters:
pTibrvMsg - the message to be serialized.
Returns:
the xml string that bears the serialized information.
Throws:
com.tibco.tibrv.TibrvException

extractBusMsgParams

protected void extractBusMsgParams(java.lang.StringBuilder pXmlBuffer,
                                   com.tibco.tibrv.TibrvMsg pMessage)
Generates the parameters that are specific to a bus message.

Parameters:
pXmlBuffer - the current XML Buffer to which the elements are to be added.
pMessage - the bus message instance to handle.

extractMsgPayload

protected final void extractMsgPayload(java.lang.String pIndent,
                                       java.lang.StringBuilder pXmlBuffer,
                                       com.tibco.tibrv.TibrvMsg mTibrvMsg)
                                throws com.tibco.tibrv.TibrvException
Walks through all the fields of the given IMessage instance.

Parameters:
pIndent - the current level of indentation within the XML String
pXmlBuffer - the current XML Buffer to which the elements are to be added.
mTibrvMsg - the message whose fields are to be marshalled
Throws:
com.tibco.tibrv.TibrvException


Copyright null null. All Rights Reserved.