com.tivoli.twg.monitor
Class TWGMonAttributeNode

java.lang.Object
  extended bycom.tivoli.twg.monitor.TWGMonAttributeNode
All Implemented Interfaces:
java.io.Serializable

public class TWGMonAttributeNode
extends java.lang.Object
implements java.io.Serializable

This is the TWGMonAttributeNode class. This class encapsulates a response from a TWGMonCmdFindNodes request for attribute tree information

See Also:
Serialized Form

Field Summary
static int ATTRIBUTE_TYPE
           
static int PATH_TYPE
           
static int UNKNOWN_TYPE
           
 
Constructor Summary
TWGMonAttributeNode(IntelByteBuffer iBuf)
          This is the constructor for building the object from a byte stream
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, int passedNodeType)
          This is the constructor for building the node with no systems
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, int passedNodeType, int passedMonitorType)
          This is the constructor for building the node with no systems
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, long passedSystem, int passedNodeType)
          This is the constructor for building the node for a single system
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, long passedSystem, int passedNodeType, int passedMonitorType)
          This is the constructor for building the node for a single system
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, LongValueSet passedSystems, int passedNodeType)
          This is the constructor for building the node with a set of systems
TWGMonAttributeNode(java.lang.String passedDisplayNodeName, java.lang.String passedprogrammaticNodeName, java.util.Locale passedLocale, LongValueSet passedSystems, int passedNodeType, int passedMonitorType)
          This is the constructor for building the node with a set of systems
 
Method Summary
 void addSystem(long systemId)
          Provides a mechanism to quickly add other systems to a node
 int getAttributeType()
          Gets the type of node the node is (Only valid when isLeaf() returns true).
 java.lang.String getDisplayName()
          Gets the Displayable Node name and return it to the caller
 int getIntelByteBufferSize()
          Determines and returns the IntelByteBuffer size requirment for the object the method is called on
 java.util.Locale getLocale()
          Gets the locale information for the node
 int getNodeType()
          Gets the type of node the node is (Path or Attribute)
 java.lang.String getProgrammaticName()
          Gets the Program Node name and return it to the caller
 LongValueSet getSystems()
          Gets the system list and returns it to the caller
 int getSystemsCount()
          Gets the count of systems that are part of the systems set
 boolean isLeaf()
          Gets indication if the node is a leaf node or branch point
 void mergeWith(TWGMonAttributeNode newSource, java.util.Locale requestedLocale)
          Merge node information together.
 void setEnumDataType()
          Sets the ENUMERATED_NODEDATA flag for the node
 IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
          Writes the class variables into the passed in IntelByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_TYPE

public static final int UNKNOWN_TYPE
See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final int ATTRIBUTE_TYPE
See Also:
Constant Field Values

PATH_TYPE

public static final int PATH_TYPE
See Also:
Constant Field Values
Constructor Detail

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           int passedNodeType)
This is the constructor for building the node with no systems

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedNodeType - the int that identifies the type of node being created

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           long passedSystem,
                           int passedNodeType)
This is the constructor for building the node for a single system

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedSystem - the long that identifies the system the information is for
passedNodeType - the int that identifies the type of node being created

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           LongValueSet passedSystems,
                           int passedNodeType)
This is the constructor for building the node with a set of systems

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedSystems - the set of longs that identify the systems the information is for
passedNodeType - the int that identifies the type of node being created

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           int passedNodeType,
                           int passedMonitorType)
This is the constructor for building the node with no systems

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedNodeType - the int that identifies the type of node being created
passedMonitorType - the int that identifies the type of monitor the node represents

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           long passedSystem,
                           int passedNodeType,
                           int passedMonitorType)
This is the constructor for building the node for a single system

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedSystem - the long that identifies the system the information is for
passedNodeType - the int that identifies the type of node being created
passedMonitorType - the int that identifies the type of monitor the node represents

TWGMonAttributeNode

public TWGMonAttributeNode(java.lang.String passedDisplayNodeName,
                           java.lang.String passedprogrammaticNodeName,
                           java.util.Locale passedLocale,
                           LongValueSet passedSystems,
                           int passedNodeType,
                           int passedMonitorType)
This is the constructor for building the node with a set of systems

Parameters:
passedDisplayNodeName - the unicode string that identifies the node for display
passedprogrammaticNodeName - the unicode string that identifies the node for programs
passedLocale - the Locale that identifies the locale for the display node name
passedSystems - the set of longs that identify the systems the information is for
passedNodeType - the int that identifies the type of node being created
passedMonitorType - the int that identifies the type of monitor the node represents

TWGMonAttributeNode

public TWGMonAttributeNode(IntelByteBuffer iBuf)
                    throws TWGByteStreamException
This is the constructor for building the object from a byte stream

Throws:
TWGByteStreamException - thrown to indicate that the byte buffer being used build the object contained improper data
Method Detail

getIntelByteBufferSize

public int getIntelByteBufferSize()
Determines and returns the IntelByteBuffer size requirment for the object the method is called on

Returns:
- size of buffer needed

writeIntelByteBuffer

public IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
Writes the class variables into the passed in IntelByteBuffer. the getIntelByteBufferSize method should be called first to find the size of the buffer that is required.

Parameters:
iBuf - byte buffer to serialize the state of the object into
Returns:
IntelByteBuffer containing the passed in IntelByteBuffer with values set

getSystems

public LongValueSet getSystems()
Gets the system list and returns it to the caller

Returns:
LongValueSet with a systems set with list of unique system ids the node was found on.

getSystemsCount

public int getSystemsCount()
Gets the count of systems that are part of the systems set

Returns:
int systems set size

addSystem

public void addSystem(long systemId)
Provides a mechanism to quickly add other systems to a node


mergeWith

public void mergeWith(TWGMonAttributeNode newSource,
                      java.util.Locale requestedLocale)
               throws TWGMonAttributeNodeInvalidException
Merge node information together. This entails selecting the best display text and merging the list of systems from node to another.

Parameters:
newSource - node who's information we will merge with ours.
requestedLocale - the desired local we want information in.
Throws:
TWGMonAttributeNodeInvalidException - thrown when nodes with different programatic names are merged

getDisplayName

public java.lang.String getDisplayName()
Gets the Displayable Node name and return it to the caller

Returns:
String with the displayable name for the node

getProgrammaticName

public java.lang.String getProgrammaticName()
Gets the Program Node name and return it to the caller

Returns:
String with the programatic name for the node

isLeaf

public boolean isLeaf()
Gets indication if the node is a leaf node or branch point

Returns:
boolean indicating if node is leaf or path node.

getAttributeType

public int getAttributeType()
Gets the type of node the node is (Only valid when isLeaf() returns true). Indicates the data type the attribute referenced by the node produces.

Returns:
int with monitor type encoded in it.

getNodeType

public int getNodeType()
Gets the type of node the node is (Path or Attribute)

Returns:
int with monitor type encoded in it.

getLocale

public java.util.Locale getLocale()
Gets the locale information for the node

Returns:
Locale locale the display info represents for the node

setEnumDataType

public void setEnumDataType()
Sets the ENUMERATED_NODEDATA flag for the node