|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationFilterSupport
public class NotificationFilterSupport
Performs filtering of Notification
s
based on a list of type prefixes. The type of a notification
is compared with each member of the list using
String.startsWith(String)
and, if one matches,
the notification is allowed to pass through the filter.
Matching on the beginning of the string is used in
preference to wildcards, so type.*
will
match only notifications with a type beginning with
code>type.*, not type.
as
expected.
Constructor Summary | |
---|---|
NotificationFilterSupport()
|
Method Summary | |
---|---|
void |
disableAllTypes()
Blocks all types by emptying the list of enabled attributes. |
void |
disableType(String prefix)
Removes the specified type prefix from the list of enabled types, thus preventing matching types from passing through the filter. |
void |
enableType(String prefix)
Adds the specified type prefix to the list of enabled types, thus allowing types starting with this string to pass through the filter. |
Vector<String> |
getEnabledTypes()
Returns the list of enabled types for this filter. |
boolean |
isNotificationEnabled(Notification notif)
Returns true if the type of the specified notification begins with one of the enabled type prefixes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotificationFilterSupport()
Method Detail |
---|
public void disableAllTypes()
public void disableType(String prefix)
prefix
- the prefix to disable.public void enableType(String prefix)
prefix
- the prefix to enable.
IllegalArgumentException
- if prefix
is null
.public Vector<String> getEnabledTypes()
public boolean isNotificationEnabled(Notification notif)
isNotificationEnabled
in interface NotificationFilter
notif
- the notification being filtered.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |