Interface ResourceLocationNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to resources locations in this Map . 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeResourceLocationNotification(Id notificationId) Acknowledge a resource location notification.booleanTests if this user can register for notifications.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with this session.voidregisterForEnteredLocation(Id locationId) Register for notifications of an entered location.voidRegister for notifications of entered locations for a resource.voidregisterForEnteredLocationsForResource(Id resourceId) Register for notifications of entered locations.voidregisterForEnteredLocationsForResourcesByGenusType(Type resourceGenusType) Register for notifications of entered locations for the given resource genus type.voidregisterForExitedLocation(Id locationId) Register for notifications of an exited location.voidRegister for notifications of exited locations for a resource.voidregisterForExitedLocationsForResource(Id resourceId) Register for notifications of exited locations.voidregisterForExitedLocationsForResourcesByGenusType(Type resourceGenusType) Register for notifications of exited locations for the given resource genus type.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForResourceLocationNotifications
boolean canRegisterForResourceLocationNotifications()Tests if this user can register for 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 aPERMISSION_DENIED. This is intended as a hint to an application that may wish not to offer notification operations to unauthorized users.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedMapView
void useFederatedMapView()Federates the view for methods in this session. A federated view will include locations in maps which are children of this map in the map hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedMapView
void useIsolatedMapView()Isolates the view for methods in this session. An isolated view restricts notifications to this map only.- Compliance:
mandatory- This method is must be implemented.
-
reliableResourceLocationNotifications
void reliableResourceLocationNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeResourceLocationNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableResourceLocationNotifications
void unreliableResourceLocationNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeResourceLocationNotification
void acknowledgeResourceLocationNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a resource location notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForEnteredLocations
Register for notifications of entered locations for a resource.ResourceLocationReceiver.enteredLocation()is invoked when a resource appears in a new location.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForEnteredLocation
void registerForEnteredLocation(Id locationId) throws OperationFailedException, PermissionDeniedException Register for notifications of an entered location.ResourceLocationReceiver.enteredLocation()is invoked when a resource appears in the specified location.- Parameters:
locationId- theIdof theLocationto monitor- Throws:
NullArgumentException-locationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForEnteredLocationsForResource
void registerForEnteredLocationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of entered locations.ResourceLocationReceiver.enteredLocation()is invoked when the specified resource appears in a new location.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForEnteredLocationsForResourcesByGenusType
void registerForEnteredLocationsForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of entered locations for the given resource genus type.ResourceLocationReceiver.enteredLocation()is invoked when a resource appears in a new location.- Parameters:
resourceGenusType- the genus type of theResourceto monitor- Throws:
NullArgumentException-resourceGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForExitedLocations
Register for notifications of exited locations for a resource.ResourceLocationReceiver.exitedLocation()is invoked when a resource exits a location.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForExitedLocation
void registerForExitedLocation(Id locationId) throws OperationFailedException, PermissionDeniedException Register for notifications of an exited location.ResourceLocationReceiver.exitedLocation()is invoked when a resource exits the specified location.- Parameters:
locationId- theIdof theLocationto monitor- Throws:
NullArgumentException-locationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForExitedLocationsForResource
void registerForExitedLocationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of exited locations.ResourceLocationReceiver.exitedLocation()is invoked when the specified resource exits a location.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForExitedLocationsForResourcesByGenusType
void registerForExitedLocationsForResourcesByGenusType(Type resourceGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of exited locations for the given resource genus type.ResourceLocationReceiver.exitedLocation()is invoked when a resource exits a location.- Parameters:
resourceGenusType- the genus type of theResourceto monitor- Throws:
NullArgumentException-resourceGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-