|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.slee.usage.UsageThresholdFilter
public class UsageThresholdFilter
A notification filter that only allows through UsageNotifications where the
notification source usage parameter name match specified values, and the value of the
usage parameter has crossed a specified threshold (in either the positive or negative
direction).
Each time a usage notification is seen for the specified usage parameter, the current value of the usage parameter is stored. If the previous value and the current value lie on opposite sides of the threshold, the notification is passed to notification listeners. If the previous value was equal to the threshold value, the notification is only passed to notification listeners if the direction on the real axis from the previous value to the current value is the same as the approach made to the threshold value.
For example, if the threshold value is set to 10, and three usage notifications with the values 9, 10, and 9 respectively are generated by the SLEE, this notification filter would not pass any of the usage notifications to notification listeners as the threshold has not been crossed. However if three usage notifications with the values 9, 10, and 11 respectively are generated by the SLEE, this notification filter would pass only the last usage notification to notification listeners, as this represents the point when the threshold has been crossed.
In any other situation where the threshold value is not crossed, the notification is suppressed.
If the notification contains usage information for some other notification source or usage parameter, it is also suppressed.
Notifications that are not instances of UsageNotification are also suppressed
by this filter.
| Constructor Summary | |
|---|---|
UsageThresholdFilter(NotificationSource notificationSource,
java.lang.String paramName,
long threshold)
Create a UsageThresholdFilter. |
|
UsageThresholdFilter(ServiceID service,
SbbID sbb,
java.lang.String paramName,
long threshold)
Deprecated. Replaced with UsageThresholdFilter(NotificationSource, String, long)
as usage collecting has been expanded to include SLEE components other than SBBs. |
|
| Method Summary | |
|---|---|
boolean |
isNotificationEnabled(javax.management.Notification notification)
Determine whether the specified notification should be delivered to notification listeners using this notification filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UsageThresholdFilter(ServiceID service,
SbbID sbb,
java.lang.String paramName,
long threshold)
throws java.lang.NullPointerException
UsageThresholdFilter(NotificationSource, String, long)
as usage collecting has been expanded to include SLEE components other than SBBs.
UsageThresholdFilter. A filter created using this constructor will
only allow SLEE 1.0-compliant usage notifications to pass through where they otherwise
satisfy the filtering criteria.
service - the component identifier of the Service whose usage parameter
should be monitored.sbb - the component identifier of the SBB whose usage parameter should be
monitored.paramName - the name of a usage parameter defined by the SBB.threshold - the threshold value.
java.lang.NullPointerException - if service, sbb, or
paramName is null.
public UsageThresholdFilter(NotificationSource notificationSource,
java.lang.String paramName,
long threshold)
throws java.lang.NullPointerException
UsageThresholdFilter. A filter created using this constructor will
only allow SLEE 1.1-compliant usage notifications to pass through where they otherwise
satisfy the filtering criteria.
notificationSource - the notification source whose usage parameter should be
monitored.paramName - the name of a usage parameter defined by the SBB.threshold - the threshold value.
java.lang.NullPointerException - if notificationSource or paramName
is null.| Method Detail |
|---|
public boolean isNotificationEnabled(javax.management.Notification notification)
isNotificationEnabled in interface javax.management.NotificationFilternotification - the notification to be sent.
true if the notification should be delivered to notification
listeners, false otherwise. This method always returns
false if notification is not an instance of
UsageNotification.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||