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

This session defines methods to receive notifications on new or deleted meters. 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.

This session registers notifications for the Meter itself.

MethodgetUtilityId
Description

Gets the Utility Id associated with this session.

Returnosid.id.Idthe Utility Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetUtility
Description

Gets the Utility associated with this session.

Returnosid.metering.Utilitythe Utility associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanRegisterForMeterNotifications
Description

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

Federates the view for methods in this session. A federated view will include meters from parent utilities in the utility hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedUtilityView
Description

Isolates the view for methods in this session. An isolated view restricts notifications for meters to this utility only.

CompliancemandatoryThis method is must be implemented.
MethodregisterForNewMeters
Description

Register for notifications of new meters. MeterReceiver.newMeters() is invoked when a new Meter is created.

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

Register for notifications of new meters. MeterReceiver.changedMeters() is invoked when a Meter is changed.

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

Registers for notification of an updated meter. MeterReceiver.changedMeters() is invoked when the specified meter in this utility is changed.

Parametersosid.id.IdmeterIdthe Id of the Meter to monitor
ErrorsNULL_ARGUMENT meterId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedMeters
Description

Registers for notification of deleted meters. MeterReceiver.deletedMeters() is invoked when a meter is deleted.

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

Registers for notification of a deleted meter. MeterReceiver.deletedMeters() is invoked when the specified meter is deleted or removed from this utility.

Parametersosid.id.IdmeterIdthe Id of the Meter to monitor
ErrorsNULL_ARGUMENT meterId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.