|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.key.KeyData org.xmlBlaster.util.key.MsgKeyData
public final class MsgKeyData
This class encapsulates the Message meta data and unique identifier (key) of a publish()/update() or get()-return message.
A typical key could look like this:c*
If you haven't specified a key oid, there will be generated one automatically.
NOTE: Message oid starting with "__" is reserved for internal usage.
NOTE: Message oid starting with "_" is reserved for xmlBlaster plugins.
NOTE: The application specific tags and their attributes (like AGENT or DRIVER in the above example) are received as a 'raw' XML ASCII string in the update() method of a client. If a client wants to look at it she needs to parse it herself, usually by using an XML parser (DOM or SAX). Some weird people even use regular expressions to do so.
MsgKeySaxFactory
,
Serialized FormField Summary |
---|
Fields inherited from class org.xmlBlaster.util.key.KeyData |
---|
CONTENTMIME_DEFAULT, CONTENTMIMEEXTENDED_DEFAULT, DEFAULT_DOMAIN, glob, queryString, queryType, QUERYTYPE_DEFAULT, serialData |
Constructor Summary | |
---|---|
MsgKeyData(Global glob)
Minimal constructor. |
|
MsgKeyData(Global glob,
I_MsgKeyFactory factory,
java.lang.String serialData)
Constructor to parse a message. |
|
MsgKeyData(Global glob,
java.lang.String serialData)
Constructor to parse a message. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a shallow clone, you can change safely all basic or immutable types like boolean, String, int. |
java.lang.String |
getClientTags()
The XML meta information of the topic. |
java.lang.String |
getOid()
|
static void |
main(java.lang.String[] args)
java org.xmlBlaster.util.key.MsgKeyData |
void |
setClientTags(java.lang.String tags)
Set client specific meta informations. |
java.util.Hashtable |
toJXPath()
Dump the key to a flattened JXPath representation. |
java.lang.String |
toXml()
Converts the data in 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 org.xmlBlaster.util.key.KeyData |
---|
equals, generateOid, getContentMime, getContentMimeExtended, getDomain, getGlobal, getQueryString, getQueryType, getUrl, hasOid, isAdministrative, isDeadMessage, isDefaultDomain, isDomain, isExact, isInternal, isPluginInternal, isQuery, isRemoteProperties, isRunlevelManager, isXPath, setContentMime, setContentMimeExtended, setDomain, setGlobal, setOid, setQueryType, size, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MsgKeyData(Global glob)
public MsgKeyData(Global glob, java.lang.String serialData)
factory
- If null, the default factory from Global is used.public MsgKeyData(Global glob, I_MsgKeyFactory factory, java.lang.String serialData)
factory
- If null, the default factory from Global is used.Method Detail |
---|
public java.lang.String getOid()
getOid
in class KeyData
public void setClientTags(java.lang.String tags)
<key oid='4711' contentMime='text/xml'> <AGENT id='192.168.124.20' subId='1' type='generic'> <DRIVER id='FileProof' pollingFreq='10'> </DRIVER> </AGENT> </key>
str
- Your tags in ASCII XML syntaxpublic java.lang.String getClientTags()
public java.lang.String toXml()
toXml
in class KeyData
public java.lang.String toXml(java.lang.String extraOffset)
toXml
in class KeyData
extraOffset
- indenting of tags for nice output
public java.lang.Object clone()
clone
in class KeyData
public java.util.Hashtable toJXPath()
This is experimental code for the simple Applet client
/key/@oid -> Rugby /key/@contentMime -> text/plain /key/@contentMimeExtended -> Version-1.0 /key/child::node() -> <myTeam>Munich<numPlayers>6</numPlayers></myTeam>
public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |