Interface DirectoryReceiver
- All Superinterfaces:
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() {}
}
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangedDirectories(Id notificationId, IdList directoryIds) The callback for notification of updated directories.voiddeletedDirectories(Id notificationId, IdList directoryIds) the callback for notification of deleted directories.voidnewDirectories(Id notificationId, IdList directoryIds) The callback for notifications of new directories.Methods inherited from interface OsidReceiver
down, up
-
Method Details
-
newDirectories
-
changedDirectories
-
deletedDirectories
-