xmlBlaster 2.2.0 client API

org.xmlBlaster.util.qos
Class StatusQosData

java.lang.Object
  extended by org.xmlBlaster.util.qos.QosData
      extended by org.xmlBlaster.util.qos.StatusQosData
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class StatusQosData
extends QosData
implements java.io.Serializable, java.lang.Cloneable

Data container handling of status returned by subscribe(), unSubscribe(), erase() and ping().

This data holder is accessible through decorators, each of them allowing a specialized view on the data:

For the xml representation see StatusQosSaxFactory.

Author:
xmlBlaster@marcelruff.info
See Also:
StatusQosSaxFactory, org.xmlBlaster.test.classtest.qos.StatusQosFactoryTest, Serialized Form

Field Summary
 
Fields inherited from class org.xmlBlaster.util.qos.QosData
DEFAULT_persistent, glob, rcvTimestamp, routeNodeList, routeNodes, serialData
 
Constructor Summary
StatusQosData(Global glob, I_StatusQosFactory factory, MethodName methodName)
          Constructs the specialized quality of service object for status informations.
StatusQosData(Global glob, I_StatusQosFactory factory, java.lang.String serialData, MethodName methodName)
          Constructs the specialized quality of service object for a publish() call.
StatusQosData(Global glob, MethodName methodName)
          Constructs the specialized quality of service object for status informations, e.g.
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone, you can change savely all basic or immutable types like boolean, String, int.
 java.lang.Throwable getException()
           
 java.lang.String getKeyOid()
          Access key oid.
 java.lang.String getSubscriptionId()
          If Pub/Sub style update: contains the subscribe ID which caused this update
 void setException(java.lang.Throwable ex)
          Setter for the exception
 void setKeyOid(java.lang.String oid)
          Access unique oid of a message topic.
 void setSubscriptionId(java.lang.String subscriptionId)
          If Pub/Sub style update: contains the subscribe ID which caused this update
 int size()
          The size in bytes of the data in XML form.
 java.util.Hashtable toJXPath()
          Dump the QoS to a flattened JXPath representation.
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset, java.util.Properties props)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class org.xmlBlaster.util.qos.QosData
addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addClientProperty, addRouteInfo, clearRoutes, count, dirtyRead, getClientProperties, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientProperty, getClientPropertyArr, getContentCharset, getContentStr, getContentStrNoEx, getGlobal, getMethod, getNumRouteNodes, getPersistentProp, getRcvTime, getRcvTimestamp, getRcvTimestampNotNull, getRouteNodes, getSender, getState, getStateInfo, hasStateInfo, isAtMaster, isErase, isErased, isForwardError, isFromPersistenceRecovery, isFromPersistenceRecovery, isGet, isOk, isPersistent, isPublish, isSubscribe, isTimeout, isUnSubscribe, isUpdate, propertyExists, setGlobal, setMethod, setPersistent, setRcvTimestamp, setSender, setState, setStateInfo, touchRcvTimestamp, toXmlReadable, writePropertiesXml, writePropertiesXml
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusQosData

public StatusQosData(Global glob,
                     MethodName methodName)
Constructs the specialized quality of service object for status informations, e.g. for a return of a subscribe() call

The state defaults to Constants.STATE_OK

Parameters:
The - factory which knows how to serialize and parse me

StatusQosData

public StatusQosData(Global glob,
                     I_StatusQosFactory factory,
                     MethodName methodName)
Constructs the specialized quality of service object for status informations. E.g. for a return of a subscribe() call

Parameters:
The - factory which knows how to serialize and parse me

StatusQosData

public StatusQosData(Global glob,
                     I_StatusQosFactory factory,
                     java.lang.String serialData,
                     MethodName methodName)
Constructs the specialized quality of service object for a publish() call. For internal use only, this message is sent from the persistence layer

Parameters:
the - XML based ASCII string
true -
Method Detail

setSubscriptionId

public void setSubscriptionId(java.lang.String subscriptionId)
If Pub/Sub style update: contains the subscribe ID which caused this update

Parameters:
subscriptionId - null if PtP message

getSubscriptionId

public java.lang.String getSubscriptionId()
If Pub/Sub style update: contains the subscribe ID which caused this update

Returns:
subscribeId or null if PtP message

getKeyOid

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

Returns:
The unique identifier of a message

setKeyOid

public void setKeyOid(java.lang.String oid)
Access unique oid of a message topic.


toJXPath

public java.util.Hashtable toJXPath()
Dump the QoS to a flattened JXPath representation.

This is experimental code for the simple Applet client

   /qos/state/@id             -> getState()
   /qos/state/@info           -> getStateInfo()
   /qos/rcvTimestamp/@nanos   -> getRcvTimestamp()
   /qos/rcvTimestamp/text()   -> getRcvTime()
   /qos/methodName/text()     -> getMethod()
   /qos/key/@oid              -> getKeyOid()
   /qos/subscribe/@id         -> getSubscriptionId()
 

Currently only an UpdateQos dump is supported

See Also:
Apache JXPath

size

public int size()
The size in bytes of the data in XML form.

Overrides:
size in class QosData
Returns:
The size in bytes of the data in XML form

toXml

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

Specified by:
toXml in class QosData
Returns:
internal state of the status as a XML ASCII string

toXml

public java.lang.String toXml(java.lang.String extraOffset,
                              java.util.Properties props)
Dump state of this object into a XML ASCII string.

Specified by:
toXml in class QosData
Parameters:
extraOffset - indenting of tags for nice output
Returns:
internal state of the status as a XML ASCII string

clone

public java.lang.Object clone()
Returns a shallow clone, you can change savely all basic or immutable types like boolean, String, int.

Overrides:
clone in class QosData

setException

public void setException(java.lang.Throwable ex)
Setter for the exception


getException

public java.lang.Throwable getException()

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.