xmlBlaster 2.2.0 client API

org.xmlBlaster.client.key
Class UpdateKey

java.lang.Object
  extended by org.xmlBlaster.client.key.UpdateKey

public class UpdateKey
extends java.lang.Object

Parses the key of returned MsgUnit of update().

See MsgKeySaxFactory for a syntax description of the allowed xml structure

A typical key could look like this:
     <key oid='4711' contentMime='text/xml'>
        <AGENT id='192.168.124.20' subId='1' type='generic'>
           <DRIVER id='FileProof' pollingFreq='10'>
           </DRIVER>
        </AGENT>
     </key>
 

NOTE: The key attributes like oid or contentMime are parsed already and available with the getter methods in this class and the superclass.
The application specific tags and their attributes (like AGENT or DRIVER in the above example) are received as a 'raw' XML ASCII string with the getClientTags() or toXml() methods. If you want to look at them you need to parse them yourself, usually by using an XML parser (DOM or SAX parser).

See Also:
MsgKeySaxFactory, the interface.update requirement

Constructor Summary
UpdateKey(Global glob, java.lang.String xmlKey)
          Parse the given xml data.
UpdateKey(MsgKeyData keyData)
           
 
Method Summary
 java.lang.String getClientTags()
          Your specific application tags.
 java.lang.String getContentMime()
          A MIME type like "image/gif"
 java.lang.String getContentMimeExtended()
          For example a version number of the mime type
 MsgKeyData getData()
           
 java.lang.String getDomain()
          Access the domain setting
 Global getGlobal()
           
 java.lang.String getOid()
          Access the <key oid="...">.
 boolean isDeadMessage()
          Dead letters are unrecoverable lost messages, usually an administrator should subscribe to those messages.
 boolean isInternal()
          Messages starting with "__" are reserved for internal usage
 boolean isPluginInternal()
          Messages starting with "_" are reserved for usage in plugins
 java.lang.String toString()
           
 java.lang.String toXml()
          Converts the data in XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset)
          Converts the data in XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateKey

public UpdateKey(MsgKeyData keyData)

UpdateKey

public UpdateKey(Global glob,
                 java.lang.String xmlKey)
          throws XmlBlasterException
Parse the given xml data.

Throws:
XmlBlasterException
Method Detail

getData

public MsgKeyData getData()

getGlobal

public Global getGlobal()

getOid

public java.lang.String getOid()
Access the <key oid="...">.

Returns:
The unique key oid

isDeadMessage

public boolean isDeadMessage()
Dead letters are unrecoverable lost messages, usually an administrator should subscribe to those messages.

This is an internal message (isInternal() returns true)


isPluginInternal

public final boolean isPluginInternal()
Messages starting with "_" are reserved for usage in plugins


isInternal

public final boolean isInternal()
Messages starting with "__" are reserved for internal usage


getContentMime

public java.lang.String getContentMime()
A MIME type like "image/gif"


getContentMimeExtended

public java.lang.String getContentMimeExtended()
For example a version number of the mime type


getDomain

public java.lang.String getDomain()
Access the domain setting

Returns:
A domain string or null

getClientTags

public java.lang.String getClientTags()
Your specific application tags.


toXml

public java.lang.String toXml(java.lang.String extraOffset)
Converts the data in XML ASCII string.

Returns:
An XML ASCII string

toXml

public java.lang.String toXml()
Converts the data in XML ASCII string.

Returns:
An XML ASCII string

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.