|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.xml2java.XmlKey
public final class XmlKey
This class encapsulates the Message meta data and unique identifier.
All XmlKey's have the same XML minimal structure:
<key oid="12345"/>or
<key oid="12345"> <!-- application specific tags --> </key>where oid is a unique key. A typical publish 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>
<key oid='4711' queryType='EXACT'/>
<key oid='' queryType='XPATH'> //DRIVER[@id='FileProof'] </key>
<key oid='' queryType='DOMAIN' domain='RUGBY'/>NOTE: The 'XPATH' query covers the 'DOMAIN' and 'EXACT' query, but is far slower. Therefore you should try to use EXACT or in a cluster environment DOMAIN queries first.
Field Summary | |
---|---|
int |
ASCII_TYPE
|
private ServerScope |
glob
|
protected KeyData |
keyData
|
private int |
keyType
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
int |
XML_TYPE
|
private org.w3c.dom.Document |
xmlKeyDoc
A DOM tree containing exactly one (this) message to allow XPath subscriptions to check if this message matches |
private XmlToDom |
xmlToDom
|
Constructor Summary | |
---|---|
XmlKey(ServerScope glob,
KeyData keyData)
Parses given xml string |
|
XmlKey(ServerScope glob,
java.lang.String xmlKey_literal)
Parses given xml string |
Method Summary | |
---|---|
void |
cleanupMatch()
After the existing XPath subscriptions have queried this message we should release the DOM tree. |
java.lang.String |
getContentMime()
|
java.lang.String |
getContentMimeExtended()
|
java.lang.String |
getDomain()
|
KeyData |
getKeyData()
|
java.lang.String |
getKeyOid()
Deprecated. use getOid() |
java.lang.String |
getOid()
Accessing the unique oid of |
org.w3c.dom.Node |
getRootNode()
Fills the DOM tree, and assures that a valid |
java.lang.String |
getUniqueKey()
Deprecated. use getOid() |
boolean |
isAdministrative()
|
boolean |
isDeadMessage()
|
boolean |
isDefaultDomain()
|
boolean |
isInternal()
Messages starting with "__" are reserved for internal usage |
boolean |
isPluginInternal()
Messages starting with "_" are reserved for usage in plugins |
java.lang.String |
literal()
Access the literal XML-ASCII xmlKey. |
private void |
loadDomTree()
Fills the DOM tree, and assures that a valid |
boolean |
match(QueryKeyData queryKey)
Allows to check if this xmlKey matches the given query. |
boolean |
match(java.lang.String xpath)
We need this to allow checking if an existing XPath subscription matches this new message type. |
void |
mergeRootNode(I_MergeDomNode merger)
Should be called by publish() to merge the local XmlKey DOM into the big xmlBlaster DOM tree |
java.lang.String |
toString()
Access the literal ASCII xmlKey. |
java.lang.String |
toXml()
Access the literal ASCII xmlKey. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String ME
private ServerScope glob
private static java.util.logging.Logger log
private XmlToDom xmlToDom
public final int XML_TYPE
public final int ASCII_TYPE
private int keyType
protected KeyData keyData
private org.w3c.dom.Document xmlKeyDoc
<xmlBlaster> <key oid='xx'> ... </key> </xmlBlaster>
Constructor Detail |
---|
public XmlKey(ServerScope glob, KeyData keyData)
The
- original key in XML syntax, for example:public XmlKey(ServerScope glob, java.lang.String xmlKey_literal) throws XmlBlasterException
The
- original key in XML syntax, for example:XmlBlasterException
Method Detail |
---|
public KeyData getKeyData()
public final boolean isDeadMessage() throws XmlBlasterException
XmlBlasterException
KeyData.isDeadMessage()
public final java.lang.String toString()
toString
in class java.lang.Object
literal()
public java.lang.String toXml()
literal()
public final java.lang.String literal()
public final java.lang.String getUniqueKey()
public final java.lang.String getKeyOid()
public final java.lang.String getOid()
public final java.lang.String getContentMime()
public final java.lang.String getContentMimeExtended()
public final java.lang.String getDomain()
public final boolean isDefaultDomain()
public final boolean isPluginInternal()
public final boolean isInternal()
public final boolean isAdministrative()
public org.w3c.dom.Node getRootNode() throws XmlBlasterException
XmlBlasterException
private void loadDomTree() throws XmlBlasterException
<key oid="">is used.
XmlBlasterException
public final void mergeRootNode(I_MergeDomNode merger) throws XmlBlasterException
XmlBlasterException
public final boolean match(QueryKeyData queryKey) throws XmlBlasterException
queryKey
- An XmlKey object containing a query (XPATH, EXACT or DOMAIN)
XmlBlasterException
public final boolean match(java.lang.String xpath) throws XmlBlasterException
xpath
- The XPath query, check if it matches to this xmlKey
XmlBlasterException
public void cleanupMatch()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |