org.apache.tomcat.util.modeler

Class BaseAttributeFilter

public class BaseAttributeFilter extends Object implements NotificationFilter

Implementation of NotificationFilter for attribute change notifications. This class is used by BaseModelMBean to construct attribute change notification event filters when a filter is not supplied by the application.

Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Craig R. McClanahan

Constructor Summary
BaseAttributeFilter(String name)
Construct a new filter that accepts only the specified attribute name.
Method Summary
voidaddAttribute(String name)
Add a new attribute name to the set of names accepted by this filter.
voidclear()
Clear all accepted names from this filter, so that it will accept all attribute names.
String[]getNames()
Return the set of names that are accepted by this filter.
booleanisNotificationEnabled(Notification notification)

Test whether notification enabled for this event.

voidremoveAttribute(String name)
Remove an attribute name from the set of names accepted by this filter.

Constructor Detail

BaseAttributeFilter

public BaseAttributeFilter(String name)
Construct a new filter that accepts only the specified attribute name.

Parameters: name Name of the attribute to be accepted by this filter, or null to accept all attribute names

Method Detail

addAttribute

public void addAttribute(String name)
Add a new attribute name to the set of names accepted by this filter.

Parameters: name Name of the attribute to be accepted

clear

public void clear()
Clear all accepted names from this filter, so that it will accept all attribute names.

getNames

public String[] getNames()
Return the set of names that are accepted by this filter. If this filter accepts all attribute names, a zero length array will be returned.

isNotificationEnabled

public boolean isNotificationEnabled(Notification notification)

Test whether notification enabled for this event. Return true if:

removeAttribute

public void removeAttribute(String name)
Remove an attribute name from the set of names accepted by this filter.

Parameters: name Name of the attribute to be removed

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.