xmlBlaster 1.6.2 API

org.xmlBlaster.engine.cluster
Class NodeInfo

java.lang.Object
  extended byorg.xmlBlaster.engine.cluster.NodeInfo

public final class NodeInfo
extends java.lang.Object

This class holds the address informations about an xmlBlaster server instance (=cluster node). It is created by the NodeParser from xml markup of by the ClusterManager (via ClusterNode) for our local node.

 <!-- Messages of type "__sys__cluster.node.master[heron]": -->
 <connect>
   <qos>
   ...
   </qos>
 </connect>


Field Summary
private  java.lang.String cbSessionId
          A unique created session id delivered on callback in update() method
private  ConnectQosData connectQosData
           
private  ConnectQosSaxFactory connectQosSaxFactory
           
private  long counter
           
private  DisconnectQos disconnectQos
           
private  boolean inAddress
           
private  boolean inCallback
           
private  boolean inConnectQos
           
private  boolean inInfo
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  boolean nameService
           
private  NodeId nodeId
           
private  Global remoteGlob
          This util global instance is used for I_XmlBlasterAccess, it uses the specific settings from NodeInfo to connect to the remote node
private  Address tmpAddress
          Deprecated. We now use ConnectQos
private  CallbackAddress tmpCbAddress
          Deprecated. We now use ConnectQos
 
Constructor Summary
NodeInfo(Global remoteGlob, NodeId nodeId)
          Holds the ConnectQos of a node.
 
Method Summary
 void addAddress(Address address)
          Add another address for this cluster node.
 void addCbAddress(CallbackAddress cbAddress)
          Add another callback address for this cluster node.
 boolean contains(Address other)
          Does the given address belong to this node?
private  java.lang.String createCbSessionId()
          Create a more or less unique sessionId.
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character)
          Handle SAX parsed end element
private  Address getAddress()
          Access the currently used address to access the node
(package private)  java.lang.String getCbSessionId()
          The expected callback sessionId which used to authenticate the update() call
 ConnectQosData getConnectQosData()
           
 DisconnectQos getDisconnectQos()
           
 java.lang.String getId()
           
 NodeId getNodeId()
           
 Global getRemoteGlob()
           
 boolean isNameService()
          Is the node acting as a preferred cluster naming service.
private  void postInitialize()
          Force some cluster specific connection settings.
 void setDisconnectQos(DisconnectQos disconnectQos)
           
 void setNameService(boolean nameService)
          Tag this node as a cluster naming service.
 void setNodeId(NodeId nodeId)
          TODO: !!!! is this needed?
 boolean startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character, org.xml.sax.Attributes attrs)
          Called for SAX master start tag
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset, java.util.Properties props)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private final java.lang.String ME

remoteGlob

private final Global remoteGlob
This util global instance is used for I_XmlBlasterAccess, it uses the specific settings from NodeInfo to connect to the remote node


log

private static java.util.logging.Logger log

nodeId

private NodeId nodeId

counter

private long counter

connectQosSaxFactory

private ConnectQosSaxFactory connectQosSaxFactory

connectQosData

private ConnectQosData connectQosData

disconnectQos

private DisconnectQos disconnectQos

tmpAddress

private Address tmpAddress
Deprecated. We now use ConnectQos


tmpCbAddress

private CallbackAddress tmpCbAddress
Deprecated. We now use ConnectQos


nameService

private boolean nameService

inConnectQos

private boolean inConnectQos

inInfo

private boolean inInfo

inAddress

private boolean inAddress

inCallback

private boolean inCallback

cbSessionId

private java.lang.String cbSessionId
A unique created session id delivered on callback in update() method

Constructor Detail

NodeInfo

public NodeInfo(Global remoteGlob,
                NodeId nodeId)
         throws XmlBlasterException
Holds the ConnectQos of a node.

Parameters:
remoteGlob - The global specific to this node instance.
Method Detail

getId

public java.lang.String getId()
Returns:
The unique name of the managed xmlBlaster instance e.g. "bilbo.mycompany.com"

getNodeId

public NodeId getNodeId()
Returns:
The unique name of the managed xmlBlaster instance.

getConnectQosData

public ConnectQosData getConnectQosData()
Returns:
The connection configuration for the remote cluster node, never null

setNodeId

public void setNodeId(NodeId nodeId)
TODO: !!!! is this needed?


getCbSessionId

java.lang.String getCbSessionId()
The expected callback sessionId which used to authenticate the update() call


getAddress

private Address getAddress()
Access the currently used address to access the node

Returns:
null if not specified !!!!!! TODO: Changed to throws IllegalArgumentException

addAddress

public void addAddress(Address address)
Add another address for this cluster node.

The map is sorted with the same sequence as the given XML sequence


contains

public boolean contains(Address other)
Does the given address belong to this node?


addCbAddress

public void addCbAddress(CallbackAddress cbAddress)
Add another callback address for this cluster node.


isNameService

public boolean isNameService()
Is the node acting as a preferred cluster naming service.

NOTE: This mode is currently not supported


setNameService

public void setNameService(boolean nameService)
Tag this node as a cluster naming service.

NOTE: This mode is currently not supported


postInitialize

private void postInitialize()
                     throws XmlBlasterException
Force some cluster specific connection settings.

Throws:
XmlBlasterException

startElement

public final boolean startElement(java.lang.String uri,
                                  java.lang.String localName,
                                  java.lang.String name,
                                  java.lang.StringBuffer character,
                                  org.xml.sax.Attributes attrs)
Called for SAX master start tag

Returns:
true if ok, false on error

endElement

public final void endElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String name,
                             java.lang.StringBuffer character)
                      throws org.xml.sax.SAXException
Handle SAX parsed end element

Throws:
org.xml.sax.SAXException

createCbSessionId

private java.lang.String createCbSessionId()
                                    throws XmlBlasterException
Create a more or less unique sessionId.

see Authenticate.java createSessionId() for a discussion

Throws:
XmlBlasterException

toXml

public final java.lang.String toXml()
Dump state of this object into a XML ASCII string.


toXml

public final java.lang.String toXml(java.lang.String extraOffset,
                                    java.util.Properties props)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output

getDisconnectQos

public DisconnectQos getDisconnectQos()
Returns:
Returns the disconnectQos.

setDisconnectQos

public void setDisconnectQos(DisconnectQos disconnectQos)
Parameters:
disconnectQos - The disconnectQos to set.

getRemoteGlob

public Global getRemoteGlob()
Returns:
Returns the remoteGlob.

xmlBlaster 1.6.2 API

Copyright © 1999-2007 The xmlBlaster.org contributers.