xmlBlaster 2.1.0 API

org.xmlBlaster.client.qos
Class GetReturnQos

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

public final class GetReturnQos
extends java.lang.Object

QoS (quality of service) informations sent from server to client
via the return value of the get() method.

If you are a Java client you may use this class to parse the QoS argument.

Example:

   <qos> <!-- GetReturnQos -->
     <state id='OK'/>
     <sender>Tim</sender>
     <priority>5</priority>
     <rcvTimestamp nanos='1007764305862000002'> <!-- UTC time when message was created in xmlBlaster server with a publish() call, in nanoseconds since 1970 -->
           2001-12-07 23:31:45.862000002   <!-- The nanos from above but human readable -->
     </rcvTimestamp>
     <expiration lifeTime='1200'/> <!-- The overall life time of the message [milliseconds] -->
     <route>
        <node id='heron'/>
     </route>
  </qos>
 

Author:
xmlBlaster@marcelruff.info

Field Summary
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  MsgQosData msgQosData
           
 
Constructor Summary
GetReturnQos(Global glob, MsgQosData msgQosData)
          Default constructor for transient messages.
GetReturnQos(Global glob, java.lang.String xmlQos)
          Constructs the specialized quality of service object for a get() call.
 
Method Summary
 java.util.Map getClientProperties()
          Access all client properties.
 ClientProperty getClientProperty(java.lang.String key)
          Read back a property.
 boolean getClientProperty(java.lang.String name, boolean defaultValue)
          Access the boolean client property.
 byte getClientProperty(java.lang.String name, byte defaultValue)
          Access the byte client property.
 byte[] getClientProperty(java.lang.String name, byte[] defaultValue)
          Access the byte[] client property.
 double getClientProperty(java.lang.String name, double defaultValue)
          Access the double client property.
 float getClientProperty(java.lang.String name, float defaultValue)
          Access the float client property.
 int getClientProperty(java.lang.String name, int defaultValue)
          Access the integer client property.
 long getClientProperty(java.lang.String name, long defaultValue)
          Access the long client property.
 short getClientProperty(java.lang.String name, short defaultValue)
          Access the short client property.
 java.lang.String getClientProperty(java.lang.String name, java.lang.String defaultValue)
          Access the String client property.
 MsgQosData getData()
          Get the QoS data object which i'm hiding
 PriorityEnum getPriority()
          Message priority.
 java.lang.String getRcvTime()
          Human readable form of message receive time in xmlBlaster server, in SQL representation e.g.:
2001-12-07 23:31:45.862000004
 Timestamp getRcvTimestamp()
          The approximate receive timestamp (UTC time), when message was created - arrived at xmlBlaster server.
In nanoseconds elapsed since midnight, January 1, 1970 UTC
 long getRemainingLifeStatic()
          Approxiamte millis counted from now when message will be discarded by xmlBlaster.
 RouteInfo[] getRouteNodes()
           
 SessionName getSender()
          Access sender name.
 java.lang.String getState()
          Access state of message.
 boolean isErased()
          True if the message was erased by timer or by a client invoking erase().
 boolean isOk()
          True if the message is OK
 boolean isPersistent()
          Is this a persistent message?
 boolean isReadonly()
          Is this a readonly message?
 boolean isTimeout()
          True if a timeout on this message occurred.
 boolean isVolatile()
          Is this a volatile message?
 java.lang.String toString()
           
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 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

ME

private java.lang.String ME

glob

private final Global glob

log

private static java.util.logging.Logger log

msgQosData

private final MsgQosData msgQosData
Constructor Detail

GetReturnQos

public GetReturnQos(Global glob,
                    MsgQosData msgQosData)
Default constructor for transient messages.


GetReturnQos

public GetReturnQos(Global glob,
                    java.lang.String xmlQos)
             throws XmlBlasterException
Constructs the specialized quality of service object for a get() call.

Throws:
XmlBlasterException
Method Detail

getData

public MsgQosData getData()
Get the QoS data object which i'm hiding


getSender

public SessionName getSender()
Access sender name.

Returns:
loginName of sender

getPriority

public PriorityEnum getPriority()
Message priority.

Returns:
priority 0-9

getState

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

Returns:
OK (Other values are not yet supported)

isOk

public boolean isOk()
True if the message is OK


isErased

public boolean isErased()
True if the message was erased by timer or by a client invoking erase().


isVolatile

public boolean isVolatile()
Is this a volatile message?


isPersistent

public boolean isPersistent()
Is this a persistent message?


isReadonly

public boolean isReadonly()
Is this a readonly message?


isTimeout

public boolean isTimeout()
True if a timeout on this message occurred.

Timeouts are spanned by the publisher and thrown by xmlBlaster on timeout to indicate for example STALE messages or any other user problem domain specific event.


getRcvTimestamp

public Timestamp getRcvTimestamp()
The approximate receive timestamp (UTC time), when message was created - arrived at xmlBlaster server.
In nanoseconds elapsed since midnight, January 1, 1970 UTC


getRcvTime

public java.lang.String getRcvTime()
Human readable form of message receive time in xmlBlaster server, in SQL representation e.g.:
2001-12-07 23:31:45.862000004


getRemainingLifeStatic

public long getRemainingLifeStatic()
Approxiamte millis counted from now when message will be discarded by xmlBlaster. Calculated by xmlBlaster just before sending the get, so there will be an offset (the time sending the message to us).

Returns:
The time to live for this message or -1 (unlimited) if not known

getRouteNodes

public RouteInfo[] getRouteNodes()
Returns:
never null, but may have length==0

getClientProperties

public final java.util.Map getClientProperties()
Access all client properties.

Returns:
a map The return is unordered and the map values are of type ClientProperty.
See Also:
ClientProperty

getClientProperty

public ClientProperty getClientProperty(java.lang.String key)
Read back a property.

Returns:
The client property or null if not found

getClientProperty

public final java.lang.String getClientProperty(java.lang.String name,
                                                java.lang.String defaultValue)
Access the String client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final int getClientProperty(java.lang.String name,
                                   int defaultValue)
Access the integer client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final boolean getClientProperty(java.lang.String name,
                                       boolean defaultValue)
Access the boolean client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final double getClientProperty(java.lang.String name,
                                      double defaultValue)
Access the double client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final float getClientProperty(java.lang.String name,
                                     float defaultValue)
Access the float client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final byte getClientProperty(java.lang.String name,
                                    byte defaultValue)
Access the byte client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final byte[] getClientProperty(java.lang.String name,
                                      byte[] defaultValue)
Access the byte[] client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final long getClientProperty(java.lang.String name,
                                    long defaultValue)
Access the long client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

getClientProperty

public final short getClientProperty(java.lang.String name,
                                     short defaultValue)
Access the short client property.

Parameters:
name - The property key
defaultValue - The value to return if the property is not known

toXml

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

Returns:
internal state of the RequestBroker as a XML ASCII string

toXml

public 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:
internal state of the RequestBroker as a XML ASCII string

toString

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

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.