Interface RelationshipEnablerNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelationshipEnablerNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to RelationshipEnabler objects in this Relationship . This also includes existing RelationshipEnablers that may appear or disappear due to changes in the Relationship 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 RelationshipEnablerLookupSession .

  • Method Details

    • getFamilyId

      Id getFamilyId()
      Gets the Family Id associated with this session.
      Returns:
      the Family Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getFamily

      Gets the Family associated with this session.
      Returns:
      the family
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForRelationshipEnablerNotifications

      boolean canRegisterForRelationshipEnablerNotifications()
      Tests if this user can register for RelationshipEnabler 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.
    • useFederatedFamilyView

      void useFederatedFamilyView()
      Federates the view for methods in this session. A federated view will include relationship enablers in families which are children of this family in the family hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedFamilyView

      void useIsolatedFamilyView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this family only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableRelationshipEnablerNotifications

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

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

      void acknowledgeRelationshipEnablerNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a relationship 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.
    • registerForNewRelationshipEnablers

      void registerForNewRelationshipEnablers() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relationship enablers. RelationshipEnablerReceiver.newRelationshipEnablers() is invoked when a new RelationshipEnabler appears in this family.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelationshipEnablers

      void registerForChangedRelationshipEnablers() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated relationship enabelrs. RelationshipEnablerReceiver.changedRelationshipEnablers() is invoked when a relationship enabler in this family is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelationshipEnabler

      void registerForChangedRelationshipEnabler(Id relationshipEnablerId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated relationship enabler. ProvisionableReceiver.changedRelationshipEnablers() is invoked when the specified relationship enabler in this family is changed.
      Parameters:
      relationshipEnablerId - the Id of the RelationshipEnabler to monitor
      Throws:
      NullArgumentException - relationshipEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelationshipEnablers

      void registerForDeletedRelationshipEnablers() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted relationship enablers. RelationshipEnablerReceiver.deletedRelationshipEnablers() is invoked when a relationship enabler is deleted or removed from this family.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelationshipEnabler

      void registerForDeletedRelationshipEnabler(Id relationshipEnablerId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted relationship enabler. RelationshipEnablerReceiver.deletedRelationshipEnablers() is invoked when the specified relationship enabler is deleted or removed from this family.
      Parameters:
      relationshipEnablerId - the Id of the RelationshipEnabler to monitor
      Throws:
      NullArgumentException - relationshipEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.