Class LockFileEventImpl
java.lang.Object
de.aristaflow.adept2.core.eventmanager.common.AbstractEvent
de.aristaflow.adept2.core.eventmanager.fileevents.FileEventImpl
de.aristaflow.adept2.core.eventmanager.fileevents.LockFileEventImpl
- All Implemented Interfaces:
Event,FileEvent,LockFileEvent
An event for files and their lock files, that is, an event is produced and
sent as soon as a file (or a directory) is created or stored in a specific
folder.
This event source terminates as soon as an event has been handled. However, since it polls, one has to ensure that a handled file is deleted or moved to another folder. Otherwise the source will create another event for the file.
This event source terminates as soon as an event has been handled. However, since it polls, one has to ensure that a handled file is deleted or moved to another folder. Otherwise the source will create another event for the file.
- Author:
- Ulrich Kreher, Marco Waimer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BasicFileAttributesThe file attributes of the path of the lock file.protected final PathThe path of the lock file for which the event has been created.Fields inherited from class de.aristaflow.adept2.core.eventmanager.fileevents.FileEventImpl
attributes, pathFields inherited from class de.aristaflow.adept2.core.eventmanager.common.AbstractEvent
creationTime, eventType, id, ID_COUNT, managerURI, sourceID, sourceType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the basic file attributes of the lock file of this event.Gets the path of the lock file of this event.Methods inherited from class de.aristaflow.adept2.core.eventmanager.fileevents.FileEventImpl
getFileAttributes, getPath, getUdtValueMethods inherited from class de.aristaflow.adept2.core.eventmanager.common.AbstractEvent
getCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.model.events.Event
getCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeMethods inherited from interface de.aristaflow.adept2.model.events.FileEvent
getFileAttributes, getPath
-
Field Details
-
lockPath
The path of the lock file for which the event has been created. -
lockAttributes
The file attributes of the path of the lock file.
-
-
Constructor Details
-
LockFileEventImpl
public LockFileEventImpl(URI[] managerURI, String eventType, String sourceType, String sourceID, Path path, Path lockPath) throws IOException Creates a new event for the designated file.- Parameters:
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.lockPath- The path of the lock file for which the event has been created.- Throws:
IOException- If retrieving the basic file attributes of the designated path fails, anIOExceptionwill be thrown.
-
-
Method Details
-
getLockPath
Description copied from interface:LockFileEventGets the path of the lock file of this event.- Specified by:
getLockPathin interfaceLockFileEvent- Returns:
- The path of the lock file of this event.
-
getLockFileAttributes
Description copied from interface:LockFileEventGets the basic file attributes of the lock file of this event.- Specified by:
getLockFileAttributesin interfaceLockFileEvent- Returns:
- The basic file attributes of the path of the lock file of this event.
-