public interface MeterNotificationSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForMeterNotifications()
Tests if this user can register for
Meter
notifications. |
Utility |
getUtility()
Gets the
Utility associated with this session. |
Id |
getUtilityId()
Gets the
Utility Id associated with this
session. |
void |
registerForChangedMeter(Id meterId)
Registers for notification of an updated meter.
|
void |
registerForChangedMeters()
Register for notifications of new meters.
|
void |
registerForDeletedMeter(Id meterId)
Registers for notification of a deleted meter.
|
void |
registerForDeletedMeters()
Registers for notification of deleted meters.
|
void |
registerForNewMeters()
Register for notifications of new meters.
|
void |
useFederatedUtilityView()
Federates the view for methods in this session.
|
void |
useIsolatedUtilityView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getUtilityId()
Utility
Id
associated with this
session. Utility Id
associated with this sessionmandatory
- This method must be implemented. Utility getUtility() throws OperationFailedException, PermissionDeniedException
Utility
associated with this session. Utility
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForMeterNotifications()
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedUtilityView()
mandatory
- This method is must be implemented. void useIsolatedUtilityView()
mandatory
- This method is must be implemented. void registerForNewMeters() throws OperationFailedException, PermissionDeniedException
MeterReceiver.newMeters()
is invoked when a new Meter
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMeters() throws OperationFailedException, PermissionDeniedException
MeterReceiver.changedMeters()
is invoked when a Meter
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMeter(Id meterId) throws OperationFailedException, PermissionDeniedException
MeterReceiver.changedMeters()
is invoked when the specified
meter in this utility is changed.meterId
- the Id
of the Meter
to
monitorNullArgumentException
- meterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMeters() throws OperationFailedException, PermissionDeniedException
MeterReceiver.deletedMeters()
is invoked when a meter is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMeter(Id meterId) throws OperationFailedException, PermissionDeniedException
MeterReceiver.deletedMeters()
is invoked when the specified
meter is deleted or removed from this utility.meterId
- the Id
of the Meter
to
monitorNullArgumentException
- meterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.