|
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
public abstract class KeyData
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:<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: Message oid starting with "__" is reserved for internal usage.
NOTE: Message oid starting with "_" is reserved for xmlBlaster plugins.
MsgKeySaxFactory
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CONTENTMIME_DEFAULT
The default content MIME type is "text/plain" |
static java.lang.String |
CONTENTMIMEEXTENDED_DEFAULT
The default content MIME extended type is null |
static java.lang.String |
DEFAULT_DOMAIN
is "" |
protected Global |
glob
|
protected java.lang.String |
queryString
The query string |
protected java.lang.String |
queryType
The query type |
static java.lang.String |
QUERYTYPE_DEFAULT
The default queryType is "EXACT" |
protected java.lang.String |
serialData
|
Constructor Summary | |
---|---|
KeyData(Global glob,
java.lang.String serialData)
Minimal constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a shallow clone, you can change savely all basic or immutable types like boolean, String, int. |
boolean |
equals(KeyData other)
Check if same query is used |
java.lang.String |
generateOid(java.lang.String uniquePrefix)
Generates a unique key oid in scope of a cluster node (on server or on client side). |
java.lang.String |
getContentMime()
Find out which mime type (syntax) the content of the message has. |
java.lang.String |
getContentMimeExtended()
Some further specifying information of the content. |
java.lang.String |
getDomain()
Access the domain setting |
Global |
getGlobal()
|
java.lang.String |
getOid()
|
java.lang.String |
getQueryString()
Access the query string like "//key" |
java.lang.String |
getQueryType()
Access the query type "XPATH" or "EXACT" |
java.lang.String |
getUrl()
Access simplified URL like string. |
boolean |
hasOid()
|
boolean |
isAdministrative()
Messages starting with "__cmd:" are administrative messages |
boolean |
isDeadMessage()
Test if oid is '__sys__deadMessage'. |
boolean |
isDefaultDomain()
|
boolean |
isDomain()
|
boolean |
isExact()
|
boolean |
isInternal()
Messages starting with "__" are reserved for internal usage |
boolean |
isPluginInternal()
Messages starting with "_" are reserved for usage in plugins |
boolean |
isQuery()
|
boolean |
isRemoteProperties()
__sys__remoteProperties |
boolean |
isRunlevelManager()
__sys__remoteProperties |
boolean |
isXPath()
|
void |
setContentMime(java.lang.String contentMime)
Set mime type (syntax) of the message content. |
void |
setContentMimeExtended(java.lang.String contentMimeExtended)
Some further specifying information of the content. |
void |
setDomain(java.lang.String domain)
Set the domain for this message, can be used for a simple grouping of messages to their master node with xmlBlaster clusters. |
void |
setGlobal(Global glob)
Sets the global object (used when deserializing the object) |
void |
setOid(java.lang.String oid)
|
void |
setQueryType(java.lang.String queryType)
|
int |
size()
The size in bytes of the data in XML form. |
java.lang.String |
toString()
Converts the data in XML ASCII string. |
abstract java.lang.String |
toXml()
Converts the data in XML ASCII string. |
abstract 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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient Global glob
protected final transient java.lang.String serialData
public static final transient java.lang.String CONTENTMIME_DEFAULT
public static final transient java.lang.String CONTENTMIMEEXTENDED_DEFAULT
public static final transient java.lang.String DEFAULT_DOMAIN
public static final transient java.lang.String QUERYTYPE_DEFAULT
protected java.lang.String queryType
protected java.lang.String queryString
Constructor Detail |
---|
public KeyData(Global glob, java.lang.String serialData)
Method Detail |
---|
public void setGlobal(Global glob)
public void setOid(java.lang.String oid)
public java.lang.String getOid()
public boolean hasOid()
public java.lang.String getUrl()
public final boolean isDeadMessage()
This is an internal message (isInternal() returns true)
public final boolean isRemoteProperties()
public final boolean isRunlevelManager()
public final boolean isPluginInternal()
public final boolean isInternal()
public final boolean isAdministrative()
public void setContentMime(java.lang.String contentMime)
public java.lang.String getContentMime()
public void setContentMimeExtended(java.lang.String contentMimeExtended)
The
- MIME-extended info, for examplepublic java.lang.String getContentMimeExtended()
public void setDomain(java.lang.String domain)
The
- domain, any chosen string in your problem domain, e.g. "RUGBY" or "RADAR_TRACK"
defaults to "" where the local xmlBlaster instance is the master of the message.public java.lang.String getDomain()
public final boolean isDefaultDomain()
public java.lang.String getQueryType()
public void setQueryType(java.lang.String queryType) throws XmlBlasterException
XmlBlasterException
public java.lang.String getQueryString()
public boolean isExact()
public boolean isQuery()
public boolean isXPath()
public boolean isDomain()
public boolean equals(KeyData other)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String toXml()
public abstract java.lang.String toXml(java.lang.String extraOffset)
extraOffset
- indenting of tags for nice output
public java.lang.String generateOid(java.lang.String uniquePrefix)
glob.getStrippedId()
- on server sidepublic final Global getGlobal()
public java.lang.Object clone()
clone
in class java.lang.Object
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |