com.tivoli.twg.monitor
Class TWGMonAttributePath

java.lang.Object
  extended bycom.tivoli.twg.monitor.TWGMonAttributePath
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class TWGMonAttributePath
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

This is the TWGAttributePath class. This class encapsulates path information for monitoring requests

See Also:
Serialized Form

Field Summary
static int CURRENT_PATH_VERSION
           
static java.lang.String PATH_SEPERATOR
           
 
Constructor Summary
TWGMonAttributePath()
          This is the constructor for building the object
TWGMonAttributePath(IntelByteBuffer iBuf)
           
TWGMonAttributePath(java.lang.String[] pathInfo)
          This is the constructor for building the object from a string array
 
Method Summary
 TWGMonAttributePath addLevelToPath(java.lang.String pathPoint)
          Used to add level to the end of the path
 java.lang.Object clone()
          Returns a clone of this attribute path.
 boolean containsPath(TWGMonAttributePath testRoot)
          compare the value of this path with another path
 boolean equals(TWGMonAttributePath that)
          Compare the value of this path with another path
 int getIntelByteBufferSize()
          Determines the IntelByteBuffer size requirment for the passed in AttributePath
 java.lang.String getPathAtLevel(int levelRequested)
          Get the path string for the level requested
 int getPathLevels()
          get the number of levels in the path
 java.lang.String[] getPathText()
          Returns path text as array of strings..
 boolean hasRootPath(TWGMonAttributePath testRoot)
          compare the value of this path with another path
static java.lang.String replaceChars(java.lang.String outStr)
          Returns path text as a dotted string with filesystem restricted chars removed
 TWGMonAttributePath replicate()
          Returns a clone of this attribute path.
 java.lang.String toDottedString()
          Returns path text as a dotted string
 java.lang.String toFileName()
          Returns path text as a dotted string suitable for a file name
 java.lang.String toString()
          get the path for debugging purposes
 java.lang.String toString(int levels)
          Return a String containing the requested path levels, each inclosed in brackets
 IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
          Writes the class variables out to the passed in IntelByteBuffer This is for sever persistant storage usage.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CURRENT_PATH_VERSION

public static final int CURRENT_PATH_VERSION
See Also:
Constant Field Values

PATH_SEPERATOR

public static final java.lang.String PATH_SEPERATOR
See Also:
Constant Field Values
Constructor Detail

TWGMonAttributePath

public TWGMonAttributePath()
This is the constructor for building the object


TWGMonAttributePath

public TWGMonAttributePath(java.lang.String[] pathInfo)
This is the constructor for building the object from a string array

Parameters:
pathInfo - array of strings that define the path information

TWGMonAttributePath

public TWGMonAttributePath(IntelByteBuffer iBuf)
Method Detail

getIntelByteBufferSize

public int getIntelByteBufferSize()
Determines the IntelByteBuffer size requirment for the passed in AttributePath

Returns:
int containing the size of buffer needed

writeIntelByteBuffer

public IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
Writes the class variables out to the passed in IntelByteBuffer This is for sever persistant storage usage.

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

addLevelToPath

public TWGMonAttributePath addLevelToPath(java.lang.String pathPoint)
Used to add level to the end of the path

Parameters:
pathPoint - adds the next level to the path already contained in the object
Returns:
TWGMonAttributePath refering to this object

getPathLevels

public int getPathLevels()
get the number of levels in the path

Returns:
int containing the number of levels in the path the object contains

getPathAtLevel

public java.lang.String getPathAtLevel(int levelRequested)
Get the path string for the level requested

Parameters:
levelRequested - get the part of path that is levelRequested step into the path
Returns:
String string found at level requested

equals

public boolean equals(TWGMonAttributePath that)
Compare the value of this path with another path

Parameters:
that - the path to check equality with
Returns:
boolean with indication of the two paths are equal.

hasRootPath

public boolean hasRootPath(TWGMonAttributePath testRoot)
compare the value of this path with another path

Parameters:
testRoot - the path to check if it is a subroot of this path
Returns:
boolean with indication if my path has all the steps the test path does.

containsPath

public boolean containsPath(TWGMonAttributePath testRoot)
compare the value of this path with another path

Parameters:
testRoot - the path to check if it is a subroot of this path
Returns:
boolean with indication if my path has all the steps the test path does.

toString

public java.lang.String toString()
get the path for debugging purposes

Returns:
String containing the path information on a form usable for a debug log

toString

public java.lang.String toString(int levels)
Return a String containing the requested path levels, each inclosed in brackets

Parameters:
levels - the number of levels returned. If positive the first of those levels, if negative, the last of the specified count of levels.
Returns:
a String containing the desired levels. If levels are requested and the path is empty, the String "[Root]" will be returned.

replicate

public TWGMonAttributePath replicate()
Returns a clone of this attribute path.

Returns:
TWGMonAttributePath containing a clone of this attribute path.

clone

public java.lang.Object clone()
Returns a clone of this attribute path.

Returns:
Object containing a clone of this attribute path.

getPathText

public java.lang.String[] getPathText()
Returns path text as array of strings..

Returns:
String[] Array of strings representing the path information

toFileName

public java.lang.String toFileName()
Returns path text as a dotted string suitable for a file name

Returns:
String containing dotted path string

toDottedString

public java.lang.String toDottedString()
Returns path text as a dotted string

Returns:
String containing dotted path string

replaceChars

public static java.lang.String replaceChars(java.lang.String outStr)
Returns path text as a dotted string with filesystem restricted chars removed

Returns:
String containing dotted path string