com.ibm.ejs.ras

Class RawTraceList

  • java.lang.Object
    • com.ibm.ejs.ras.RawTraceList
  • Direct Known Subclasses:
    RawTraceList


    public class RawTraceList
    extends java.lang.Object
    RawTraceList manages the restriction list for raw trace filtering. It supports many key Collection methods
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  RawTraceList.PatternLevel
      internal class that contains the logger name pattern and the minimum allowable logging level.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RawTraceList() 
    • Method Summary

      Methods 
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RawTraceList

        public RawTraceList()
    • Method Detail

      • getInstance

        public static RawTraceList getInstance()
        Get the singleton instance of this object
        Returns:
        the singleton instance of this object
      • add

        public void add(RawTraceList.PatternLevel pl)
                 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

        public void add(RawTraceList.PatternLevel[] plArray)
                 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

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

        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

        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

        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

        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

        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

        public int indexOf(RawTraceList.PatternLevel pl,
                  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

        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

        public int indexOf(java.lang.String loggerPattern,
                  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

        public void loadRestrictionVectorFromConfig(java.lang.String configFileName)
                                             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

        public void loadRestrictionVectorFromResource(java.lang.String resourceName)
                                               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

        public void loadRestrictionVectorFromConfig(java.io.InputStream restrictFis)
                                             throws java.io.IOException,
                                                    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
IBM WebSphere Application ServerTM
Release 9.0