Interface DirectionNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Direction objects in this Cookbook . 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
DirectionLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeDirectionNotification(Id notificationId) Acknowledge a direction notification.booleanTests if this user can register forDirectionnotifications.Gets theCookbookassociated with this session.Gets theCookbookIdassociated with this session.voidregisterForChangedDirection(Id directionId) Registers for notification of an updated direction.voidRegisters for notification of updated directions.voidregisterForChangedDirectionsForRecipe(Id recipeId) Registers for notification of updated directions related to the given recipe.voidregisterForDeletedDirection(Id directionId) Registers for notification of a deleted direction.voidRegisters for notification of deleted directions.voidregisterForDeletedDirectionsForRecipe(Id recipeId) Registers for notification of deleted direction for a recipe.voidRegister for notifications of new directions.voidregisterForNewDirectionsForRecipe(Id recipeId) Register for notifications of new directions related to the given recipe.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
-
getCookbookId
Id getCookbookId()Gets theCookbookIdassociated with this session.- Returns:
- the
Cookbook Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCookbook
Gets theCookbookassociated with this session.- Returns:
- the cookbook
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForDirectionNotifications
boolean canRegisterForDirectionNotifications()Tests if this user can register forDirectionnotifications. 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 opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedCookbookView
void useFederatedCookbookView()Federates the view for methods in this session. A federated view will include directions in cookbooks which are children of this cookbook in the cookbook hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCookbookView
void useIsolatedCookbookView()Isolates the view for methods in this session. An isolated view restricts notifications to this cookbook only.- Compliance:
mandatory- This method is must be implemented.
-
reliableDirectionNotifications
void reliableDirectionNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeDirectionNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableDirectionNotifications
void unreliableDirectionNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeDirectionNotification
void acknowledgeDirectionNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a direction notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewDirections
Register for notifications of new directions.DirectionReceiver.newDirections()is invoked when a newDirectionappears in this cookbook.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewDirectionsForRecipe
void registerForNewDirectionsForRecipe(Id recipeId) throws OperationFailedException, PermissionDeniedException Register for notifications of new directions related to the given recipe.DirectionReceiver.newDirections()is invoked when a newDirectionappears in this cookbook.- Parameters:
recipeId- theIdof theRecipeto monitor- Throws:
NullArgumentException-recipeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedDirections
Registers for notification of updated directions.DirectionReceiver.changedDirections()is invoked when a direction in this cookbook is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedDirectionsForRecipe
void registerForChangedDirectionsForRecipe(Id recipeId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated directions related to the given recipe.DirectionReceiver.changedDirections()is invoked when a direction related to the recipe in this cookbook is changed.- Parameters:
recipeId- theIdof theRecipeto monitor- Throws:
NullArgumentException-recipeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedDirection
void registerForChangedDirection(Id directionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Registers for notification of an updated direction.DirectionReceiver.changedDirections()is invoked when the specified direction in this cookbook is changed.- Parameters:
directionId- theIdof theDirectionto monitor- Throws:
NotFoundException- a direction was not found in this cookbook identified by the givenIdNullArgumentException-directionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedDirections
Registers for notification of deleted directions.DirectionReceiver.deletedDirection()is invoked when a direction is deleted or removed from this cookbook.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedDirectionsForRecipe
void registerForDeletedDirectionsForRecipe(Id recipeId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted direction for a recipe.DirectionReceiver.deletedDirections()is invoked when the related direction is deleted or removed from this cookbook.- Parameters:
recipeId- theIdof theRecipeto monitor- Throws:
NullArgumentException-recipeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedDirection
void registerForDeletedDirection(Id directionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Registers for notification of a deleted direction.DirectionReceiver.deletedDirections()is invoked when the specified direction is deleted or removed from this cookbook.- Parameters:
directionId- theIdof theDirectionto monitor- Throws:
NotFoundException- a direction was not found identified by the givenIdNullArgumentException-directionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-