OSID Logo
OSID Specifications
metering package
Version 3.1.0
Interfaceosid.metering.MeterNotificationSession
Implementsosid.OsidSession
Used Byosid.metering.MeteringManager
osid.metering.MeteringProxyManager
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.Id the Utility Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetUtility
Description

Gets the Utility associated with this session.

Returnosid.metering.Utility the Utility associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethodregisterForNewMeters
Description

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

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

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

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

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

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

Acknowledge a meter 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.