Interface ContactEnablerNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ContactEnablerNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to ContactEnabler objects in this AddressBook . This also includes existing ContactEnablers that may appear or disappear due to changes in the AddressBook hierarchy, 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 ContactEnablerLookupSession .

  • Method Details

    • getAddressBookId

      Id getAddressBookId()
      Gets the AddressBook Id associated with this session.
      Returns:
      the AddressBook Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getAddressBook

      Gets the AddressBook associated with this session.
      Returns:
      the address book
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForContactEnablerNotifications

      boolean canRegisterForContactEnablerNotifications()
      Tests if this user can register for ContactEnabler 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.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedAddressBookView

      void useFederatedAddressBookView()
      Federates the view for methods in this session. A federated view will include enablers in address books which are children of this address book in the address book hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedAddressBookView

      void useIsolatedAddressBookView()
      Isolates the view for methods in this session. An isolated view restricts notifications to this address book only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableContactEnablerNotifications

      void reliableContactEnablerNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeContactEnablerNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableContactEnablerNotifications

      void unreliableContactEnablerNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeContactEnablerNotification

      void acknowledgeContactEnablerNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a contact enabler notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewContactEnablers

      void registerForNewContactEnablers() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new contact enablers. ContactEnablerReceiver.newContactEnablers() is invoked when a new ContactEnabler appears in this address book.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedContactEnablers

      void registerForChangedContactEnablers() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated contact enablers. ContactEnablerReceiver.changedContactEnablers() is invoked when a contact enabler in this address book is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedContactEnabler

      void registerForChangedContactEnabler(Id contactEnablerId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated contact enabler. ProvisionableReceiver.changedContactEnablers() is invoked when the specified contact enabler in this address book is changed.
      Parameters:
      contactEnablerId - the Id of the ContactEnabler to monitor
      Throws:
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedContactEnablers

      void registerForDeletedContactEnablers() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted contact enablers. ContactEnablerReceiver.deletedContactEnablers() is invoked when a contact enabler is deleted or removed from this address book.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedContactEnabler

      void registerForDeletedContactEnabler(Id contactEnablerId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted contact enabler. ContactEnablerReceiver.deletedContactEnablers() is invoked when the specified contact enabler is deleted or removed from this address book.
      Parameters:
      contactEnablerId - the Id of the ContactEnabler to monitor
      Throws:
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.