xmlBlaster 2.2.0 API

org.xmlBlaster.util.qos
Class DisconnectQosSaxFactory

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

public final class DisconnectQosSaxFactory
extends XmlQoSBase
implements I_DisconnectQosFactory

This class encapsulates the qos of a logout() or disconnect().

So you don't need to type the 'ugly' XML ASCII string by yourself. After construction access the ASCII-XML string with the toXml() method.
A typical disconnect QoS could look like this (showing default settings):

  <qos>
    <deleteSubjectQueue>true</deleteSubjectQueue>
    <clearSessions>false</clearSessions>
  </qos>
 

See Also:
DisconnectQosTest, disconnect interface

Field Summary
private  DisconnectQosData disconnectQosData
           
private  Global glob
           
 
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
DisconnectQosSaxFactory(Global glob)
           
 
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
 DisconnectQosData readObject(java.lang.String xmlQos)
          Parses the given xml Qos and returns a DisconnectQosData 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 toXml(DisconnectQosData data, java.lang.String extraOffset, java.util.Properties props)
          Dump state of this object into a XML ASCII string.
 java.lang.String writeObject(DisconnectQosData disconnectQosData, 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

disconnectQosData

private DisconnectQosData disconnectQosData
Constructor Detail

DisconnectQosSaxFactory

public DisconnectQosSaxFactory(Global glob)
Method Detail

readObject

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

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

startElement

public 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 java.lang.String writeObject(DisconnectQosData disconnectQosData,
                                    java.lang.String extraOffset,
                                    java.util.Properties props)
Dump state of this object into a XML ASCII string.

Specified by:
writeObject in interface I_DisconnectQosFactory
Parameters:
extraOffset - indenting of tags for nice output
disconnectQosData - The data object to serialize
Returns:
internal state of the DisconnectQos as a XML ASCII string

toXml

public static final java.lang.String toXml(DisconnectQosData data,
                                           java.lang.String extraOffset,
                                           java.util.Properties props)
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

getName

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

Specified by:
getName in interface I_DisconnectQosFactory
Returns:
"DisconnectQosSaxFactory"

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.