public interface DirectoryReceiver extends OsidReceiver
The directory receiver is the consumer supplied interface for receiving notifications pertaining to new, updated or deleted directories.
An example showing how to receive notifications of new directories created under a user's home directory.
notificationSession = manager.getDirectoryNotificationSessionForDirectory(myReceiver, "/Users/tom"); notificationSession.useFederatedDirectoryView(); notificationSession.registerForNewDirectories();
class myReceiver { void newDirectories(osid.id.IdList directoryIds) { while (directoryIds.hasNext()) { osid.filing.Directory directory = lookupSession.getDirectory(directoryIds.getNextId()); print "new directory created: " + directory.getPath()); } notificationSession.acknowledgeDiectoryNotification(notificationId); } void changedDirectories(osid.id.IdList directoryIds) {} void deletedDirectories(osid.id.IdList directoryIds) {} void up() {} void down() {} }
Modifier and Type | Method and Description |
---|---|
void |
changedDirectories(Id notificationId,
IdList directoryIds)
The callback for notification of updated directories.
|
void |
deletedDirectories(Id notificationId,
IdList directoryIds)
the callback for notification of deleted directories.
|
void |
newDirectories(Id notificationId,
IdList directoryIds)
The callback for notifications of new directories.
|
down, up
void newDirectories(Id notificationId, IdList directoryIds)
notificationId
- the notification IddirectoryIds
- the Ids
of the new directoriesmandatory
- This method must be implemented. void changedDirectories(Id notificationId, IdList directoryIds)
notificationId
- the notification IddirectoryIds
- the Ids
of the new directoriesmandatory
- This method must be implemented.