com.tivoli.twg.monitor
Class TWGMonAttributeNodeList

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

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

This is the TWGMonAttributeNodelist class. This class acts as a smart container of attribute nodes

See Also:
TWGMonAttributeNode, Serialized Form

Constructor Summary
TWGMonAttributeNodeList(IntelByteBuffer iBuf)
          This is the constructor for building the response from a byte stream
TWGMonAttributeNodeList(java.util.Locale neededLocale)
          This is the constructor for building the object
 
Method Summary
 void addNodeToList(TWGMonAttributeNode newNode)
          Add an Attribute Node To list of nodes.
 int getIntelByteBufferSize()
          Determines and returns the IntelByteBuffer size requirment for the object the method is called on
 int getNodeCount()
          get count of number of nodes in the list.
 java.util.Enumeration getNodes()
          Gets an enumeration of nodes in the list.
 void mergeWith(TWGMonAttributeNodeList newList)
          Combine the contents of another node list with this list.
 java.lang.String toString()
          get a textual string that can be dumped that describes the list and its contents
 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, wait, wait, wait
 

Constructor Detail

TWGMonAttributeNodeList

public TWGMonAttributeNodeList(java.util.Locale neededLocale)
This is the constructor for building the object

Parameters:
neededLocale - Locale that the node list is being used to collect information for

TWGMonAttributeNodeList

public TWGMonAttributeNodeList(IntelByteBuffer iBuf)
                        throws TWGByteStreamException
This is the constructor for building the response 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:
int containing 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 write the state of the object o
Returns:
IntelByteBuffer containing the passed in IntelByteBuffer with values set

addNodeToList

public void addNodeToList(TWGMonAttributeNode newNode)
Add an Attribute Node To list of nodes. if it already exists in the list of nodes, merge the info for new guy with one in list already.

Parameters:
newNode - Attribute node to add to the list

getNodeCount

public int getNodeCount()
get count of number of nodes in the list.

Returns:
int with number of elements in this list

getNodes

public java.util.Enumeration getNodes()
Gets an enumeration of nodes in the list.

Returns:
enumeration has enumerated list of nodes from the object

mergeWith

public void mergeWith(TWGMonAttributeNodeList newList)
Combine the contents of another node list with this list.


toString

public java.lang.String toString()
get a textual string that can be dumped that describes the list and its contents

Returns:
String with formated information describing the contents of the object