OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.UtilityNotificationSession
Implementsosid.OsidSession
Description

This session defines methods to receive notifications on adds/changes to Utility objects. 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.

Notifications are triggered with changes to the Utility object itself. Adding and removing entries result in notifications available from the notification session for meters.

MethodcanRegisterForUtilityNotifications
Description

Tests if this user can register for Utility 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.

Returnboolean false if notification methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodregisterForNewUtilities
Description

Register for notifications of new utilities. UtilityReceiver.newUtilities() is invoked when a new Utility is created.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewUtilityAncestors
Description

Registers for notification of an updated hierarchy structure that introduces a new ancestor of the specified utility. UtilityReceiver.newAncestorUtility() is invoked when the specified utility node gets a new ancestor.

Parametersosid.id.IdutilityIdthe Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewUtilityDescendants
Description

Registers for notification of an updated hierarchy structure that introduces a new descendant of the specified utility. UtilityReceiver.newDescendantUtility() is invoked when the specified utility node gets a new descendant.

Parametersosid.id.IdutilityIdthe Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedUtilities
Description

Registers for notification of updated utilities. UtilityReceiver.changedUtilities() is invoked when a utility is changed.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedUtility
Description

Registers for notification of an updated utility. UtilityReceiver.changedUtilities() is invoked when the specified utility is changed.

Parametersosid.id.IdutilityIdthe Id of the Utility to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedUtilities
Description

Registers for notification of deleted utilities. UtilityReceiver.deletedUtilities() is invoked when a utility is deleted.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedUtility
Description

Registers for notification of a deleted utility. UtilityReceiver.deletedUtilities() is invoked when the specified utility is deleted.

Parametersosid.id.IdutilityIdthe Id of the Utility to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedUtilityAncestors
Description

Registers for notification of an updated hierarchy structure that removes an ancestor of the specified utility. UtilityReceiver.deletedAncestor() is invoked when the specified utility node loses an ancestor.

Parametersosid.id.IdutilityIdthe Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedUtilityDescendants
Description

Registers for notification of an updated hierarchy structure that removes a descendant of the specified utility. UtilityReceiver.deletedDescendant() is invoked when the specified utility node loses a descendant.

Parametersosid.id.IdutilityIdthe Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.