Interface AllocationNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AllocationNotificationSession extends OsidSession

This session defines methods to receive notifications of allocation warnings and changed quota assignments. 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.

  • Method Details

    • getDirectoryPath

      String getDirectoryPath()
      Gets the absolute path of this directory.
      Returns:
      the absolute path of this directory
      Compliance:
      mandatory - This method must be implemented.
    • getDirectory

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

      boolean canRegisterForAllocationNotifications()
      Tests if this user can register for Directory 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.
    • registerForAllocationWarnings

      void registerForAllocationWarnings() throws OperationFailedException, PermissionDeniedException
      Register for notifications of allocation warnings. AllocationReceiver.warning() is invoked when a new warning is issued.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForAllocationClearWarnings

      void registerForAllocationClearWarnings() throws OperationFailedException, PermissionDeniedException
      Register for notifications of clearing of allocation warnings. AllocationReceiver.clearWarning() is invoked when a warning is cleared.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAllocations

      void registerForChangedAllocations() throws OperationFailedException, PermissionDeniedException
      Registers for notification of new, updated or changed allocations across an entire file system not specific to any user. AllocationReceiver.changedAllocation() is invoked when a quota is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedAllocationsForDirectory

      void registerForChangedAllocationsForDirectory(Id dircetory) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new, updated or changed allocations across an entire file system not specific to any user. AllocationReceiver.changedAllocation() is invoked when a quota is changed.
      Parameters:
      dircetory - the path
      Throws:
      NullArgumentException - directory is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedUserAllocations

      void registerForChangedUserAllocations() throws OperationFailedException, PermissionDeniedException
      Registers for notification of new, updated or changed user quotas. AllocationReceiver.changedUserAllocation() is invoked when a quota is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedUserAllocationsForUser

      void registerForChangedUserAllocationsForUser(Id agentId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of new, updated or changed quotas for a specific user. AllocationReceiver.changedUserAllocation() is invoked when a quota is changed.
      Parameters:
      agentId - the Id of the user
      Throws:
      NullArgumentException - agentId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.