public class RawTraceList
extends java.lang.Object
RawTraceList
manages the restriction list for raw trace filtering. It supports many key Collection methodsModifier and Type | Class and Description |
---|---|
static class |
RawTraceList.PatternLevel
internal class that contains the logger name pattern and the minimum allowable logging level.
|
Constructor and Description |
---|
RawTraceList() |
Modifier and Type | Method and Description |
---|---|
void |
add(RawTraceList.PatternLevel pl)
Add a single PatternLevel object, this add s in sort order defined by PatternLevel object compareTo method.
|
void |
add(RawTraceList.PatternLevel[] plArray)
add an array of PatternLevel objects.
|
protected void |
clear()
Clear the storing vector.
|
boolean |
contains(RawTraceList.PatternLevel pl)
Similar to collection semantic, is this object in the collection
|
boolean |
contains(java.lang.String loggerPattern)
Special contains class looking for just the key (to identify if the key is in)
|
static RawTraceList |
getInstance()
Get the singleton instance of this object
|
protected java.util.Vector<RawTraceList.PatternLevel> |
getRestrictList()
classes in this package can get the vector.
|
java.lang.String |
getRestrictListString()
retrieve a string version of the restriction list
|
int |
indexOf(RawTraceList.PatternLevel pl)
Similar to container indexOf on the typed object.
|
int |
indexOf(RawTraceList.PatternLevel pl,
int idxOffset)
Similar to container indexOf on typed object with array offset
|
int |
indexOf(java.lang.String loggerPattern)
Special IndexOf with just key to PatternLevel object
|
int |
indexOf(java.lang.String loggerPattern,
int idxOffset)
Special IndexOf with just key to PatternLevel object (and index into collection)
|
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).
|
void |
loadRestrictionVectorFromConfig(java.lang.String configFileName)
Load a file from the file system into the sensitve log and trace guard list
|
void |
loadRestrictionVectorFromResource(java.lang.String resourceName)
Read from a resource and load the results into the sensitive log and trace guard list
|
public static RawTraceList getInstance()
public void add(RawTraceList.PatternLevel pl) throws com.ibm.ejs.ras.DuplicateKeyException
pl
- PatternLevel objectDuplicateKeyException
- if this loggerNamePattern already exists in the vectorpublic void add(RawTraceList.PatternLevel[] plArray) throws com.ibm.ejs.ras.DuplicateKeyException
plArray
- Array of PatternLevel objectsDuplicateKeyException
- A DuplicateKeyException with a summarized exceptionMessageprotected void clear()
protected java.util.Vector<RawTraceList.PatternLevel> getRestrictList()
public java.lang.String getRestrictListString()
public boolean contains(RawTraceList.PatternLevel pl)
pl
- PatternLevel object to search forpublic boolean contains(java.lang.String loggerPattern)
loggerPattern
- Pattern for loggerName (key of PatternLevel
object)public int indexOf(RawTraceList.PatternLevel pl)
pl
- Object to get index ofpublic int indexOf(RawTraceList.PatternLevel pl, int idxOffset)
pl
- Object to get index ofidxOffset
- Offset with collection at which to start searchpublic int indexOf(java.lang.String loggerPattern)
loggerPattern
- logger pattern string to search for in collectionpublic int indexOf(java.lang.String loggerPattern, int idxOffset)
loggerPattern
- logger pattern string to search for in collectionidxOffset
- Offset with collection at which to start searchpublic void loadRestrictionVectorFromConfig(java.lang.String configFileName) throws java.lang.Exception
configFileName
- Name of the file containing the information in <loggerPattern>=<Level> formatjava.lang.Exception
- IOException or other exception in converting file to inputStream or processing inputStreampublic void loadRestrictionVectorFromResource(java.lang.String resourceName) throws java.lang.Exception
resourceName
- Name of resource to load as a resource streamjava.lang.Exception
public void loadRestrictionVectorFromConfig(java.io.InputStream restrictFis) throws java.io.IOException, com.ibm.ejs.ras.DuplicateKeyException
restrictFis
- Input Stream with restrict info, one entry per linejava.io.IOException
com.ibm.ejs.ras.DuplicateKeyException