net.sf.xbus.protocol.simple
Class EmptyMessage

java.lang.Object
  extended by net.sf.xbus.protocol.Message
      extended by net.sf.xbus.protocol.simple.EmptyMessage
All Implemented Interfaces:
ObjectMessage, TextMessage, XMLMessage

public class EmptyMessage
extends Message
implements TextMessage, ObjectMessage, XMLMessage

EmptyMessage is a message with content null, which is compatible with all message types (text, object, XML).

Author:
Stephan Düwel

Constructor Summary
EmptyMessage(java.lang.String function, XBUSSystem source, java.lang.String id)
           
EmptyMessage(XBUSSystem source)
           
 
Method Summary
 org.w3c.dom.Document getRequestDocument(XBUSSystem system)
          Getting the resquest document always returns null.
 java.lang.Object getRequestObject(XBUSSystem system)
          Getting the response object always returns null.
 java.lang.String getRequestText(XBUSSystem system)
          Getting the request text always returns null.
 org.w3c.dom.Document getResponseDocument()
          Getting the response document always returns null.
 java.lang.Object getResponseObject()
          Getting the response object always returns null.
 java.lang.String getResponseText()
          Getting the response text always returns null.
 void setRequestDocument(org.w3c.dom.Document doc, XBUSSystem source)
          Setting the request document just does nothing.
 void setRequestObject(java.lang.Object obj, XBUSSystem source)
          Setting the request object just does nothing.
 void setRequestText(java.lang.String text, XBUSSystem source)
          Setting the request text just does nothing.
 void setResponseDocument(org.w3c.dom.Document doc, XBUSSystem destination)
          Setting the response document just does nothing.
 void setResponseObject(java.lang.Object obj, XBUSSystem destination)
          Setting the response object just does nothing.
 void setResponseText(java.lang.String text, XBUSSystem destination)
          Setting the response text just does nothing.
 
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
 

Constructor Detail

EmptyMessage

public EmptyMessage(XBUSSystem source)
See Also:
Message

EmptyMessage

public EmptyMessage(java.lang.String function,
                    XBUSSystem source,
                    java.lang.String id)
See Also:
Message
Method Detail

setRequestText

public void setRequestText(java.lang.String text,
                           XBUSSystem source)
Setting the request text just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setRequestText in interface TextMessage
Parameters:
text - the content of the request
source - system where the request is coming from
See Also:
TextMessage.setRequestText(java.lang.String, net.sf.xbus.base.xbussystem.XBUSSystem)

setResponseText

public void setResponseText(java.lang.String text,
                            XBUSSystem destination)
Setting the response text just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setResponseText in interface TextMessage
Parameters:
text - the content of the response
destination - system where the response is coming from
See Also:
TextMessage.setResponseText(java.lang.String, net.sf.xbus.base.xbussystem.XBUSSystem)

getRequestText

public java.lang.String getRequestText(XBUSSystem system)
Getting the request text always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getRequestText in interface TextMessage
Parameters:
system - reference to the system for which the message is meant
Returns:
the content of the request
See Also:
TextMessage.getRequestText(net.sf.xbus.base.xbussystem.XBUSSystem)

getResponseText

public java.lang.String getResponseText()
Getting the response text always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getResponseText in interface TextMessage
Returns:
the content of the response
See Also:
TextMessage.getResponseText()

setRequestObject

public void setRequestObject(java.lang.Object obj,
                             XBUSSystem source)
Setting the request object just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setRequestObject in interface ObjectMessage
Parameters:
obj - the content of the request
source - system where the request is coming from
See Also:
ObjectMessage.setRequestObject(java.lang.Object, net.sf.xbus.base.xbussystem.XBUSSystem)

setResponseObject

public void setResponseObject(java.lang.Object obj,
                              XBUSSystem destination)
Setting the response object just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setResponseObject in interface ObjectMessage
Parameters:
obj - the content of the response
destination - system where the response is coming from
See Also:
ObjectMessage.setResponseObject(java.lang.Object, net.sf.xbus.base.xbussystem.XBUSSystem)

getRequestObject

public java.lang.Object getRequestObject(XBUSSystem system)
Getting the response object always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getRequestObject in interface ObjectMessage
Parameters:
system - reference to the system for which the message is meant
Returns:
the content of the request
See Also:
ObjectMessage.getRequestObject(net.sf.xbus.base.xbussystem.XBUSSystem)

getResponseObject

public java.lang.Object getResponseObject()
Getting the response object always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getResponseObject in interface ObjectMessage
Returns:
the content of the response
See Also:
ObjectMessage.getResponseObject()

getRequestDocument

public org.w3c.dom.Document getRequestDocument(XBUSSystem system)
Getting the resquest document always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getRequestDocument in interface XMLMessage
Parameters:
system - reference to the system for which the message is meant
Returns:
the content of the request
See Also:
XMLMessage.getRequestDocument( net.sf.xbus.base.xbussystem.XBUSSystem)

setRequestDocument

public void setRequestDocument(org.w3c.dom.Document doc,
                               XBUSSystem source)
Setting the request document just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setRequestDocument in interface XMLMessage
Parameters:
doc - the content of the request
source - system where the request is coming from
See Also:
XMLMessage.setRequestDocument(org.w3c.dom.Document, net.sf.xbus.base.xbussystem.XBUSSystem)

getResponseDocument

public org.w3c.dom.Document getResponseDocument()
Getting the response document always returns null. The EmptyMessage is not intended to have any content.

Specified by:
getResponseDocument in interface XMLMessage
Returns:
the content of the response
See Also:
XMLMessage.getResponseDocument()

setResponseDocument

public void setResponseDocument(org.w3c.dom.Document doc,
                                XBUSSystem destination)
Setting the response document just does nothing. The EmptyMessage is not intended to have any content.

Specified by:
setResponseDocument in interface XMLMessage
Parameters:
doc - the content of the response
destination - system where the response is coming from
See Also:
XMLMessage.setResponseDocument(org.w3c.dom.Document, net.sf.xbus.base.xbussystem.XBUSSystem)