OSID Logo
OSID Specifications
metering package
Version 3.1.0
Interfaceosid.metering.UtilityNotificationSession
Implementsosid.OsidSession
Used Byosid.metering.MeteringManager
osid.metering.MeteringProxyManager
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
Compliancemandatory This method must be implemented.
MethodregisterForNewUtilities
Description

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

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedUtilities
Description

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

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForDeletedUtilities
Description

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

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodacknowledgeUtilityNotification
Description

Acknowledge a utility notification.

Parametersosid.id.IdnotificationId the Id of the notification
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedUtilityHierarchy
Description

Registers for notification of an updated utility hierarchy structure. UtilityReceiver.changedChildOfUtilities() is invoked when a node experiences a change in its children.

ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedUtilityHierarchyForAncestors
Description

Registers for notification of an updated utility hierarchy structure. UtilityReceiver.changedChildOfUtilities() is invoked when a node experiences a change in its children.

Parametersosid.id.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodregisterForChangedUtilityHierarchyForDescendants
Description

Registers for notification of an updated utility hierarchy structure. UtilityReceiver.changedChildOfUtilities() is invoked when a node experiences a change in its children.

Parametersosid.id.IdutilityId the Id of the Utility node to monitor
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.