com.ibm.ejs.ras

Class RawTraceList

  1. java.lang.Object
  2. extended bycom.ibm.ejs.ras.RawTraceList
Direct known subclasses:
RawTraceList

  1. public class RawTraceList
  2. extends java.lang.Object
RawTraceList manages the restriction list for raw trace filtering. It supports many key Collection methods

Nested Class Summary

Modifier and Type Class and Description
  1. static class
RawTraceList.PatternLevel
internal class that contains the logger name pattern and the minimum allowable logging level.

Constructor Summary

Constructor and Description
RawTraceList()

Method Summary

Modifier and Type Method and Description
  1. void
add(RawTraceList.PatternLevel pl)
Add a single PatternLevel object, this add s in sort order defined by PatternLevel object compareTo method.
  1. void
add(RawTraceList.PatternLevel[] plArray)
add an array of PatternLevel objects.
  1. protected
  2. void
clear()
Clear the storing vector.
  1. boolean
contains(RawTraceList.PatternLevel pl)
Similar to collection semantic, is this object in the collection
  1. boolean
contains(java.lang.String loggerPattern)
Special contains class looking for just the key (to identify if the key is in)
  1. static
  2. RawTraceList
getInstance()
Get the singleton instance of this object
  1. protected
  2. java.util.Vector<RawTraceList.PatternLevel>
getRestrictList()
classes in this package can get the vector.
  1. java.lang.String
getRestrictListString()
retrieve a string version of the restriction list
  1. int
indexOf(RawTraceList.PatternLevel pl)
Similar to container indexOf on the typed object.
  1. int
indexOf(RawTraceList.PatternLevel pl,int idxOffset)
Similar to container indexOf on typed object with array offset
  1. int
indexOf(java.lang.String loggerPattern)
Special IndexOf with just key to PatternLevel object
  1. int
indexOf(java.lang.String loggerPattern,int idxOffset)
Special IndexOf with just key to PatternLevel object (and index into collection)
  1. void
loadRestrictionVectorFromConfig(java.io.InputStream restrictFis)
Read from an input stream with restriction clauses in the form: <loggerPattern>=<Level> This can be from a file or any other type of input stream (ie: a ByteArrayInputStream from a string).
  1. void
loadRestrictionVectorFromConfig(java.lang.String configFileName)
Load a file from the file system into the sensitve log and trace guard list
  1. void
loadRestrictionVectorFromResource(java.lang.String resourceName)
Read from a resource and load the results into the sensitive log and trace guard list
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RawTraceList

  1. public RawTraceList()

Method Detail

getInstance

  1. public static RawTraceList getInstance( )
Get the singleton instance of this object
Returns:
the singleton instance of this object

add

  1. public void add(RawTraceList.PatternLevel pl)
  2. throws com.ibm.ejs.ras.DuplicateKeyException
Add a single PatternLevel object, this add s in sort order defined by PatternLevel object compareTo method.
Parameters:
pl - PatternLevel object
Throws:
DuplicateKeyException - if this loggerNamePattern already exists in the vector

add

  1. public void add(RawTraceList.PatternLevel[] plArray)
  2. throws com.ibm.ejs.ras.DuplicateKeyException
add an array of PatternLevel objects. This is primarily for performance so that adding n entries does not force a resetting of the traceSpec n times. It bundles the updates.
Parameters:
plArray - Array of PatternLevel objects
Throws:
DuplicateKeyException - A DuplicateKeyException with a summarized exceptionMessage

clear

  1. protected void clear()
Clear the storing vector. This can only be done by classes in this package

getRestrictList

  1. protected java.util.Vector<RawTraceList.PatternLevel> getRestrictList( )
classes in this package can get the vector. Used by the marriage module to retrieve current restriction list
Returns:
Storing vector

getRestrictListString

  1. public java.lang.String getRestrictListString( )
retrieve a string version of the restriction list
Returns:
A string with the restriction list format similar to the traceSpec

contains

  1. public boolean contains(RawTraceList.PatternLevel pl)
Similar to collection semantic, is this object in the collection
Parameters:
pl - PatternLevel object to search for
Returns:
true or false as to whether or not in the object

contains

  1. public boolean contains(java.lang.String loggerPattern)
Special contains class looking for just the key (to identify if the key is in)
Parameters:
loggerPattern - Pattern for loggerName (key of PatternLevel object)
Returns:
true or false as to whether or not this key is in the vector

indexOf

  1. public int indexOf(RawTraceList.PatternLevel pl)
Similar to container indexOf on the typed object.
Parameters:
pl - Object to get index of
Returns:
Index into the collection/Vector of matching entry (or -1 if not matching entry)

indexOf

  1. public int indexOf(RawTraceList.PatternLevel pl,
  2. int idxOffset)
Similar to container indexOf on typed object with array offset
Parameters:
pl - Object to get index of
idxOffset - Offset with collection at which to start search
Returns:
Index into the collection/Vector of matching entry (or -1 if not matching entry)

indexOf

  1. public int indexOf(java.lang.String loggerPattern)
Special IndexOf with just key to PatternLevel object
Parameters:
loggerPattern - logger pattern string to search for in collection
Returns:
index in the collection that matches this pattern (or -1 if not found)

indexOf

  1. public int indexOf(java.lang.String loggerPattern,
  2. int idxOffset)
Special IndexOf with just key to PatternLevel object (and index into collection)
Parameters:
loggerPattern - logger pattern string to search for in collection
idxOffset - Offset with collection at which to start search
Returns:
index in the collection that matches this pattern (or -1 if not found)

loadRestrictionVectorFromConfig

  1. public void loadRestrictionVectorFromConfig( java.lang.String configFileName)
  2. throws java.lang.Exception
Load a file from the file system into the sensitve log and trace guard list
Parameters:
configFileName - Name of the file containing the information in <loggerPattern>=<Level> format
Throws:
java.lang.Exception - IOException or other exception in converting file to inputStream or processing inputStream

loadRestrictionVectorFromResource

  1. public void loadRestrictionVectorFromResource( java.lang.String resourceName)
  2. throws java.lang.Exception
Read from a resource and load the results into the sensitive log and trace guard list
Parameters:
resourceName - Name of resource to load as a resource stream
Throws:
java.lang.Exception

loadRestrictionVectorFromConfig

  1. public void loadRestrictionVectorFromConfig( java.io.InputStream restrictFis)
  2. throws java.io.IOException
  3. com.ibm.ejs.ras.DuplicateKeyException
Read from an input stream with restriction clauses in the form: <loggerPattern>=<Level> This can be from a file or any other type of input stream (ie: a ByteArrayInputStream from a string). It assumes one specification on each line.
Parameters:
restrictFis - Input Stream with restrict info, one entry per line
Throws:
java.io.IOException
com.ibm.ejs.ras.DuplicateKeyException