|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.slee.usage.UsageThresholdFilter
A notification filter that only allows through UsageNotification
s where the
Service component identifier, SBB component identifier, and the 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 Service, SBB, or usage parameter, it is also suppressed.
Notifications that are not instances of UsageNotification
are also suppressed
by this filter.
Constructor Summary | |
UsageThresholdFilter(ServiceID service,
SbbID sbb,
java.lang.String paramName,
long threshold)
Create a UsageThresholdFilter . |
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
.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
.Method Detail |
public boolean isNotificationEnabled(javax.management.Notification notification)
isNotificationEnabled
in interface javax.management.NotificationFilter
notification
- 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |