|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.client.qos.UpdateQos
public final class UpdateQos
QoS (quality of service) informations sent from server to client
via the update() method from the I_Callback interface.
<qos> <!-- UpdateQos --> <state id='OK'/> <sender>Tim</sender> <priority>5</priority> <subscribe id='__subId:1/> <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] --> <queue index='0' of='1'/> <!-- If queued messages are flushed on login --> <redeliver>4</redeliver> <route> <node id='heron'/> </route> <clientProperty name='transactionId' type='int'>120001</clientProperty> <clientProperty name='transactionId' type='String' encoding='base64'>OKFKAL==</clientProperty> </qos>The receive timestamp can be delivered in human readable form as well by setting on server command line:
-cb.receiveTimestampHumanReadable true <rcvTimestamp nanos='1015959656372000000'> 2002-03-12 20:00:56.372 </rcvTimestamp>
MsgQosData
,
MsgQosSaxFactory
,
update interfaceConstructor Summary | |
---|---|
UpdateQos(Global glob,
MsgQosData msgQosData)
Default constructor for transient messages. |
|
UpdateQos(Global glob,
java.lang.String xmlQos)
Constructs the specialized quality of service object for a update() 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. |
java.lang.String |
getContentStr(byte[] msgContent)
Convenience method to get the raw content as a string, the encoding is UTF-8 if not specified by clientProperty Constants.CLIENTPROPERTY_CONTENT_CHARSET |
java.lang.String |
getContentStrNoEx(byte[] msgContent)
Convenience method to get the raw content as a string, the encoding is UTF-8 if not specified by clientProperty Constants.CLIENTPROPERTY_CONTENT_CHARSET |
MsgQosData |
getData()
Get the QoS data object which i'm hiding |
Global |
getGlobal()
|
PriorityEnum |
getPriority()
Message priority. |
long |
getQueueIndex()
If persistent messages where in queue, this is flushed on login. |
long |
getQueueSize()
If persistent messages where in queue, this is flushed on login. |
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 |
int |
getRedeliver()
Returns > 0 if the message probably is redelivered. |
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. |
java.lang.String |
getSubscriptionId()
If Pub/Sub style update: contains the subscribe ID which caused this update |
boolean |
isErased()
True if the message was erased by timer or by a client invoking erase(). |
boolean |
isForwardError()
True on cluster forward problems |
boolean |
isOk()
True if the message is OK |
boolean |
isPersistent()
Is this a persistent message? |
boolean |
isPtp()
Did i reveive the message in PtP mode? |
boolean |
isReadonly()
Is this a readonly message? |
boolean |
isSubscribable()
Was this message subscribed? |
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. |
java.lang.String |
toXml(java.lang.String extraOffset,
java.util.Properties props)
Overwrite qosData.toXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UpdateQos(Global glob, MsgQosData msgQosData)
public UpdateQos(Global glob, java.lang.String xmlQos) throws XmlBlasterException
XmlBlasterException
Method Detail |
---|
public java.lang.String getContentStr(byte[] msgContent) throws XmlBlasterException
Constants.CLIENTPROPERTY_CONTENT_CHARSET
XmlBlasterException
public java.lang.String getContentStrNoEx(byte[] msgContent)
Constants.CLIENTPROPERTY_CONTENT_CHARSET
public MsgQosData getData()
public Global getGlobal()
public SessionName getSender()
public PriorityEnum getPriority()
Constants
public int getRedeliver()
public java.lang.String getState()
public boolean isOk()
public boolean isErased()
public boolean isTimeout()
public boolean isForwardError()
public boolean isVolatile()
public boolean isSubscribable()
public boolean isPtp()
public boolean isPersistent()
public boolean isReadonly()
public java.lang.String getSubscriptionId()
public long getQueueSize()
public long getQueueIndex()
public Timestamp getRcvTimestamp()
public java.lang.String getRcvTime()
public long getRemainingLifeStatic()
public RouteInfo[] getRouteNodes()
public final java.util.Map getClientProperties()
ClientProperty
public ClientProperty getClientProperty(java.lang.String key)
public final java.lang.String getClientProperty(java.lang.String name, java.lang.String defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final int getClientProperty(java.lang.String name, int defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final boolean getClientProperty(java.lang.String name, boolean defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final double getClientProperty(java.lang.String name, double defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final float getClientProperty(java.lang.String name, float defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final byte getClientProperty(java.lang.String name, byte defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final byte[] getClientProperty(java.lang.String name, byte[] defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final long getClientProperty(java.lang.String name, long defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic final short getClientProperty(java.lang.String name, short defaultValue)
name
- The property keydefaultValue
- The value to return if the property is not knownpublic java.lang.String toXml()
public java.lang.String toXml(java.lang.String extraOffset)
extraOffset
- indenting of tags for nice output
public java.lang.String toXml(java.lang.String extraOffset, java.util.Properties props)
extraOffset
- forceReadable
-
public java.lang.String toString()
toString
in class java.lang.Object
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |