public interface DirectoryNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Directories.
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.
Two view are defined in this session:
federated view: includes notifications of directories located in descendants of this directory
isolated view: includes notifcations of directories in this directory only
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeDirectoryNotification(Id notificationId)
Acknowledge a directory notification.
|
boolean |
canRegisterForDirectoryNotifications()
Tests if this user can register for
Directory
notifications. |
Directory |
getDirectory()
Gets the
Directory associated with this session. |
Id |
getDirectoryId()
Gets the
Id of this directory. |
void |
registerForChangedDirectories()
Registers for notification of updated directories.
|
void |
registerForChangedDirectory(Id directoryId)
Registers for notification of an updated file.
|
void |
registerForDeletedDirectories()
Registers for notification of deleted directories.
|
void |
registerForDeletedDirectory(Id directoryId)
Registers for notification of a deleted directory.
|
void |
registerForNewDirectories()
Register for notifications of new directories.
|
void |
reliableDirectoryNotifications()
Reliable notifications are desired.
|
void |
unreliableDirectoryNotifications()
Unreliable notifications are desired.
|
void |
useFederatedDirectoryView()
Federates the view for methods in this session.
|
void |
useIsolatedDirectoryView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getDirectoryId()
Id
of this directory. Id
of this directorymandatory
- This method must be implemented. Directory getDirectory() throws OperationFailedException, PermissionDeniedException
Directory
associated with this session. Directory
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForDirectoryNotifications()
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedDirectoryView()
mandatory
- This method is must be implemented. void useIsolatedDirectoryView()
mandatory
- This method is must be implemented. void reliableDirectoryNotifications()
acknowledgeDirectoryNotification()
.mandatory
- This method is must be implemented. void unreliableDirectoryNotifications()
mandatory
- This method is must be implemented. void acknowledgeDirectoryNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewDirectories() throws OperationFailedException, PermissionDeniedException
DirectoryReceiver.newDirectories()
is invoked when a new
Directory
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDirectories() throws OperationFailedException, PermissionDeniedException
DirectoryReceiver.changedDirectories()
is invoked when a file
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDirectory(Id directoryId) throws OperationFailedException, PermissionDeniedException
DirectoryReceiver.changedDirectories()
is invoked when the
specified directory is changed.directoryId
- the Id
of the directory to monitorNullArgumentException
- directoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDirectories() throws OperationFailedException, PermissionDeniedException
DirectoryReceiver.deletedDirectories()
is invoked when a
directory is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDirectory(Id directoryId) throws OperationFailedException, PermissionDeniedException
DirectoryReceiver.changedDirectories()
is invoked when the
specified directory is deleted.directoryId
- the Id
of the directory to monitorNullArgumentException
- directoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.