xmlBlaster 2.1.0 API

org.xmlBlaster.util.qos
Class StatusQosSaxFactory

java.lang.Object
  extended by org.xmlBlaster.util.SaxHandlerBase
      extended by org.xmlBlaster.util.XmlQoSBase
          extended by org.xmlBlaster.util.qos.StatusQosSaxFactory
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, I_StatusQosFactory

public class StatusQosSaxFactory
extends XmlQoSBase
implements I_StatusQosFactory

Parsing xml QoS (quality of service) of return status.

  <qos>
     <state id='OK' info='QUEUED[bilbo]'/>

     <!-- PublishReturnQos and EraseReturnQos only -->
     <key oid='yourMessageOid'/>

     <!-- SubscribeReturnQos and UnSubscribeQos only -->
     <subscribe id='_subId:1/>

     <!-- UTC time when message was created in xmlBlaster server,
              in nanoseconds since 1970 -->
     <rcvTimestamp nanos='1007764305862000002'>
  </qos>
 

Author:
xmlBlaster@marcelruff.info
See Also:
StatusQosData, StatusQosFactoryTest

Field Summary
private  Global glob
           
private static java.util.logging.Logger log
           
private  StatusQosData statusQosData
           
 
Fields inherited from class org.xmlBlaster.util.XmlQoSBase
clientProperty, clientPropertyTagNames, cpCharacter, inQos
 
Fields inherited from class org.xmlBlaster.util.SaxHandlerBase
character, locator, xmlLiteral, xmlSource
 
Constructor Summary
StatusQosSaxFactory(Global glob)
          Can be used as singleton.
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name)
          End element, event from SAX parser.
 java.lang.String getName()
          A human readable name of this factory
 StatusQosData readObject(java.lang.String xmlQos)
          Parses the given xml Qos and returns a StatusQosData holding the data.
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attrs)
          Start element, event from SAX parser.
static java.lang.String writeObject_(StatusQosData statusQosData, java.lang.String extraOffset, java.util.Properties props)
           
 java.lang.String writeObject(StatusQosData statusQosData, 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.XmlQoSBase
addTagToString, characters, characters, endElementBase, init, isEmpty, startElementBase
 
Methods inherited from class org.xmlBlaster.util.SaxHandlerBase
comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, error, fatalError, getUseLexicalHandler, ignorableWhitespace, init, init, notationDecl, processingInstruction, setDocumentLocator, setUseLexicalHandler, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping, toString, toXml, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

glob

private final Global glob

log

private static java.util.logging.Logger log

statusQosData

private StatusQosData statusQosData
Constructor Detail

StatusQosSaxFactory

public StatusQosSaxFactory(Global glob)
Can be used as singleton.

Method Detail

readObject

public StatusQosData readObject(java.lang.String xmlQos)
                         throws XmlBlasterException
Parses the given xml Qos and returns a StatusQosData holding the data. Parsing of update() and publish() QoS is supported here.

Specified by:
readObject in interface I_StatusQosFactory
Parameters:
the - XML based ASCII string
Throws:
XmlBlasterException

startElement

public final void startElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String name,
                               org.xml.sax.Attributes attrs)
Start element, event from SAX parser.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class XmlQoSBase
Parameters:
name - Tag name
attrs - the attributes of the tag

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String name)
End element, event from SAX parser.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class XmlQoSBase
Parameters:
name - Tag name

writeObject

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

Specified by:
writeObject in interface I_StatusQosFactory
Parameters:
extraOffset - indenting of tags for nice output
props - Formatting hints (see Constants.TOXML_*)
Returns:
internal state of the RequestBroker as a XML ASCII string

writeObject_

public static final java.lang.String writeObject_(StatusQosData statusQosData,
                                                  java.lang.String extraOffset,
                                                  java.util.Properties props)

getName

public java.lang.String getName()
A human readable name of this factory

Specified by:
getName in interface I_StatusQosFactory
Returns:
"StatusQosSaxFactory"

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.