Interface StatisticNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionvoidacknowledgeStatisticNotification(Id notificationId) Acknowledge a statistic notification.booleanTests if this user can register forStatisticnotifications.Gets theUtilityassociated with this session.Gets theUtilityIdassociated with this session.voidregisterForStatisticsExceedingAverageRateThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value, DateTimeResolution rateInterval) Register for notifications of the rate exceeding a threshold.voidregisterForStatisticsExceedingDeltaThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the delta exceeding a threshold.voidregisterForStatisticsExceedingMeanThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of means exceeding a threshold.voidregisterForStatisticsExceedingMedianThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of medians exceeding a threshold.voidregisterForStatisticsExceedingPercentChangeThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the percentage change exceeding a threshold.voidregisterForStatisticsExceedingRMSThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the root mean square exceeding a threshold.voidregisterForStatisticsExceedingSumThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications sums exceeding a threshold.voidregisterForStatisticsFailingAverageRateThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value, DateTimeResolution rateInterval) Register for notifications of the rate failing a threshold.voidregisterForStatisticsFailingDeltaThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the delta failing a threshold.voidregisterForStatisticsFailingMeanThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications means failing a threshold.voidregisterForStatisticsFailingMedianThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of medians failing a threshold.voidregisterForStatisticsFailingPercentChangeThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the percentage change failing a threshold.voidregisterForStatisticsFailingRMSThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications of the root mean square failing a threshold.voidregisterForStatisticsFailingSumThreshold(Id meterId, long interval, DateTimeResolution units, BigDecimal value) Register for notifications sums failing a threshold.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getUtilityId
Id getUtilityId()Gets theUtilityIdassociated with this session.- Returns:
- the
Utility Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getUtility
Gets theUtilityassociated with this session.- Returns:
- the
Utilityassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForStatisticNotifications
boolean canRegisterForStatisticNotifications()Tests if this user can register forStatisticnotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterId or unitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterIdorunitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold value- Throws:
NullArgumentException-meterId or unitsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold valuerateInterval- the time interval of the rate- Throws:
NullArgumentException-meterId, units, orrateIntervalisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 meterIdinterval- the time interval from the presentunits- the date time unitsvalue- the threshold valuerateInterval- the time interval of the rate- Throws:
NullArgumentException-meterId, units, orrateIntervalisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
acknowledgeStatisticNotification
void acknowledgeStatisticNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a statistic notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-