Interface StatisticNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface StatisticNotificationSession extends OsidSession

This session defines methods to receive notifications on statistics. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.

  • Method Details

    • getUtilityId

      Id getUtilityId()
      Gets the Utility Id associated with this session.
      Returns:
      the Utility Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getUtility

      Gets the Utility associated with this session.
      Returns:
      the Utility associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForStatisticNotifications

      boolean canRegisterForStatisticNotifications()
      Tests if this user can register for Statistic notifications. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer notification operations.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedUtilityView

      void useFederatedUtilityView()
      Federates the view for methods in this session. A federated view will include statistics from parent utilities in the utility hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedUtilityView

      void useIsolatedUtilityView()
      Isolates the view for methods in this session. An isolated view restricts notifications for statistics to this utility only.
      Compliance:
      mandatory - This method is must be implemented.
    • registerForStatisticsExceedingSumThreshold

      void registerForStatisticsExceedingSumThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications sums exceeding a threshold. StatisticReceiver.exceededSumThreshold() is invoked when the sum exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingSumThreshold

      void registerForStatisticsFailingSumThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications sums failing a threshold. StatisticReceiver.failedSumThreshold() is invoked when the sum falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingMeanThreshold

      void registerForStatisticsExceedingMeanThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of means exceeding a threshold. StatisticReceiver.exceededMeanThreshold() is invoked when the mean exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingMeanThreshold

      void registerForStatisticsFailingMeanThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications means failing a threshold. StatisticReceiver.failedMeanThreshold() is invoked when the mean falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingMedianThreshold

      void registerForStatisticsExceedingMedianThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of medians exceeding a threshold. StatisticReceiver.exceededMeanThreshold() is invoked when the median exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingMedianThreshold

      void registerForStatisticsFailingMedianThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of medians failing a threshold. StatisticReceiver.failedMeanThreshold() is invoked when the median falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingRMSThreshold

      void registerForStatisticsExceedingRMSThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the root mean square exceeding a threshold. StatisticReceiver.exceededRMSThreshold() is invoked when the rms exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingRMSThreshold

      void registerForStatisticsFailingRMSThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the root mean square failing a threshold. StatisticReceiver.failedRMSThreshold() is invoked when the rms falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingDeltaThreshold

      void registerForStatisticsExceedingDeltaThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the delta exceeding a threshold. StatisticReceiver.exceededDeltaThreshold() is invoked when the delta exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingDeltaThreshold

      void registerForStatisticsFailingDeltaThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the delta failing a threshold. StatisticReceiver.failedDeltaThreshold() is invoked when the delta falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingPercentChangeThreshold

      void registerForStatisticsExceedingPercentChangeThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the percentage change exceeding a threshold. StatisticReceiver.exceededPercentChangeThreshold() is invoked when the change exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingPercentChangeThreshold

      void registerForStatisticsFailingPercentChangeThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the percentage change failing a threshold. StatisticReceiver.failedPercentChangeThreshold() is invoked when the change falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      Throws:
      NullArgumentException - meterId or units is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsExceedingAverageRateThreshold

      void registerForStatisticsExceedingAverageRateThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value, DateTimeResolution rateInterval) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the rate exceeding a threshold. StatisticReceiver.exceededAverageRateThreshold() is invoked when the average rate exceeds the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      rateInterval - the time interval of the rate
      Throws:
      NullArgumentException - meterId, units , or rateInterval is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForStatisticsFailingAverageRateThreshold

      void registerForStatisticsFailingAverageRateThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value, DateTimeResolution rateInterval) throws OperationFailedException, PermissionDeniedException
      Register for notifications of the rate failing a threshold. StatisticReceiver.failedAverageRateThreshold() is invoked when the average rate falls below the given value.
      Parameters:
      meterId - the meter Id
      interval - the time interval from the present
      units - the date time units
      value - the threshold value
      rateInterval - the time interval of the rate
      Throws:
      NullArgumentException - meterId, units , or rateInterval is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • acknowledgeStatisticNotification

      void acknowledgeStatisticNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a statistic notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.