net.sf.xbus.protocol.xml
Class XBUSXMLMessage

java.lang.Object
  extended by net.sf.xbus.protocol.Message
      extended by net.sf.xbus.protocol.xml.XMLMessageAbstract
          extended by net.sf.xbus.protocol.xml.XBUSXMLMessage
All Implemented Interfaces:
ObjectMessage, TextMessage, XMLMessage
Direct Known Subclasses:
AS400ProgramMessage

public class XBUSXMLMessage
extends XMLMessageAbstract
implements TextMessage, ObjectMessage, XMLMessage

XBUSXMLMessage represents messages in the xBus specific XML-format.


Constructor Summary
XBUSXMLMessage(java.lang.String function, XBUSSystem source, java.lang.String id)
          This constructor initializes the new XBUSXMLMessage with the given parameters.
XBUSXMLMessage(XBUSSystem source)
          This constructor stores the source, creates an unique identifier for the call and initializes the requestTimestamp.
 
Method Summary
static org.w3c.dom.Document getTemplateAsDocument()
          Returns a W3C document containing an empty XBUSXMLMessage
static java.lang.String getTemplateAsString()
          Returns a XML string containing an empty XBUSXMLMessage
protected  void synchronizeRequestFields(XBUSSystem system)
          After setting the request data, both setRequestText and setRequestDocument, some fields of the Message must be synchronized with the request data.
protected  void synchronizeResponseFields(XBUSSystem system)
          After setting the response data, both setResponseText and setResponseDocument, some fields of the Message must be synchronized with the response data.
 
Methods inherited from class net.sf.xbus.protocol.xml.XMLMessageAbstract
getDocumentBuilder, getRequestDocument, getRequestObject, getRequestText, getResponseDocument, getResponseObject, getResponseText, parseXML, serializeXML, setRequestDocument, setRequestObject, setRequestText, setResponseDocument, setResponseObject, setResponseText
 
Methods inherited from class net.sf.xbus.protocol.Message
getErrorcode, getErrortext, getFunction, getId, getRequestTimestamp, getResponseTimestamp, getReturncode, getShortname, getSource, setErrorcode, setErrortext, setFunction, setId, setResponseTimestamp, setReturncode, setShortname
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.xbus.protocol.TextMessage
getRequestText, getResponseText, setRequestText, setResponseText
 
Methods inherited from interface net.sf.xbus.protocol.ObjectMessage
getRequestObject, getResponseObject, setRequestObject, setResponseObject
 
Methods inherited from interface net.sf.xbus.protocol.XMLMessage
getRequestDocument, getResponseDocument, setRequestDocument, setResponseDocument
 

Constructor Detail

XBUSXMLMessage

public XBUSXMLMessage(XBUSSystem source)
This constructor stores the source, creates an unique identifier for the call and initializes the requestTimestamp. It is used when constructing a new XBUSXMLMessage from the data of a receiver.


XBUSXMLMessage

public XBUSXMLMessage(java.lang.String function,
                      XBUSSystem source,
                      java.lang.String id)
This constructor initializes the new XBUSXMLMessage with the given parameters. It is used when constructing a new XBUSXMLMessage by converting it from another Message.

Method Detail

getTemplateAsString

public static java.lang.String getTemplateAsString()
                                            throws XException
Returns a XML string containing an empty XBUSXMLMessage

Throws:
XException

getTemplateAsDocument

public static org.w3c.dom.Document getTemplateAsDocument()
                                                  throws XException
Returns a W3C document containing an empty XBUSXMLMessage

Throws:
XException

synchronizeRequestFields

protected void synchronizeRequestFields(XBUSSystem system)
                                 throws XException
After setting the request data, both setRequestText and setRequestDocument, some fields of the Message must be synchronized with the request data.

Specified by:
synchronizeRequestFields in class XMLMessageAbstract
Throws:
XException

synchronizeResponseFields

protected void synchronizeResponseFields(XBUSSystem system)
After setting the response data, both setResponseText and setResponseDocument, some fields of the Message must be synchronized with the response data.

Specified by:
synchronizeResponseFields in class XMLMessageAbstract