© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com

com.bitfactoryinc.logging
Class LogEntryCategoryFilter

java.lang.Object
  |
  +--com.bitfactoryinc.logging.LogEntryFilter
        |
        +--com.bitfactoryinc.logging.LogEntryCategoryFilter

public class LogEntryCategoryFilter
extends LogEntryFilter

Instances filter LogEntries based on their categories. By default, this is an "allow" filter, meaning that the specified categories contained herein pass through the filter. If allow is set to false, then all categories that are NOT contained herein will pass through.


Field Summary
private  boolean allow
           
private  java.util.Collection categories
           
 
Fields inherited from class com.bitfactoryinc.logging.LogEntryFilter
severityThreshold
 
Constructor Summary
LogEntryCategoryFilter()
           
LogEntryCategoryFilter(boolean allowFlag)
           
 
Method Summary
 void addCategory(java.lang.Object aCategory)
           
protected  boolean canPass(LogEntry aLogEntry)
          Concrete subclasses should override this method, returning true if aLogEntry "passes" the filter (i.e.
protected  java.util.Collection getCategories()
           
 boolean isAllow()
           
 void removeCategory(java.lang.Object aCategory)
           
 void setAllow(boolean newAllow)
           
protected  void setCategories(java.util.Collection newCategories)
           
 
Methods inherited from class com.bitfactoryinc.logging.LogEntryFilter
getSeverityThreshold, setSeverityThreshold, shouldLog
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

categories

private java.util.Collection categories

allow

private boolean allow
Constructor Detail

LogEntryCategoryFilter

public LogEntryCategoryFilter()

LogEntryCategoryFilter

public LogEntryCategoryFilter(boolean allowFlag)
Method Detail

addCategory

public void addCategory(java.lang.Object aCategory)

canPass

protected boolean canPass(LogEntry aLogEntry)
Description copied from class: LogEntryFilter
Concrete subclasses should override this method, returning true if aLogEntry "passes" the filter (i.e. aLogEntry should be logged).
Overrides:
canPass in class LogEntryFilter

getCategories

protected java.util.Collection getCategories()

isAllow

public boolean isAllow()

removeCategory

public void removeCategory(java.lang.Object aCategory)

setAllow

public void setAllow(boolean newAllow)

setCategories

protected void setCategories(java.util.Collection newCategories)

© 2002 - Lorne Brinkman
www.TheObjectGuy.com
Lorne@TheObjectGuy.com