public interface MessageNotificationSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForMessageNotifications()
Tests if this user can register for
Message
notifications. |
Mailbox |
getMailbox()
Gets the
Mailbox associated with this session. |
Id |
getMailboxId()
Gets the
Mailbox Id associated with this
session. |
void |
registerForChangedMessage(Id messageId)
Registers for notification of an updated message.
|
void |
registerForChangedMessages()
Registers for notification of updated messages.
|
void |
registerForChangedMessagesForRecipient(Id resourceId)
Register for notifications of updated messages for a recipient.
|
void |
registerForChangedMessagesFromSender(Id resourceId)
Register for notifications of updated messages from sender.
|
void |
registerForDeletedMessage(Id messageId)
Registers for notification of a deleted message.
|
void |
registerForDeletedMessages()
Registers for notification of deleted messages.
|
void |
registerForDeletedMessagesForRecipient(Id resourceId)
Register for notifications of deleted messages for a recipient.
|
void |
registerForDeletedMessagesFromSender(Id resourceId)
Register for notifications of deleted messages from sender.
|
void |
registerForNewMessages()
Register for notifications of new messages.
|
void |
registerForNewMessagesForRecipient(Id resourceId)
Register for notifications of new messages for a recipient.
|
void |
registerForNewMessagesFromSender(Id resourceId)
Register for notifications of new messages from sender.
|
void |
useFederatedMailboxView()
Federates the view for methods in this session.
|
void |
useIsolatedMailboxView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getMailboxId()
Mailbox
Id
associated with this
session. Mailbox Id
associated with this sessionmandatory
- This method must be implemented. Mailbox getMailbox() throws OperationFailedException, PermissionDeniedException
Mailbox
associated with this session. Mailbox
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForMessageNotifications()
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedMailboxView()
mandatory
- This method is must be implemented. void useIsolatedMailboxView()
mandatory
- This method is must be implemented. void registerForNewMessages() throws OperationFailedException, PermissionDeniedException
MessageReceiver.newMessages()
is invoked when a new
Message
is appears in this mailbox.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewMessagesFromSender(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.newMessages()
is invoked when a new
Message
is appears in this mailbox.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewMessagesForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.newMessages()
is invoked when a new
Message
is appears in this mailbox.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMessages() throws OperationFailedException, PermissionDeniedException
MessageReceiver.changedMessages()
is invoked when a message in
this mailbox is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMessagesFromSender(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.updatedMessages()
is invoked when a
Message
in this mailbox is changed.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMessagesForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.updatedMessages()
is invoked when a
Message
in this mailbox is changed.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedMessage(Id messageId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.changedMessage()
is invoked when the specified
message in this mailbox is changed.messageId
- the Id
of the Message
to monitorNullArgumentException
- messageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMessages() throws OperationFailedException, PermissionDeniedException
MessageReceiver.deletedMessages()
is invoked when a message is
deleted or removed from this mailbox.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMessagesFromSender(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.deletedMessages()
is invoked when a
Message
is deleted or removed from this mailbox.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMessagesForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.deletedMessages()
is invoked when a
Message
is deleted or removed from this mailbox.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedMessage(Id messageId) throws OperationFailedException, PermissionDeniedException
MessageReceiver.deletedMessages()
is invoked when the
specified message is deleted or removed from this mailbox.messageId
- the Id
of the Message
to monitorNullArgumentException
- messageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.