javax.slee.usage
Class UsageOutOfRangeFilter

java.lang.Object
  extended by javax.slee.usage.UsageOutOfRangeFilter
All Implemented Interfaces:
java.io.Serializable, javax.management.NotificationFilter

public class UsageOutOfRangeFilter
extends java.lang.Object
implements javax.management.NotificationFilter

A notification filter that only allows through UsageNotifications where the notification source and usage parameter name match specified values, and the value of the usage parameter contained in the notification falls outside a specified range.

If the notification contains usage information for some other notification source or usage parameter, or the value of the usage parameter falls within the specified range, the notification is suppressed.

Notifications that are not instances of UsageNotification are suppressed by this filter.

See Also:
Serialized Form

Constructor Summary
UsageOutOfRangeFilter(NotificationSource notificationSource, java.lang.String paramName, long lowValue, long highValue)
          Create a UsageOutOfRangeFilter.
UsageOutOfRangeFilter(ServiceID service, SbbID sbb, java.lang.String paramName, long lowValue, long highValue)
          Deprecated. Replaced with UsageOutOfRangeFilter(NotificationSource, String, long, 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

UsageOutOfRangeFilter

public UsageOutOfRangeFilter(ServiceID service,
                             SbbID sbb,
                             java.lang.String paramName,
                             long lowValue,
                             long highValue)
                      throws java.lang.NullPointerException,
                             InvalidArgumentException
Deprecated. Replaced with UsageOutOfRangeFilter(NotificationSource, String, long, long) as usage collecting has been expanded to include SLEE components other than SBBs.

Create a UsageOutOfRangeFilter. 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.

Parameters:
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.
lowValue - the lower bound of the range. Notifications are allowed through this filter if the value of the specified usage parameter is less than this value.
highValue - the upper bound of the range. Notifications are allowed through this filter if the value of the specified usage parameter is greater than this value.
Throws:
java.lang.NullPointerException - if service, sbb, or paramName is null.
InvalidArgumentException - if highValue < lowValue.

UsageOutOfRangeFilter

public UsageOutOfRangeFilter(NotificationSource notificationSource,
                             java.lang.String paramName,
                             long lowValue,
                             long highValue)
                      throws java.lang.NullPointerException,
                             InvalidArgumentException
Create a UsageOutOfRangeFilter. 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.

Parameters:
notificationSource - the notification source whose usage parameter should be monitored.
paramName - the name of a usage parameter defined by the SBB.
lowValue - the lower bound of the range. Notifications are allowed through this filter if the value of the specified usage parameter is less than this value.
highValue - the upper bound of the range. Notifications are allowed through this filter if the value of the specified usage parameter is greater than this value.
Throws:
java.lang.NullPointerException - if notificationSource or paramName is null.
InvalidArgumentException - if highValue < lowValue.
Method Detail

isNotificationEnabled

public boolean isNotificationEnabled(javax.management.Notification notification)
Determine whether the specified notification should be delivered to notification listeners using this notification filter.

Specified by:
isNotificationEnabled in interface javax.management.NotificationFilter
Parameters:
notification - the notification to be sent.
Returns:
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.


Copyright © 2008. All Rights Reserved.