OSID Logo
OSID Specifications
messaging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.messaging.MessageNotificationSession
Implementsosid.OsidSession
Description

This session defines methods to receive notifications on adds/changes to Message objects in this Mailbox. This also includes existing messages that may appear or disappear due to changes in the Mailbox hierarchy, This session is intended for consumers needing to synchronize their message 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 MessageLookupSession.

MethodgetMailboxId
Description

Gets the Mailbox Id associated with this session.

Returnosid.id.Idthe Mailbox Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetMailbox
Description

Gets the Mailbox associated with this session.

Returnosid.messaging.Mailboxthe Mailbox associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanRegisterForMessageNotifications
Description

Tests if this user can register for Message 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.

Returnboolean false if notification methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseFederatedMailboxView
Description

Federates the view for methods in this session. A federated view will include messages in mailboxes which are children of this mailbox in the mailbox hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedMailboxView
Description

Isolates the view for methods in this session. An isolated view restricts notifications to this mailbox only.

CompliancemandatoryThis method is must be implemented.
MethodregisterForNewMessages
Description

Register for notifications of new messages. MessageReceiver.newMessages() is invoked when a new Message is appears in this mailbox.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewMessagesFromSender
Description

Register for notifications of new messages from sender. MessageReceiver.newMessages() is invoked when a new Message is appears in this mailbox.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewMessagesForRecipient
Description

Register for notifications of new messages for a recipient. MessageReceiver.newMessages() is invoked when a new Message is appears in this mailbox.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedMessages
Description

Registers for notification of updated messages. MessageReceiver.changedMessages() is invoked when a message in this mailbox is changed.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedMessagesFromSender
Description

Register for notifications of updated messages from sender. MessageReceiver.updatedMessages() is invoked when a Message in this mailbox is changed.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedMessagesForRecipient
Description

Register for notifications of updated messages for a recipient. MessageReceiver.updatedMessages() is invoked when a Message in this mailbox is changed.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedMessage
Description

Registers for notification of an updated message. MessageReceiver.changedMessage() is invoked when the specified message in this mailbox is changed.

Parametersosid.id.IdmessageIdthe Id of the Message to monitor
ErrorsNULL_ARGUMENT messageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedMessages
Description

Registers for notification of deleted messages. MessageReceiver.deletedMessages() is invoked when a message is deleted or removed from this mailbox.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedMessagesFromSender
Description

Register for notifications of deleted messages from sender. MessageReceiver.deletedMessages() is invoked when a Message is deleted or removed from this mailbox.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedMessagesForRecipient
Description

Register for notifications of deleted messages for a recipient. MessageReceiver.deletedMessages() is invoked when a Message is deleted or removed from this mailbox.

Parametersosid.id.IdresourceIdthe Id of the Resource to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedMessage
Description

Registers for notification of a deleted message. MessageReceiver.deletedMessages() is invoked when the specified message is deleted or removed from this mailbox.

Parametersosid.id.IdmessageIdthe Id of the Message to monitor
ErrorsNULL_ARGUMENT messageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.