|
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.context.ContextNode
public final class ContextNode
This represents one node in the administrative hierarchy, and is a linked list to its parent and its childs.
Field Summary | |
---|---|
static java.lang.String |
CLUSTER_MARKER_TAG
Use to mark a cluster node name |
static java.lang.String |
CLUSTERCONF_MARKER_TAG
Use to mark a remote cluster node configuration |
static java.lang.String |
CLUSTERMASTER_MARKER_TAG
Use to mark a remote cluster node configuration |
static java.lang.String |
CONNECTION_MARKER_TAG
Use for client side XmlBlasterAccess |
static java.lang.String |
CONTRIB_MARKER_TAG
Use to mark a contrib |
static java.lang.String |
EVENT_MARKER_TAG
Use to mark event methods |
static java.lang.String |
LOGGING_MARKER_TAG
Use to mark logging settings |
static java.lang.String |
MAP_MARKER_TAG
Use to mark a message store map |
static java.lang.String |
PROTOCOL_MARKER_TAG
Use to mark a protocol plugin like XMLRPC or email |
static java.lang.String |
QUEUE_MARKER_TAG
Use to mark a queue |
static char |
QUOTE
|
static java.lang.String |
ROOT_MARKER_TAG
|
static ContextNode |
ROOT_NODE
|
static java.lang.String |
RUNLEVEL_PLUGIN_MARKER_TAG
Use to mark a plugin inside the RunlevelManager (xmlBlasterPlugins.xml) |
static java.lang.String |
SCHEMA_JMX
For JMX conforming ObjectName string |
static java.lang.String |
SCHEMA_JMX_DOMAIN
For JMX conforming ObjectName string, "org.xmlBlaster:" is our JMX domain |
static java.lang.String |
SCHEMA_URL
For URL conforming string |
static java.lang.String |
SCHEMA_XPATH
For XPath conforming query |
static java.lang.String |
SEP
Name for logging output |
static java.lang.String |
SERVICE_MARKER_TAG
Use to mark a service |
static java.lang.String |
SESSION_MARKER_TAG
Use to mark a login session |
static java.lang.String |
SUBJECT_MARKER_TAG
Use to mark a client |
static java.lang.String |
SUBSCRIPTION_MARKER_TAG
Use to mark a subscription |
static java.lang.String |
SYSPROP_MARKER_TAG
Use to mark a system and configuration properties and command line arguments |
static java.lang.String |
TOPIC_MARKER_TAG
Use to mark a topic |
Constructor Summary | |
---|---|
ContextNode(Global glob,
java.lang.String className,
java.lang.String instanceName,
ContextNode parent)
Deprecated. Use constructor without global |
|
ContextNode(java.lang.String className,
java.lang.String instanceName,
ContextNode parent)
|
Method Summary | |
---|---|
boolean |
addChild(ContextNode child)
Add the given child, it exists already nothing happens. |
boolean |
addChild(ContextNode child,
boolean doClone)
Add the given child, it exists already nothing happens. |
void |
changeParentName(ContextNode newParentNode)
Walk up the hierarchy until we find the given className and rename the instance name. |
void |
changeParentName(java.lang.String className,
java.lang.String instanceName)
Walk up the hierarchy until we find the given className and rename the instance name. |
boolean |
equalsAbsolute(ContextNode contextNode)
Compare the absolute name. |
boolean |
equalsRelative(ContextNode contextNode)
|
java.lang.String |
getAbsoluteName()
Access the absolute name in standard notation |
java.lang.String |
getAbsoluteName(java.lang.String schema)
Access the absolute name in standard notation |
protected ContextNode |
getChild(ContextNode node,
java.lang.String className,
java.lang.String instanceName)
Recursive search |
ContextNode |
getChild(java.lang.String className)
Search down the children tree for the given className. |
ContextNode |
getChild(java.lang.String className,
java.lang.String instanceName)
Search down the children tree for the given className and instanceName. |
ContextNode[] |
getChildren()
|
java.lang.String |
getClassName()
|
ContextNode |
getClone()
|
java.lang.String |
getInstanceName()
|
java.lang.String |
getInstanceNameNotNull()
|
ContextNode |
getParent()
|
ContextNode |
getParent(java.lang.String className)
Walk up the hierarchy and return the matching ContextNode. |
java.lang.String |
getRelativeName()
|
java.lang.String |
getRelativeName(java.lang.String schema)
|
java.lang.String |
getSessionNameCompatible()
Access the absolute name but without root tag /xmlBlaster. |
boolean |
isOfClass(java.lang.String className)
|
static void |
main(java.lang.String[] args)
Method for testing only. Invoke: java -Djava.compiler= org.xmlBlaster.util.context.ContextNode |
ContextNode |
mergeChildTree(ContextNode child)
Merges the given child, it exists already nothing happens. |
boolean |
removeChild(ContextNode child)
Remove a child. |
void |
setInstanceName(java.lang.String instanceName)
|
java.lang.String |
toString()
|
java.lang.String |
toXml()
Dump state of this object into XML. |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into XML. |
static ContextNode |
valueOf(java.lang.String url)
Parse the given string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEP
public static final java.lang.String ROOT_MARKER_TAG
public static final java.lang.String CLUSTER_MARKER_TAG
public static final java.lang.String SUBJECT_MARKER_TAG
public static final java.lang.String CONTRIB_MARKER_TAG
public static final java.lang.String SESSION_MARKER_TAG
public static final java.lang.String CONNECTION_MARKER_TAG
public static final java.lang.String QUEUE_MARKER_TAG
public static final java.lang.String SERVICE_MARKER_TAG
public static final java.lang.String RUNLEVEL_PLUGIN_MARKER_TAG
public static final java.lang.String PROTOCOL_MARKER_TAG
public static final java.lang.String MAP_MARKER_TAG
public static final java.lang.String TOPIC_MARKER_TAG
public static final java.lang.String SUBSCRIPTION_MARKER_TAG
public static final java.lang.String EVENT_MARKER_TAG
public static final java.lang.String SYSPROP_MARKER_TAG
public static final java.lang.String LOGGING_MARKER_TAG
public static final java.lang.String CLUSTERCONF_MARKER_TAG
public static final java.lang.String CLUSTERMASTER_MARKER_TAG
public static final java.lang.String SCHEMA_XPATH
public static final java.lang.String SCHEMA_JMX
public static final java.lang.String SCHEMA_JMX_DOMAIN
public static final java.lang.String SCHEMA_URL
public static char QUOTE
public static final ContextNode ROOT_NODE
Constructor Detail |
---|
public ContextNode(Global glob, java.lang.String className, java.lang.String instanceName, ContextNode parent)
public ContextNode(java.lang.String className, java.lang.String instanceName, ContextNode parent)
className
- The tag name like 'node' (ContextNode.CLUSTER_MARKER_TAG) or 'client' (ContextNode.SUBJECT_MARKER_TAG)instanceName
- The instance like 'heron' or 'joe', can be nullparent
- The parent node or null if root ContextNode ('node/heron' etc)Method Detail |
---|
public java.lang.String getClassName()
public boolean isOfClass(java.lang.String className)
className
- The tag name like 'node' (ContextNode.CLUSTER_MARKER_TAG) or 'client' (ContextNode.SUBJECT_MARKER_TAG)public void setInstanceName(java.lang.String instanceName)
public java.lang.String getInstanceName()
public java.lang.String getInstanceNameNotNull()
public ContextNode getParent()
public ContextNode getParent(java.lang.String className)
className
- The context node to retrieve
public void changeParentName(java.lang.String className, java.lang.String instanceName)
className
- The class to change, e.g. "node"instanceName
- The new name to use, e.g. "heron"public void changeParentName(ContextNode newParentNode)
newParentNode
- The new parent name to use, e.g. "heron"public boolean addChild(ContextNode child)
child
- The child to add
public boolean addChild(ContextNode child, boolean doClone)
child
- The child to adddoClone
- If true the given child is not modified
if false the given child is changed to have us as a new parent
public ContextNode getClone()
public ContextNode mergeChildTree(ContextNode child)
this = "/node/heron/client/joe" child = "/node/xyz/client/joe/session/1" results to "/node/heron/client/joe/session/1"
this = "/node/heron/client/joe/session/1" child = "/node/xyz/service/Pop3Driver" results to "/xmlBlaster/node/heron/client/joe/session/1/service/Pop3Driver"
child
- The child to add, it is not touched as we take a clone
public ContextNode[] getChildren()
public boolean removeChild(ContextNode child)
child
-
public ContextNode getChild(java.lang.String className, java.lang.String instanceName)
className
- If null only a given instanceName is searchedinstanceName
- If null only the given className is searched
public ContextNode getChild(java.lang.String className)
className
- If null only a given instanceName is searched
protected ContextNode getChild(ContextNode node, java.lang.String className, java.lang.String instanceName)
public java.lang.String getAbsoluteName()
public java.lang.String getSessionNameCompatible()
public java.lang.String getAbsoluteName(java.lang.String schema)
schema
- Currently only "xpath"
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRelativeName()
public java.lang.String getRelativeName(java.lang.String schema)
schema
- Currently only "xpath"
public boolean equalsRelative(ContextNode contextNode)
public boolean equalsAbsolute(ContextNode contextNode)
contextNode
- Returns false if null
public static ContextNode valueOf(java.lang.String url)
url
- For example
"/xmlBlaster/node/heron/client/joe/session/2"
public final java.lang.String toXml()
public final java.lang.String toXml(java.lang.String extraOffset)
extraOffset
- indenting of tags
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 |