public interface LocationNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Location
objects in this Map.
This also
includes existing locations that may appear or disappear due to changes in
the Location
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
LocationLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeLocationNotification(Id notificationId)
Acknowledge a location notification.
|
boolean |
canRegisterForLocationNotifications()
Tests if this user can register for
Location
notifications. |
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
void |
registerForChangedLocation(Id locationId)
Registers for notification of an updated location.
|
void |
registerForChangedLocationHierarchy()
Registers for notification of an updated location hierarchy structure.
|
void |
registerForChangedLocationHierarchyForAncestors(Id locationId)
Registers for notification of an updated location hierarchy structure.
|
void |
registerForChangedLocationHierarchyForDescendants(Id locationId)
Registers for notification of an updated location hierarchy structure.
|
void |
registerForChangedLocations()
Registers for notification of updated locations.
|
void |
registerForDeletedLocation(Id locationId)
Registers for notification of a deleted location.
|
void |
registerForDeletedLocations()
Registers for notification of deleted locations.
|
void |
registerForNewLocations()
Register for notifications of new locations.
|
void |
reliableLocationNotifications()
Reliable notifications are desired.
|
void |
unreliableLocationNotifications()
Unreliable notifications are desired.
|
void |
useFederatedMapView()
Federates the view for methods in this session.
|
void |
useIsolatedMapView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getMapId()
Map
Id
associated with this
session. Map Id
associated with this sessionmandatory
- This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForLocationNotifications()
Location
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 useFederatedMapView()
mandatory
- This method is must be implemented. void useIsolatedMapView()
mandatory
- This method is must be implemented. void reliableLocationNotifications()
acknowledgeLocationNotification()
.mandatory
- This method is must be implemented. void unreliableLocationNotifications()
mandatory
- This method is must be implemented. void acknowledgeLocationNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewLocations() throws OperationFailedException, PermissionDeniedException
LocationReceiver.newLocations()
is invoked when a new
Location
appears in this map.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocations() throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedLocations()
is invoked when a location
in this map is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedLocations()
is invoked when the
specified location in this map is changed.locationId
- the Id
of the Location
to monitorNullArgumentException
- locationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLocations() throws OperationFailedException, PermissionDeniedException
LocationReceiver.deletedLocations()
is invoked when a location
is deleted or removed from this map.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLocation(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.deletedLocations()
is invoked when the
specified location is deleted or removed from this map.locationId
- the Id
of the Location
to monitorNullArgumentException
- locationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocationHierarchy() throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedChildOfLocations()
is invoked
when a node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocationHierarchyForAncestors(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedChildOfLocations()
is invoked
when the specified node or any of its ancestors experiences a change
in its children.locationId
- the Id
of the Location
node to monitorNullArgumentException
- locationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocationHierarchyForDescendants(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedChildOfLocations()
is invoked
when the specified node or any of its descendants experiences a change
in its children.locationId
- the Id
of the Location
node to monitorNullArgumentException
- locationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.