|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileScope
A scope in which files are monitored.
Method Summary | |
---|---|
void |
addFileChangeListener(FileChangeListener listener) Add a file change listener to receive events about the files in this scope. |
boolean |
contains(java.net.URL url) Determine whether this scope contains a URL. |
java.util.Collection<java.net.URL> |
getDirectories() Get the URLs of all directories in this scope. |
java.util.Collection<java.net.URL> |
getFiles() Get the URLs of all files in this scope. |
FileTable |
getFileTable(java.net.URL url) Get the file table in this scope containing a particular URL. |
java.util.Collection<FileTable> |
getFileTables() Get the file tables currently used by this scope. |
java.net.URL |
locate(java.lang.String relativePath) Locate a file in this scope. |
void |
refresh() Refresh this scope. |
void |
refresh(FileChangeListener listener) Refresh this scope and invoke a listener with any changes found. |
void |
removeFileChangeListener(FileChangeListener listener) Remove a file change listener from this scope. |
void |
update() Update this scope. |
Method Detail |
---|
void addFileChangeListener(@NotNull
FileChangeListener listener)
listener
- the listener to be added
void removeFileChangeListener(@NotNull
FileChangeListener listener)
listener
- the listener to be removedjava.util.Collection<FileTable> getFileTables()
FileTable getFileTable(java.net.URL url)
url
- the URLnull
if no storages contain that URLboolean contains(java.net.URL url)
url
- the URLtrue
if this scope contains the URL, false
otherwisejava.net.URL locate(java.lang.String relativePath) throws java.io.IOException, java.lang.InterruptedException
relativePath
- the relative path to the filenull
if the file was not found in this scopejava.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
java.util.Collection<java.net.URL> getFiles() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
- if the list of URLs could not be obtainedjava.lang.InterruptedException
- if the calling thread is interruptedjava.util.Collection<java.net.URL> getDirectories() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
- if the list of URLs could not be obtainedjava.lang.InterruptedException
- if the calling thread is interruptedvoid refresh() throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the refresh failsvoid update() throws java.lang.InterruptedException, java.io.IOException
refresh()
, the files on disk are only scanned if the file table is known to require a refresh. This is potentially a very time consuming operation, and should never be called on the event thread. This method exists for backward compatibility with older code that requires it. It should rarely, if ever, be necessary to call this method. The file scope is updated automatically whenever any method is called to access its data.java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the update fails
void refresh(@Nullable
FileChangeListener listener)
throws java.lang.InterruptedException,
java.io.IOException
java.lang.InterruptedException
- if the calling thread is interruptedjava.io.IOException
- if the refresh fails
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |