Interface RelevancyNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RelevancyNotificationSession extends OsidSession

This session defines methods to receive asynchronous notifications on adds/changes to subject relevancies. 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 views defined in this session correspond to the views in the RelevancyLookupSession .

  • Method Details

    • getOntologyId

      Id getOntologyId()
      Gets the Ontology Id associated with this session.
      Returns:
      the Ontology Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOntology

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

      boolean canRegisterForRelevancyNotifications()
      Tests if this user can register for Relevancy 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.
    • useFederatedOntologyView

      void useFederatedOntologyView()
      Federates the view for methods in this session. A federated view will include notifications for relevancies in ontologies which are children of this ontology in the ontology hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedOntologyView

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

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

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

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

      void registerForNewRelevancies() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relevancies. RelevancyReceiver.newRelevancies() is invoked when a new relevancy is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRelevanciesByGenusType

      void registerForNewRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relevancies by the given genus type. RelevancyReceiver.newRelevancies() is invoked when a new relevancy is created.
      Parameters:
      relevancyGenusType - the relevancy genus type
      Throws:
      NullArgumentException - relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRelevanciesForSubject

      void registerForNewRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relevancies for the given subject. RelevancyReceiver.newRelevancies() is invoked when a new relevancy is created.
      Parameters:
      subjectId - the Id of the Subject to monitor
      Throws:
      NullArgumentException - subjectId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRelevanciesForId

      void registerForNewRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relevancies for the given mapped Id . RelevancyReceiver.newRelevancies() is invoked when a new relevancy is created.
      Parameters:
      id - the Id to monitor
      Throws:
      NullArgumentException - id is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelevancies

      void registerForChangedRelevancies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated relevancies. RelevancyReceiver.changedRelevancies() is invoked when a relevancy is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelevanciesByGenusType

      void registerForChangedRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relevancies of the given genus type. RelevancyReceiver.changedRelevancies() is invoked when a relevancy is changed.
      Parameters:
      relevancyGenusType - the relevancy genus type
      Throws:
      NullArgumentException - relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelevanciesForSubject

      void registerForChangedRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relevancies for the given subject. RelevancyReceiver.changedRelevancies() is invoked when a relevancy is changed.
      Parameters:
      subjectId - the Id of the Subject to monitor
      Throws:
      NullArgumentException - subjectId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelevanciesForId

      void registerForChangedRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relevancies for the given Id . RelevancyReceiver.changedRelevancies() is invoked when a relevancy is changed.
      Parameters:
      id - the Id to monitor
      Throws:
      NullArgumentException - id is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRelevancy

      void registerForChangedRelevancy(Id relevancyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated relevancy. RelevancyReceiver.changedRelevancies() is invoked when the specified relevancy is changed.
      Parameters:
      relevancyId - the Id of the Relevancy to monitor
      Throws:
      NullArgumentException - relevancyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelevancies

      void registerForDeletedRelevancies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted relevancies. RelevancyReceiver.deletedRelevancies() is invoked when a relevancy is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelevanciesByGenusType

      void registerForDeletedRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relevancies of the given genus type. RelevancyReceiver.deletedRelevancies() is invoked when a relevancy is deleted.
      Parameters:
      relevancyGenusType - the relevancy genus type
      Throws:
      NullArgumentException - relevancyGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelevanciesForSubject

      void registerForDeletedRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relevancies for the given subject. RelevancyReceiver.deletedRelevancies() is invoked when a relevancy is deleted.
      Parameters:
      subjectId - the Id of the Subject to monitor
      Throws:
      NullArgumentException - subjectId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelevanciesForId

      void registerForDeletedRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relevancies for the given Id . RelevancyReceiver.deletedRelevancies() is invoked when a relevancy is deleted.
      Parameters:
      id - the Id to monitor
      Throws:
      NullArgumentException - id is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRelevancy

      void registerForDeletedRelevancy(Id relevancyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted relevancy. RelevancyReceiver.changedRelevancies() is invoked when the specified relevancy is deleted.
      Parameters:
      relevancyId - the Id of the Relevancy to monitor
      Throws:
      NullArgumentException - relevancyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.