public class FileEventImpl extends AbstractEvent implements FileEvent
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.file.attribute.BasicFileAttributes |
attributes
The file attributes of the path.
|
protected java.io.File |
file
Deprecated.
|
protected java.nio.file.Path |
path
The path for which the event has been created.
|
protected java.net.URL |
url
Deprecated.
|
creationTime, eventType, id, ID_COUNT, managerURI, sourceID, sourceType| Constructor and Description |
|---|
FileEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
java.io.File file)
Deprecated.
Use
FileEventImpl(URI[], String, String, String, Path) instead. |
FileEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
java.nio.file.Path path)
Creates a new event for the designated path.
|
| Modifier and Type | Method and Description |
|---|---|
java.net.URI |
getAsURI()
Gets the URI of the file that caused this event.
|
java.net.URL |
getAsURL()
Gets the URL of the file that caused this event.
|
java.io.File |
getFile()
Gets the file that caused this event.
|
java.nio.file.attribute.BasicFileAttributes |
getFileAttributes()
Gets the basic file attributes of the path of this event.
|
java.util.Date |
getLastModified()
Gets the date the file that caused this event has been modified.
|
java.lang.String |
getName()
Gets the name of the file that caused this event.
|
java.nio.file.Path |
getPath()
Gets the path that caused this event.
|
getCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeprotected final java.nio.file.Path path
protected final java.nio.file.attribute.BasicFileAttributes attributes
@Deprecated protected final java.io.File file
@Deprecated protected final java.net.URL url
@Deprecated
public FileEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
java.io.File file)
throws java.io.IOException
FileEventImpl(URI[], String, String, String, Path) instead.managerURI - The URIs of the service (event manager) creating the
event.eventType - The type of the event.sourceType - The type of the source of this event.sourceID - The ID of the source of this event.file - The file of the event.java.io.IOException - Retrieving the URL of the file may throw an
IOException.public FileEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
java.nio.file.Path path)
throws java.io.IOException
managerURI - The URIs of the service (event manager) creating the event.eventType - The type of the event.sourceType - The type of the source of this event.sourceID - The ID of the source of this event.path - The path for which the event has been created.java.io.IOException - If retrieving the basic file attributes of the designated path fails, an
IOException will be thrown.public java.nio.file.Path getPath()
FileEventpublic java.nio.file.attribute.BasicFileAttributes getFileAttributes()
FileEventgetFileAttributes in interface FileEventpublic java.lang.String getName()
FileEventpublic java.util.Date getLastModified()
FileEventgetLastModified in interface FileEventpublic java.net.URI getAsURI()
FileEventpublic java.net.URL getAsURL()
FileEvent