public class FileObserverBinding extends FileObserver
All properties from the FileObserverService can be used.
Additionally there are properties that are specific for that class:
| Property Keyword | Datatype | Default | Description |
|---|---|---|---|
| Properties | String | none | Use this property to specify a property file that contains properties for use. |
FileObserverServiceFileObserver.FireThreadarrLock, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_LAST_ACCESS, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_SECURITY, FILE_NOTIFY_CHANGE_SIZE, flags, libLoaded, LIBRARY_NAME, listenerLock, listeners, nativeContext, observables, thread, timeout, watchSubTree| Constructor and Description |
|---|
FileObserverBinding() |
| Modifier and Type | Method and Description |
|---|---|
void |
addJVMServiceListener(JVMServiceListener l)
Add a service state listener.
|
void |
fireServiceEvent(int state)
Fire a service event.
|
void |
fireServiceEvent(int state,
java.lang.String message)
Fire a service event.
|
void |
fireServiceEvent(JVMServiceEvent ev)
Fire a service event.
|
JVMServiceListener[] |
getJVMServiceListeners()
Get all service state listeners.
|
void |
init()
Initialize observer.
|
static void |
main(java.lang.String[] param)
Use this method to start the file observer from command line.
|
void |
removeJVMServiceListener(JVMServiceListener l)
Remove a service state listener.
|
void |
run()
The run method.
|
void |
start()
Called by the main program, the hosting frame,
or the hosting applet to inform this application
that it should start its execution.
|
add, add, addFileObserverListener, finalize, fireIndexEvent, get, getAllFlags, getAttributeFlag, getCreationFlag, getDirectoryFlag, getFilenameFlag, getFlags, getLastAccessFlag, getLastWriteFlag, getMaxCount, getSecurityFlag, getSizeFlag, getThread, getTimeout, getWatchSubTree, isLibraryLoaded, isStopped, release, remove, removeFileObserverListener, setFlags, setTimeout, setWatchSubTree, size, startObservation, stoppublic void init()
public void start()
start in class FileObserverpublic void run()
run in interface java.lang.Runnablerun in class FileObserverpublic void addJVMServiceListener(JVMServiceListener l)
l - the service state listener to be added.public void removeJVMServiceListener(JVMServiceListener l)
l - the service state listener to be removed.public JVMServiceListener[] getJVMServiceListeners()
public void fireServiceEvent(int state,
java.lang.String message)
- public void fireServiceEvent(int state)
- public void fireServiceEvent(JVMServiceEvent ev)
- public static void main(java.lang.String[] param)
param - the runtime argument