|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
com.teamdev.filewatch.FileEvent
public abstract class FileEvent
Class that represents a file system event.
| Nested Class Summary | |
|---|---|
static class |
FileEvent.Added
The event for a new file. |
static class |
FileEvent.Changed
The event for a changed file. |
static class |
FileEvent.Deleted
The event for a deleted file. |
static class |
FileEvent.Moved
Artificial event that represents add-delete event pair for the file reallocated from one folder to another. |
static class |
FileEvent.Renamed
The event for a renamed file. |
| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
FileEvent(FileWatcher source,
java.io.File file)
Constructs a new event ocurred to the file |
|
| Method Summary | |
|---|---|
protected abstract void |
dispatch(FileEventsListener listener)
Implementing events should call an appropriate method of the listener passing itself as a parameter of the corresponding listener's method. |
long |
getEventId()
Returns event id of this event if supported by filesystem |
java.io.File |
getFile()
Returns file of this event. |
protected java.lang.String |
getNativeKind()
|
void |
setEventId(long eventId)
|
java.lang.String |
toString()
|
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileEvent(FileWatcher source,
java.io.File file)
source - the watcher object that originated the eventfile - the file for which the event ocurred. Never null.| Method Detail |
|---|
public java.io.File getFile()
public long getEventId()
public void setEventId(long eventId)
public java.lang.String toString()
toString in class java.util.EventObjectprotected java.lang.String getNativeKind()
protected abstract void dispatch(FileEventsListener listener)
listener - a listener to notify.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||