public interface DeviceNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Device
objects in this System.
This also
includes existing devices that may appear or disappear due to changes in
the System
hierarchy, 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.
The two views defined in this session correspond to the views in the
DeviceLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeDeviceNotification(Id notificationId)
Acknowledge a device notification.
|
boolean |
canRegisterForDeviceNotifications()
Tests if this user can register for
Device
notifications. |
System |
getSystem()
Gets the
System associated with this session. |
Id |
getSystemId()
Gets the
System Id associated with this
session. |
void |
registerForChangedDevice(Id deviceId)
Registers for notification of an updated device.
|
void |
registerForChangedDevices()
Registers for notification of updated devices.
|
void |
registerForDeletedDevice(Id deviceId)
Registers for notification of a deleted device.
|
void |
registerForDeletedDevices()
Registers for notification of deleted devices.
|
void |
registerForNewDevices()
Register for notifications of new devices.
|
void |
reliableDeviceNotifications()
Reliable notifications are desired.
|
void |
unreliableDeviceNotifications()
Unreliable notifications are desired.
|
void |
useFederatedSystemView()
Federates the view for methods in this session.
|
void |
useIsolatedSystemView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSystemId()
System
Id
associated with this
session. System Id
associated with this sessionmandatory
- This method must be implemented. System getSystem() throws OperationFailedException, PermissionDeniedException
System
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForDeviceNotifications()
Device
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 useFederatedSystemView()
mandatory
- This method is must be implemented. void useIsolatedSystemView()
mandatory
- This method is must be implemented. void reliableDeviceNotifications()
acknowledgeDeviceNotification()
.mandatory
- This method is must be implemented. void unreliableDeviceNotifications()
mandatory
- This method is must be implemented. void acknowledgeDeviceNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewDevices() throws OperationFailedException, PermissionDeniedException
DeviceReceiver.newDevices()
is invoked when a new
Device
appears in this system.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDevices() throws OperationFailedException, PermissionDeniedException
DeviceReceiver.changedDevices()
is invoked when a device in
this system is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
DeviceReceiver.changedDevices()
is invoked when the specified
device in this system is changed.deviceId
- the Id
of the Device
to
monitorNullArgumentException
- deviceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDevices() throws OperationFailedException, PermissionDeniedException
DeviceReceiver.deletedDevices()
is invoked when a device is
deleted or removed from this system.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
DeviceReceiver.deletedDevices()
is invoked when the specified
device is deleted or removed from this system.deviceId
- the Id
of the Device
to
monitorNullArgumentException
- deviceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.