Package net.sf.eBusx.io
Class EFileNotification
- java.lang.Object
 - 
- net.sf.eBus.messages.EMessageObject
 - 
- net.sf.eBus.messages.EMessage
 - 
- net.sf.eBus.messages.ENotificationMessage
 - 
- net.sf.eBusx.io.EFileNotification
 
 
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable
@ELocalOnly public final class EFileNotification extends ENotificationMessage implements java.io.Serializable
Used to transmit a JavaWatchEventasynchronously to all interested listeners. The message subject is the file or directory path. The message contains the how the file changed (created, modified, or deleted), the file modification timestamp (in Java millisecond epoch time), and the file length in byte.- Author:
 - Charles Rapp
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEFileNotification.Builderstatic classEFileNotification.EventTypeThe watched file was either created, modified, or deleted.- 
Nested classes/interfaces inherited from class net.sf.eBus.messages.EMessage
EMessage.MessageType 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description EFileNotification.EventTypeeventTypeThis notification signifies that either the file or directory was created, modified, or deleted.java.io.FilefileThe notification applies to this file instance.longlastModifiedThe date and time when thefilewas last modified.longlengthfilelength in bytes.- 
Fields inherited from class net.sf.eBus.messages.ENotificationMessage
NO_PUB_ID, position, publisherId 
- 
Fields inherited from class net.sf.eBus.messages.EMessage
MAX_SUBJECT_LENGTH, subject, timestamp 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EFileNotification.Builderbuilder()Returns anEFileNotificationmessage builder.java.lang.StringtoString()Returns notification message publisher ID and position as a string.- 
Methods inherited from class net.sf.eBus.messages.ENotificationMessage
equals, hashCode 
- 
Methods inherited from class net.sf.eBus.messages.EMessage
isApplicationMessage, isSystemMessage, key, messageType, timestampAsInstant 
 - 
 
 - 
 
- 
- 
Field Detail
- 
file
public final java.io.File file
The notification applies to this file instance. 
- 
eventType
public final EFileNotification.EventType eventType
This notification signifies that either the file or directory was created, modified, or deleted. 
- 
lastModified
public final long lastModified
The date and time when thefilewas last modified. Will be zero ifeventTypeisEFileNotification.EventType.DELETE. 
- 
length
public final long length
 
 - 
 
- 
Method Detail
- 
toString
public java.lang.String toString()
Description copied from class:ENotificationMessageReturns notification message publisher ID and position as a string.- Overrides:
 toStringin classENotificationMessage- Returns:
 - notification message publisher ID and position as a string.
 
 
- 
builder
public static EFileNotification.Builder builder()
Returns anEFileNotificationmessage builder.- Returns:
 - message builder.
 
 
 - 
 
 -