TPTP 4.4.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter.util
Class AbstractXPATHFilterExit

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.util.AbstractXPATHFilterExit
All Implemented Interfaces:
IFilterExit, ISeverityFilterExit, ITimeFilterExit
Direct Known Subclasses:
ApacheAccessLogFilterExit, ApacheErrorLogFilterExit, CommonBaseEventXMLLogFilterExit, JavaLoggingXMLLogFilterExit, WindowsEventLogFilterExit

public abstract class AbstractXPATHFilterExit
extends java.lang.Object
implements ISeverityFilterExit, ITimeFilterExit

This abstract class represents a Filter Exit class for filtering on the severity and timestamp of a log event using XPATH filtering of a CommonBaseEvent.

Since:
September 8, 2006
Provisional API: This API is subject to change in the next release.
since TPTP 4.3

Constructor Summary
AbstractXPATHFilterExit()
          AbstractXPATHFilterExit constructor
 
Method Summary
 boolean filter(java.lang.String record)
          Filter the data specified and return true if the data is to be included for parsing
protected  org.eclipse.hyades.logging.events.cbe.CommonBaseEvent getCommonBaseEvent()
          Return the CommonBaseEvent object that is used for filtering the log record
 java.lang.String getCurrentCreationTime()
          Get the creation time of the record that was parsed from the last record that was filtered.
 short getCurrentSeverity()
          Get the severity of the record that was parsed from the last record that was filtered.
 int getDay()
          Returns the day that is used to format the timestamp in the case where the record does not contain a day.
protected  java.lang.String getFilterSpecification()
          Return the filter specification
 java.util.Locale getLocale()
          Returns the Locale that is used for parsing the timestamp.
 int getMonth()
          Returns the month that is used to format the timestamp in the case where the record does not contain a month.
 java.lang.String getTimezone()
          Returns the timezone that is used to format the timestamp in the case where the record does not contain a timezone indicator.
 com.ibm.icu.util.ULocale getULocale()
          Returns the ULocale that is used for parsing the timestamp.
 int getYear()
          Returns the year that is used to format the timestamp in the case where the record does not contain a year.
protected  boolean isFilterOnCreationTime()
           
protected  boolean isFilterOnSeverity()
           
protected  void setCommonBaseEvent(java.lang.String record)
          Set the CommonBaseEvent that is used for filtering based on the log record.
 void setDay(int day)
          Set the day that is used to format the timestamp in the case where the record does not contain a day.
 void setFilterSpecification(java.lang.String filterSpec)
          Set the filter specification to be used when filtering.
 void setLocale(java.util.Locale locale)
          Set the Locale that is used for parsing the timestamp.
 void setMonth(int month)
          Set the month that is used to format the timestamp in the case where the record does not contain a month.
 void setTimezone(java.lang.String timezone)
          Set the timezone that is used to format the timestamp in the case where the record does not contain a timezone indicator.
 void setULocale(com.ibm.icu.util.ULocale ulocale)
          Set the ULocale that is used for parsing the timestamp.
 void setYear(int year)
          Set the year that is used to format the timestamp in the case where the record does not contain a year.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.util.ISeverityFilterExit
parseSeverity
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.util.ITimeFilterExit
parseTime
 

Constructor Detail

AbstractXPATHFilterExit

public AbstractXPATHFilterExit()
                        throws java.lang.InstantiationException
AbstractXPATHFilterExit constructor

Throws:
java.lang.InstantiationException - if an error occurs instantiating required objects.
Provisional API: This API is subject to change in the next release.
since TPTP 4.3
Method Detail

filter

public boolean filter(java.lang.String record)
Description copied from interface: IFilterExit
Filter the data specified and return true if the data is to be included for parsing

Specified by:
filter in interface IFilterExit
Parameters:
record - - the data to filter
Returns:
booean - true if the data is to be parsed, false if the data is to be excluded

getFilterSpecification

protected java.lang.String getFilterSpecification()
Return the filter specification

Returns:
String representing the filter specification.
Provisional API: This API is subject to change in the next release.
since TPTP 4.3

getCommonBaseEvent

protected org.eclipse.hyades.logging.events.cbe.CommonBaseEvent getCommonBaseEvent()
Return the CommonBaseEvent object that is used for filtering the log record

Returns:
CommonBaseEvent object that is used for filtering
Provisional API: This API is subject to change in the next release.
since TPTP 4.3

setCommonBaseEvent

protected void setCommonBaseEvent(java.lang.String record)
Set the CommonBaseEvent that is used for filtering based on the log record. This method can be overridden by subclasses to customize the CommonBaseEvent used for filtering, for example, to add other CommonBaseEvent properties to filter on.

Parameters:
record - String representing the log record to be filtered.
Provisional API: This API is subject to change in the next release.
since TPTP 4.3

getCurrentSeverity

public short getCurrentSeverity()
Get the severity of the record that was parsed from the last record that was filtered. Note, if the filter specification does not include severity the value returned will be zero.

Returns:
severity value parsed from the record when it was filtered.
Provisional API: This API is subject to change in the next release.
since TPTP 4.4

getCurrentCreationTime

public java.lang.String getCurrentCreationTime()
Get the creation time of the record that was parsed from the last record that was filtered. Note, if the filter specification does not include creation time the value returned will be null.

Returns:
creation time value parsed from the record when it was filtered.
Provisional API: This API is subject to change in the next release.
since TPTP 4.4

setFilterSpecification

public void setFilterSpecification(java.lang.String filterSpec)
                            throws InvalidFilterSpecification
Description copied from interface: IFilterExit
Set the filter specification to be used when filtering.

Specified by:
setFilterSpecification in interface IFilterExit
Parameters:
filterSpec - - the filter specification
Throws:
InvalidFilterSpecification - if the filter specification is invalid

getDay

public int getDay()
Description copied from interface: ITimeFilterExit
Returns the day that is used to format the timestamp in the case where the record does not contain a day.

Specified by:
getDay in interface ITimeFilterExit
Returns:
int value representing the day used for formatting

getLocale

public java.util.Locale getLocale()
Description copied from interface: ITimeFilterExit
Returns the Locale that is used for parsing the timestamp.

Specified by:
getLocale in interface ITimeFilterExit
Returns:
Locale value or null if it is not set

getMonth

public int getMonth()
Description copied from interface: ITimeFilterExit
Returns the month that is used to format the timestamp in the case where the record does not contain a month.

Specified by:
getMonth in interface ITimeFilterExit
Returns:
int value representing the month used for formatting

getTimezone

public java.lang.String getTimezone()
Description copied from interface: ITimeFilterExit
Returns the timezone that is used to format the timestamp in the case where the record does not contain a timezone indicator.

Specified by:
getTimezone in interface ITimeFilterExit
Returns:
String representing the timezone used for formatting

getULocale

public com.ibm.icu.util.ULocale getULocale()
Description copied from interface: ITimeFilterExit
Returns the ULocale that is used for parsing the timestamp.

Specified by:
getULocale in interface ITimeFilterExit
Returns:
ULocale value or null if it is not set

getYear

public int getYear()
Description copied from interface: ITimeFilterExit
Returns the year that is used to format the timestamp in the case where the record does not contain a year.

Specified by:
getYear in interface ITimeFilterExit
Returns:
int value representing the year used for formatting

setDay

public void setDay(int day)
Description copied from interface: ITimeFilterExit
Set the day that is used to format the timestamp in the case where the record does not contain a day.

Specified by:
setDay in interface ITimeFilterExit
Parameters:
day - int value representing the day to use for formatting

setLocale

public void setLocale(java.util.Locale locale)
Description copied from interface: ITimeFilterExit
Set the Locale that is used for parsing the timestamp.

Specified by:
setLocale in interface ITimeFilterExit
Parameters:
locale -

setMonth

public void setMonth(int month)
Description copied from interface: ITimeFilterExit
Set the month that is used to format the timestamp in the case where the record does not contain a month.

Specified by:
setMonth in interface ITimeFilterExit
Parameters:
month - int value representing the month to use for formatting

setTimezone

public void setTimezone(java.lang.String timezone)
Description copied from interface: ITimeFilterExit
Set the timezone that is used to format the timestamp in the case where the record does not contain a timezone indicator.

Specified by:
setTimezone in interface ITimeFilterExit
Parameters:
timezone - String representing the time zone to be used for formatting

setULocale

public void setULocale(com.ibm.icu.util.ULocale ulocale)
Description copied from interface: ITimeFilterExit
Set the ULocale that is used for parsing the timestamp.

Specified by:
setULocale in interface ITimeFilterExit
Parameters:
ulocale -

setYear

public void setYear(int year)
Description copied from interface: ITimeFilterExit
Set the year that is used to format the timestamp in the case where the record does not contain a year.

Specified by:
setYear in interface ITimeFilterExit
Parameters:
year - int value representing the year to use for formatting

isFilterOnSeverity

protected boolean isFilterOnSeverity()
Returns:
the filterOnSeverity

isFilterOnCreationTime

protected boolean isFilterOnCreationTime()
Returns:
the filterOnCreationTime

TPTP 4.4.0 Monitoring Tools Project
Public API Specification