public interface ContactNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Contact objects. 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.
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeContactNotification(Id notificationId)
Acknowledge a contact notification.
|
boolean |
canRegisterForContactNotifications()
Tests if this user can register for
Contact
notifications. |
AddressBook |
getAddressBook()
Gets the
AddressBook associated with this session. |
Id |
getAddressBookId()
Gets the
AddressBook Id associated with
this session. |
void |
registerForChangedContact(Id contactId)
Registers for notification of an updated contact.
|
void |
registerForChangedContacts()
Registers for notification of updated contacts.
|
void |
registerForChangedContactsByGenusType(Type contactGenusType)
Register for notifications of changed contacts for the given contact
genus
Type. |
void |
registerForChangedContactsForAddress(Id addressId)
Register for notifications of changed contacts for the given address
Id. |
void |
registerForChangedContactsForReference(Id referenceId)
Register for notifications of changed contacts for the given reference
Id. |
void |
registerForDeletedContact(Id contactId)
Registers for notification of a deleted contact.
|
void |
registerForDeletedContacts()
Registers for notification of deleted contacts.
|
void |
registerForDeletedContactsByGenusType(Type contactGenusType)
Register for notifications of deleted contacts for the given contact
genus
Type. |
void |
registerForDeletedContactsForAddress(Id addressId)
Register for notifications of deleted contacts for the given address
Id. |
void |
registerForDeletedContactsForReference(Id referenceId)
Register for notifications of deleted contacts for the given reference
Id. |
void |
registerForNewContacts()
Register for notifications of new contacts.
|
void |
registerForNewContactsByGenusType(Type contactGenusType)
Register for notifications of new contacts for the given genus
Type. |
void |
registerForNewContactsForAddress(Id addressId)
Register for notifications of new contacts for the given reference
Id. |
void |
registerForNewContactsForReference(Id referenceId)
Register for notifications of new contacts for the given reference
Id. |
void |
reliableContactNotifications()
Reliable notifications are desired.
|
void |
unreliableContactNotifications()
Unreliable notifications are desired.
|
void |
useFederatedAddressBookView()
Federates the view for methods in this session.
|
void |
useIsolatedAddressBookView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getAddressBookId()
AddressBook Id associated with
this session. AddressBook Id associated with this sessionmandatory - This method must be implemented. AddressBook getAddressBook() throws OperationFailedException, PermissionDeniedException
AddressBook associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForContactNotifications()
Contact
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 useFederatedAddressBookView()
mandatory - This method is must be implemented. void useIsolatedAddressBookView()
mandatory - This method is must be implemented. void reliableContactNotifications()
acknowledgeContactNotification()
.mandatory - This method is must be implemented. void unreliableContactNotifications()
mandatory - This method is must be implemented. void acknowledgeContactNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId - the Id of the notificationOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewContacts()
throws OperationFailedException,
PermissionDeniedException
ContactReceiver.newContacts() is invoked when a new
Contact is created.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewContactsByGenusType(Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Type. ContactReceiver.newContacts() is invoked
when a new Contact is created.contactGenusType - the contact genus type to monitorNullArgumentException - contactGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewContactsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.newContacts() is
invoked when a new Contact is created.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewContactsForAddress(Id addressId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.newContacts() is
invoked when a new Contact is created.addressId - the Id of the address to monitorNullArgumentException - addressId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedContacts()
throws OperationFailedException,
PermissionDeniedException
ContactReceiver.changedContacts() is invoked when a contact is
changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedContactsByGenusType(Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Type. ContactReceiver.changedContacts()
is invoked when a Contact for the genus type is
changed.contactGenusType - the contact genus type to monitorNullArgumentException - contactGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedContactsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.changedContacts() is
invoked when a Contact for the reference is changed.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedContactsForAddress(Id addressId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.changedContacts() is
invoked when a Contact for the address is changed.addressId - the Id of the address to monitorNullArgumentException - addressId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedContact(Id contactId) throws OperationFailedException, PermissionDeniedException
ContactReceiver.changedContact() is invoked when the specified
contact is changed.contactId - the Id of the Contact
to monitorNullArgumentException - contactId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedContacts()
throws OperationFailedException,
PermissionDeniedException
ContactReceiver.deletedContacts() is invoked when a contact is
deleted.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedContactsByGenusType(Type contactGenusType) throws OperationFailedException, PermissionDeniedException
Type. ContactReceiver.deletedContacts()
is invoked when a Contact for the genus type is
deleted.contactGenusType - the contact genus type to monitorNullArgumentException - contactGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedContactsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.deletedContacts() is
invoked when a Contact for the reference is deleted.referenceId - the Id of the reference to monitorNullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedContactsForAddress(Id addressId) throws OperationFailedException, PermissionDeniedException
Id. ContactReceiver.deletedContacts() is
invoked when a Contact for the address is deleted.addressId - the Id of the address to monitorNullArgumentException - addressId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedContact(Id contactId) throws OperationFailedException, PermissionDeniedException
ContactReceiver.deletedContacts() is invoked when the
specified contact is deleted.contactId - the Id of the Contact
to monitorNullArgumentException - contactId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.