xmlBlaster 2.2.0 API

org.xmlBlaster.engine.cluster
Class NodeConnectQos

java.lang.Object
  extended by org.xmlBlaster.engine.cluster.NodeConnectQos

public final class NodeConnectQos
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 inConnectQos
           
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
 
Constructor Summary
NodeConnectQos(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.
 void characters(char[] ch, int start, int length, java.lang.StringBuffer delegateCharacters)
          Characters.
 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

nameService

private boolean nameService

inConnectQos

private boolean inConnectQos

cbSessionId

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

Constructor Detail

NodeConnectQos

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

Parameters:
remoteGlob - The global specific to this node instance.
Throws:
XmlBlasterException
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?

Parameters:
The - unique name of the managed xmlBlaster instance

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

characters

public void characters(char[] ch,
                       int start,
                       int length,
                       java.lang.StringBuffer delegateCharacters)
Characters. The text between two tags, in the following example 'Hello': Hello


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 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.