Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.ide.net
Interface URLFileSystemListener

All Superinterfaces:
java.util.EventListener

public interface URLFileSystemListener
extends java.util.EventListener

The URLFileSystemListener interface allows clients to track changes to file URL's in a root URL directory. The URLFileSystemEvent describes the event that occurred, the URL which was involved, and the root URL directories containing that URL.

Events are typically delivered on the same thread which caused the event to be generated. As this is not guaranteed to be the UI thread, listener clients should avoid manipulating UI in their implementations, as well as avoid any lengthy processing.

When a listener is registered for a given root URL, the URLFileSystem will cause that root URL to be tracked by any underlying virtual file system that might be installed for the given URL protocol. Clients need to be aware that such VFS implementations may activate a native directory watcher to track changes in the root URL. These native directory watchers may cause the directory to be marked as "in use", preventing their deletion.

Since multiple threads in the application may be doing I/O operations concurrently against the URLFileSystem, a given listener instance may receive notifications on multiple threads simultaneously. Consequently, the listener implementation is required to be thread-safe and re-entrant.

While unlikely, it is possible that listener instances may receive stray notifications for a given root URL that was previously registered if the listener de-registration and event notification are very closely spaced in time.


Method Summary
 void notifyEvent(URLFileSystemEvent event)
          Notify the listener that an URL event has occurred in a tracked directory root URL.

 

Method Detail

notifyEvent

void notifyEvent(URLFileSystemEvent event)
Notify the listener that an URL event has occurred in a tracked directory root URL. The event provides details as to the the specific event that occurred (i.e., FILE_ADDED), the URL that was affected, and what the directory root URL it occurred in.
Parameters:
event - the event providing more details as to what event occurred

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.