xmlBlaster 2.2.0 client API

org.xmlBlaster.util.qos
Class HistoryQos

java.lang.Object
  extended by org.xmlBlaster.util.qos.HistoryQos

public final class HistoryQos
extends java.lang.Object

Helper class holding QoS settings to acces historical message.

   <history numEntries='20'/>   
 

or

   <history numEntries='20' newestFirst="false"/>
 

Default is to deliver the most current entry (numEntries='1'), '-1' would deliver all history entries available.

The selected messages can be further filtered by mime plugins, see requirement interface.get.

See Also:
The interface.subscribe requirement, The interface.get requirement

Field Summary
static boolean DEFAULT_newestFirst
           
static int DEFAULT_numEntries
           
 
Constructor Summary
HistoryQos(Global glob)
           
HistoryQos(Global glob, int numEntries)
           
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character)
          Handle SAX parsed end element
 boolean getNewestFirst()
           
 int getNumEntries()
          Returns the number of history entries.
 void setNewestFirst(boolean newestFirst)
          The sorting order in which the history entries are delivered.
 void setNumEntries(int numEntries)
           
 boolean startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character, org.xml.sax.Attributes attrs)
          Called for SAX history start tag
 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, toString, wait, wait, wait
 

Field Detail

DEFAULT_numEntries

public static final int DEFAULT_numEntries
See Also:
Constant Field Values

DEFAULT_newestFirst

public static final boolean DEFAULT_newestFirst
See Also:
Constant Field Values
Constructor Detail

HistoryQos

public HistoryQos(Global glob)
Parameters:
glob - The global handle holding environment and logging objects

HistoryQos

public HistoryQos(Global glob,
                  int numEntries)
Parameters:
glob - The global handle holding environment and logging objects
numEntries - The number of history entries you want
Method Detail

setNumEntries

public void setNumEntries(int numEntries)
Parameters:
numEntries - The number of history entries, not more than the current size of the history queue are returned.
If -1 all entries in history queue are returned

getNumEntries

public int getNumEntries()
Returns the number of history entries.

Returns:
e.g. 1

setNewestFirst

public void setNewestFirst(boolean newestFirst)
The sorting order in which the history entries are delivered. The higher priority messages are always delivered first. In one priority the newest message is delivered first with 'true', setting 'false' reverts the delivery sequence in this priority.

Parameters:
newestFirst - defaults to true.

getNewestFirst

public boolean getNewestFirst()
Returns:
defaults to true
See Also:
setNewestFirst(boolean)

startElement

public boolean startElement(java.lang.String uri,
                            java.lang.String localName,
                            java.lang.String name,
                            java.lang.StringBuffer character,
                            org.xml.sax.Attributes attrs)
Called for SAX history start tag

Returns:
true if ok, false on error

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String name,
                       java.lang.StringBuffer character)
Handle SAX parsed end element


toXml

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


toXml

public java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.
Only none default values are dumped for performance reasons

Parameters:
extraOffset - indenting of tags for nice output
Returns:
The xml representation or "" if all settings are default

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.