Package org.apache.tomcat.util.modeler
Class BaseAttributeFilter
- java.lang.Object
- 
- org.apache.tomcat.util.modeler.BaseAttributeFilter
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- javax.management.NotificationFilter
 
 public class BaseAttributeFilter extends java.lang.Object implements javax.management.NotificationFilterImplementation of NotificationFilterfor attribute change notifications. This class is used byBaseModelMBeanto construct attribute change notification event filters when a filter is not supplied by the application.- Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description BaseAttributeFilter(java.lang.String name)Construct a new filter that accepts only the specified attribute name.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(java.lang.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.java.lang.String[]getNames()Return the set of names that are accepted by this filter.booleanisNotificationEnabled(javax.management.Notification notification)Test whether notification enabled for this event.voidremoveAttribute(java.lang.String name)Remove an attribute name from the set of names accepted by this filter.
 
- 
- 
- 
Method Detail- 
addAttributepublic void addAttribute(java.lang.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
 
 - 
clearpublic void clear() Clear all accepted names from this filter, so that it will accept all attribute names.
 - 
getNamespublic java.lang.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.- Returns:
- the array of names
 
 - 
isNotificationEnabledpublic boolean isNotificationEnabled(javax.management.Notification notification) 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
 - Specified by:
- isNotificationEnabledin interface- javax.management.NotificationFilter
 
 - 
removeAttributepublic void removeAttribute(java.lang.String name) Remove an attribute name from the set of names accepted by this filter.- Parameters:
- name- Name of the attribute to be removed
 
 
- 
 
-