Interface AllocationNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can register forDirectorynotifications.Gets theDirectoryassociated with this session.Gets the absolute path of this directory.voidRegister for notifications of clearing of allocation warnings.voidRegister for notifications of allocation warnings.voidRegisters for notification of new, updated or changed allocations across an entire file system not specific to any user.voidregisterForChangedAllocationsForDirectory(Id dircetory) Registers for notification of new, updated or changed allocations across an entire file system not specific to any user.voidRegisters for notification of new, updated or changed user quotas.voidRegisters for notification of new, updated or changed quotas for a specific user.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
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 theDirectoryassociated with this session.- Returns:
- the
Directoryassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForAllocationNotifications
boolean canRegisterForAllocationNotifications()Tests if this user can register forDirectorynotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
registerForAllocationWarnings
Register for notifications of allocation warnings.AllocationReceiver.warning()is invoked when a new warning is issued.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForAllocationClearWarnings
void registerForAllocationClearWarnings() throws OperationFailedException, PermissionDeniedExceptionRegister for notifications of clearing of allocation warnings.AllocationReceiver.clearWarning()is invoked when a warning is cleared.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedAllocations
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 requestPermissionDeniedException- 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-directoryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedUserAllocations
Registers for notification of new, updated or changed user quotas.AllocationReceiver.changedUserAllocation()is invoked when a quota is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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- theIdof the user- Throws:
NullArgumentException-agentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-