FileDocCategorySizeDatePackage
MailFilter.javaAPI DocGlassfish v2 API3646Fri May 04 22:32:52 BST 2007com.sun.appserv.management.alert

MailFilter

public class MailFilter extends Object implements NotificationFilter
Class MailFilter by default filters out Warning messages.
AUTHOR:
Hemanth Puttaswamy

Fields Summary
private static String
WARNING_LOG
private boolean
filterWarningMessages
Constructors Summary
public MailFilter()
Zero arg constructor used by Alert Configuration Framework.


                 
       
        filterWarningMessages = true;
    
Methods Summary
booleangetFilterWarningMessages()

        return filterWarningMessages;
    
public booleanisNotificationEnabled(javax.management.Notification notification)
Implementation of javax.management.NotificationFilter method. Checks to see if WarningLogMessages need to be filtered or not.

        if( !filterWarningMessages ) return true;
        return !notification.getType().equals( WARNING_LOG );
    
public voidsetFilterWarningMessages(boolean filter)
By Default Warning Log Messages are filtered out. If user is interested, filterWarningMessages can be set to false.

        filterWarningMessages = filter;
    
public voidsetUnitTestData(java.lang.String unitTestData)
These are Unit Test Method provided for internal testing only.

        new UnitTest(
            UnitTest.UNIT_TEST_MAIL_FILTER, unitTestData, this ).start();