net.sf.xbus.protocol.xml
Class XMLWrapperTransformer

java.lang.Object
  extended by net.sf.xbus.protocol.xml.XMLWrapperTransformer
All Implemented Interfaces:
Transformer

public class XMLWrapperTransformer
extends java.lang.Object
implements Transformer

The XMLWrapperTransformer wraps the given String into a XBUSXMLMessage. The XBUS_Data section of the outcoming XBUSXML document contains the given String as a CDATA element. This makes sure the XML parser will not try to evaluate the String.


Constructor Summary
XMLWrapperTransformer()
           
 
Method Summary
 java.lang.Object transform(java.lang.Object inObject, XBUSSystem source, XBUSSystem destination, Message destinationMessage)
          The transform method wraps the given Object into a XBUSXMLMessage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLWrapperTransformer

public XMLWrapperTransformer()
Method Detail

transform

public java.lang.Object transform(java.lang.Object inObject,
                                  XBUSSystem source,
                                  XBUSSystem destination,
                                  Message destinationMessage)
                           throws XException
The transform method wraps the given Object into a XBUSXMLMessage.

Specified by:
transform in interface Transformer
Parameters:
inObject - either the request or response that shall be wrapped into a XBUSXMLMessage. This Object must be of type String.
source - not used
destination - not used
destinationMessage - not used
Returns:
an org.w3c.Document containing a XBUSXMLMessage containing the inObject as a CDATA section.
Throws:
XException