Interface ResourceRelationshipNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResourceRelationshipNotificationSession extends OsidSession

This session defines methods to receive asynchronous notifications on adds/changes to resource relationships. 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 ResourceRelationshipLookupSession .

  • Method Details

    • getBinId

      Id getBinId()
      Gets the Bin Id associated with this session.
      Returns:
      the Bin Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBin

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

      boolean canRegisterForResourceRelationshipNotifications()
      Tests if this user can register for ResourceRelationship 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.
    • useFederatedBinView

      void useFederatedBinView()
      Federates the view for methods in this session. A federated view will include notifications for relationships in bins which are children of this bin in the bin hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBinView

      void useIsolatedBinView()
      Isolates the view for methods in this session. An isolated view restricts notifications for relationships in this bin only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableResourceRelationshipNotifications

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

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

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

      void registerForNewResourceRelationships() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relationship. ResourceRelationshipReceiver.newResourceRelationships() is invoked when a new relationship is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewResourceRelationshipsByGenusType

      void registerForNewResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relationships of the given genus type. ResourceRelationshipReceiver.newResourceRelationships() is invoked when a new relationship is created.
      Parameters:
      resourceRelationshipGenusType - the rsource relationship genus type
      Throws:
      NullArgumentException - resourceRelationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewResourceRelationshipsForSourceResource

      void registerForNewResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relationships from the given resource. ResourceRelationshipReceiver.newResourceRelationships() is invoked when a new relationship is created.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewResourceRelationshipsForDestinationResource

      void registerForNewResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new relationships to the given resource. ResourceRelationshipReceiver.newResourceRelationships() is invoked when a new relationship is created.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResourceRelationships

      void registerForChangedResourceRelationships() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated relationships. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when a relationship is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResourceRelationshipsByGenusType

      void registerForChangedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relationshipsof the given genus type. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when a relationship is changed.
      Parameters:
      resourceRelationshipGenusType - the rsource relationship genus type
      Throws:
      NullArgumentException - resourceRelationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResourceRelationshipsForSourceResource

      void registerForChangedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relationships from the given resource. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when a relationship is changed.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResourceRelationshipsForDestinationResource

      void registerForChangedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed relationships to the given resource. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when a relationship is changed.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedResourceRelationship

      void registerForChangedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated relationship. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when the specified relationship is changed.
      Parameters:
      resourceRelationshipId - the Id of the ResourceRelationship to monitor
      Throws:
      NullArgumentException - resourceRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResourceRelationships

      void registerForDeletedResourceRelationships() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted relationships. ResourceRelationshipReceiver.deletedResourceRelationships() is invoked when a relationship is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResourceRelationshipsByGenusType

      void registerForDeletedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relationships of the given genus type. ResourceRelationshipReceiver.deletedResourceRelationships() is invoked when a relationship is deleted.
      Parameters:
      resourceRelationshipGenusType - the rsource relationship genus type
      Throws:
      NullArgumentException - resourceRelationshipGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResourceRelationshipsForSourceResource

      void registerForDeletedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relationships from the given resource. ResourceRelationshipReceiver.deletedResourceRelationships() is invoked when a relationship is deleted.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResourceRelationshipsForDestinationResource

      void registerForDeletedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted relationships to the given resource. ResourceRelationshipReceiver.deletedResourceRelationships() is invoked when a relationship is deleted.
      Parameters:
      resourceId - the Id of the Resource to monitor
      Throws:
      NullArgumentException - resourceRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedResourceRelationship

      void registerForDeletedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted relationship. ResourceRelationshipReceiver.changedResourceRelationships() is invoked when the specified relationship is deleted.
      Parameters:
      resourceRelationshipId - the Id of the ResourceRelationship to monitor
      Throws:
      NullArgumentException - resourceRelationshipId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.