Interface ReceiptNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on new and
changed Receipts in this Mailbox . This also includes
existing receipts that may appear or disappear due to changes in the
Mailbox hierarchy, This session is intended for consumers needing
to synchronize their receipts 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
ReceiptLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeReceiptNotification(Id notificationId) Acknowledge a receipt notification.booleanTests if this user can register forReceiptnotifications.Gets theMailboxassociated with this session.Gets theMailboxIdassociated with this session.voidregisterForChangedReceipt(Id receiptId) Registers for notification of an updated receipt.voidRegisters for notification of updated receipts.voidregisterForChangedReceiptsByRecipient(Id recipientId) Register for notifications of updated receipts for the specified recipient.voidregisterForChangedReceiptsForMessage(Id messageId) Register for notifications of updated receipts for the specified message.voidregisterForDeletedReceipt(Id receiptId) Registers for notification of a deleted receipt.voidRegisters for notification of receipts whose messages have been deleted or removed from this mailbox.voidregisterForDeletedReceiptsByRecipient(Id recipientId) Register for notifications of deleted receipts for the specified recipient.voidregisterForDeletedReceiptsForMessage(Id messageId) Register for notifications of deleted receipts for the specified message.voidRegister for notifications of new receipts.voidregisterForNewReceiptsByRecipient(Id recipientId) Register for notifications of new receipts for the specified recipient.voidregisterForNewReceiptsForMessage(Id messageId) Register for notifications of new receipts for the specified message.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
-
getMailboxId
Id getMailboxId()Gets theMailboxIdassociated with this session.- Returns:
- the
Mailbox Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMailbox
Gets theMailboxassociated with this session.- Returns:
- the
Mailboxassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForReceiptNotifications
boolean canRegisterForReceiptNotifications()Tests if this user can register forReceiptnotifications. 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.
-
useFederatedMailboxView
void useFederatedMailboxView()Federates the view for methods in this session. A federated view will include receipts in mailboxes which are children of this mailbox in the mailbox hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedMailboxView
void useIsolatedMailboxView()Isolates the view for methods in this session. An isolated view restricts notifications to this mailbox only.- Compliance:
mandatory- This method is must be implemented.
-
reliableReceiptNotifications
void reliableReceiptNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeReceiptNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableReceiptNotifications
void unreliableReceiptNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeReceiptNotification
void acknowledgeReceiptNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a receipt notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewReceipts
Register for notifications of new receipts.ReceiptReceiver.newReceipts()is invoked when a newReceiptis appears in this mailbox.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewReceiptsForMessage
void registerForNewReceiptsForMessage(Id messageId) throws OperationFailedException, PermissionDeniedException Register for notifications of new receipts for the specified message.ReceiptReceiver.newReceipts()is invoked when a newReceiptis appears in this mailbox.- Parameters:
messageId- theIdof theMessageto monitor- Throws:
NullArgumentException-messageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewReceiptsByRecipient
void registerForNewReceiptsByRecipient(Id recipientId) throws OperationFailedException, PermissionDeniedException Register for notifications of new receipts for the specified recipient.ReceiptReceiver.newReceipst()is invoked when a newReceiptis appears in this mailbox.- Parameters:
recipientId- theIdof theResourceto monitor- Throws:
NullArgumentException-recipientIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReceipts
Registers for notification of updated receipts.ReceiptReceiver.changedReceipts()is invoked when a receipt in this mailbox is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReceiptsForMessage
void registerForChangedReceiptsForMessage(Id messageId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated receipts for the specified message.ReceiptReceiver.changedReceipts()is invoked when aReceiptin this mailbox is changed.- Parameters:
messageId- theIdof theMessageto monitor- Throws:
NullArgumentException-messageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReceiptsByRecipient
void registerForChangedReceiptsByRecipient(Id recipientId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated receipts for the specified recipient.ReceiptReceiver.changedReceipts()is invoked when aReceiptin this mailbox is changed.- Parameters:
recipientId- theIdof theResourceto monitor- Throws:
NullArgumentException-recipientIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReceipt
void registerForChangedReceipt(Id receiptId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated receipt.ReceiptReceiver.changedReceipt()is invoked when the specified receipt in this mailbox is changed.- Parameters:
receiptId- theIdof theReceiptto monitor- Throws:
NullArgumentException-receiptIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReceipts
Registers for notification of receipts whose messages have been deleted or removed from this mailbox.ReceiptReceiver.deletedReceipts()is invoked when a receipt is deleted or removed from this mailbox.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReceiptsForMessage
void registerForDeletedReceiptsForMessage(Id messageId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted receipts for the specified message.ReceiptReceiver.deletedReceipts()is invoked when aReceiptin this mailbox is removed.- Parameters:
messageId- theIdof theMessageto monitor- Throws:
NullArgumentException-messageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReceiptsByRecipient
void registerForDeletedReceiptsByRecipient(Id recipientId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted receipts for the specified recipient.ReceiptReceiver.deletedReceipts()is invoked when aReceiptin this mailbox is removed.- Parameters:
recipientId- theIdof theResourceto monitor- Throws:
NullArgumentException-recipientIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReceipt
void registerForDeletedReceipt(Id receiptId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted receipt.MessageReceiver.deletedReceipts()is invoked when the specified receipt is deleted or removed from this mailbox.- Parameters:
receiptId- theIdof theReceiptto monitor- Throws:
NullArgumentException-receiptIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-