xmlBlaster 2.1.0 API

org.xmlBlaster.client.qos
Class PublishReturnQos

java.lang.Object
  extended by org.xmlBlaster.client.qos.PublishReturnQos

public final class PublishReturnQos
extends java.lang.Object

Handling the returned QoS (quality of service) of a publish() call.

If you are a Java client and use the I_XmlBlasterAccess interface you get this object as the publish() return value.

Example:

   <qos>
     <state id='OK' info='QUEUED[bilbo]'/>
     <key oid='HelloWorld'/>
     <rcvTimestamp nanos='1007764305862000002'/>
     <!-- UTC time when message was created in xmlBlaster server with a publish() call, in nanoseconds since 1970 -->
  </qos>
 

See Also:
StatusQosFactoryTest, the interface.publish requirement

Field Summary
private  StatusQosData statusQosData
           
 
Constructor Summary
PublishReturnQos(Global glob, StatusQosData statusQosData)
          Constructor which reuses a StatusQosData object.
PublishReturnQos(Global glob, java.lang.String xmlQos)
          Constructor which parses XML string.
 
Method Summary
 StatusQosData getData()
          Access the raw data object, usually you shouldn't do it.
 java.lang.String getKeyOid()
          Access key oid.
 Timestamp getRcvTimestamp()
          The approximate receive timestamp (UTC time), when message arrived in requestBroker.publish() method.
In milliseconds elapsed since midnight, January 1, 1970 UTC
 java.lang.String getState()
          Access the state of message.
 java.lang.String getStateInfo()
          Additional structured information about a state.
 java.lang.String toString()
           
 java.lang.String toXml()
           
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

statusQosData

private final StatusQosData statusQosData
Constructor Detail

PublishReturnQos

public PublishReturnQos(Global glob,
                        java.lang.String xmlQos)
                 throws XmlBlasterException
Constructor which parses XML string.

Throws:
XmlBlasterException

PublishReturnQos

public PublishReturnQos(Global glob,
                        StatusQosData statusQosData)
Constructor which reuses a StatusQosData object.

Method Detail

getData

public StatusQosData getData()
Access the raw data object, usually you shouldn't do it.

Returns:
The raw data object

getState

public final java.lang.String getState()
Access the state of message.

Returns:
OK (Other values are not yet supported)

getStateInfo

public final java.lang.String getStateInfo()
Additional structured information about a state.

Returns:
"QUEUED" or "QUEUED[bilbo]"
See Also:
Constants

getKeyOid

public final java.lang.String getKeyOid()
Access key oid.

Returns:
The unique identifier of a message

getRcvTimestamp

public final Timestamp getRcvTimestamp()
The approximate receive timestamp (UTC time), when message arrived in requestBroker.publish() method.
In milliseconds elapsed since midnight, January 1, 1970 UTC

This timestamp is unique for a message instance published and may be used to identify this message. For example a publisher and a receiver of a message can identify this message by its topic (key oid) and its receive timestamp.

To get a human readable view on the timestamp try:

 String time = publishReturnQos.getRcvTimestamp().toString();

 -> "2002-02-10 10:52:40.879456789"
 


toXml

public final java.lang.String toXml()
See Also:
toXml(String)

toXml

public final java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output
Returns:
The XML representation

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.