| java.lang.Object org.apache.tomcat.util.modeler.BaseAttributeFilter
BaseAttributeFilter | public class BaseAttributeFilter implements NotificationFilter(Code) | | 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.
author: Craig R. McClanahan version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Constructor Summary | |
public | BaseAttributeFilter(String name) Construct a new filter that accepts only the specified attribute
name. |
Method Summary | |
public void | addAttribute(String name) Add a new attribute name to the set of names accepted by this filter. | public void | clear() Clear all accepted names from this filter, so that it will accept
all attribute names. | public String[] | getNames() Return the set of names that are accepted by this filter. | public boolean | isNotificationEnabled(Notification notification) Test whether notification enabled for this event. | public void | removeAttribute(String name) Remove an attribute name from the set of names accepted by this
filter. |
BaseAttributeFilter | public BaseAttributeFilter(String name)(Code) | | Construct a new filter that accepts only the specified attribute
name.
Parameters: name - Name of the attribute to be accepted by this filter, ornull to accept all attribute names |
addAttribute | public void addAttribute(String name)(Code) | | 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()(Code) | | Clear all accepted names from this filter, so that it will accept
all attribute names.
|
getNames | public String[] getNames()(Code) | | 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)(Code) | | Test whether notification enabled for this event.
Return true if:
- This is an attribute change notification
- Either the set of accepted names is empty (implying that all
attribute names are of interest) or the set of accepted names
includes the name of the attribute in this notification
|
removeAttribute | public void removeAttribute(String name)(Code) | | Remove an attribute name from the set of names accepted by this
filter.
Parameters: name - Name of the attribute to be removed |
|
|