|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.x4juli.global.components.AbstractComponent
org.x4juli.handlers.rolling.FilterBasedTriggeringPolicy
FilterBasedTriggeringPolicy determines if rolling should be triggered by evaluating the current message against a set of filters. Unless a filter rejects a message, a rolling event will be triggered.
Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.
| Field Summary | |
private ExtendedFilter |
headFilter
The first filter in the filter chain. |
private ExtendedFilter |
tailFilter
The last filter in the filter chain. |
| Fields inherited from class org.x4juli.global.components.AbstractComponent |
manager, repository |
| Constructor Summary | |
FilterBasedTriggeringPolicy()
Creates a new FilterBasedTriggeringPolicy. |
|
| Method Summary | |
void |
activateOptions()
Activate the options that were previously set with calls to option setters. This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set. |
void |
addFilter(ExtendedFilter newFilter)
Add a filter to end of the filter list. |
void |
clearFilters()
Clear the filters chain. |
ExtendedFilter |
getFilter()
Returns the head Filter. |
boolean |
isTriggeringEvent(java.util.logging.Handler handler,
ExtendedLogRecord record,
java.lang.String filename,
long fileLength)
Determines if a rollover may be appropriate at this time. If true is returned, RolloverPolicy.rollover will be called but it can determine that a rollover is not warranted. |
| Methods inherited from class org.x4juli.global.components.AbstractComponent |
getLogger, getLoggerRepository, getMessageProperties, getNonFloodingLogger, getProperty, getProperty, getProperty, getProperty, resetErrorCount, setObjectStore |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private ExtendedFilter headFilter
null
initially.
private ExtendedFilter tailFilter
| Constructor Detail |
public FilterBasedTriggeringPolicy()
| Method Detail |
public boolean isTriggeringEvent(java.util.logging.Handler handler,
ExtendedLogRecord record,
java.lang.String filename,
long fileLength)
isTriggeringEvent in interface TriggeringPolicyhandler - A reference to the handler.record - A reference to the current record.filename - The filename for the currently active log file.fileLength - Length of the file in bytes.
public void activateOptions()
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.
activateOptions in interface OptionHandlerpublic void addFilter(ExtendedFilter newFilter)
newFilter - filter to add to end of list.public void clearFilters()
public ExtendedFilter getFilter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||