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 |
---|---|
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 |
registerForChangedLocations()
Registers for notification of updated locations.
|
void |
registerForDeletedLocation(Id locationId)
Registers for notification of a deleted location.
|
void |
registerForDeletedLocationAncestors(Id locationId)
Registers for notification if an ancestor is removed from the
specified location in the location hierarchy.
|
void |
registerForDeletedLocationDescendants(Id locationId)
Registers for notification if a descendant is removed from fthe
specified location in the location hierarchy.
|
void |
registerForDeletedLocations()
Registers for notification of deleted locations.
|
void |
registerForNewLocationAncestors(Id locationId)
Registers for notification if an ancestor is added to the specified
location in the location hierarchy.
|
void |
registerForNewLocationDescendants(Id locationId)
Registers for notification if a descendant is added to the specified
location in the location hierarchy.
|
void |
registerForNewLocations()
Register for notifications of new locations.
|
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 registerForNewLocations() throws OperationFailedException, PermissionDeniedException
LocationReceiver.newLocation()
is invoked when a new
Location
appears in this map.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewLocationAncestors(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.newLocationAncestor()
is invoked when the
specified location experiences an addition in ancestry.locationId
- the Id
of the location to monitorNullArgumentException
- locationId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewLocationDescendants(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.newLocationDescendant()
is invoked when the
specified location experiences an addition in descendants.locationId
- the Id
of the location to monitorNullArgumentException
- locationId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLocations() throws OperationFailedException, PermissionDeniedException
LocationReceiver.changedLocation()
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.changedLocation()
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.deletedLocation()
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.deletedLocation()
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 registerForDeletedLocationAncestors(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.deletedLocationAncestor()
is invoked when the
specified location experiences a removal of an ancestor.locationId
- the Id
of the location to monitorNullArgumentException
- locationId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLocationDescendants(Id locationId) throws OperationFailedException, PermissionDeniedException
LocationReceiver.deletedLocationDescednant()
is invoked when
the specified location experiences a removal of one of its
descdendents.locationId
- the Id
of the location to monitorNullArgumentException
- locationId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.