org.entityfs.event
Interface EntityObserver
public interface EntityObserver
This interface is implemented by a class that listens to an entity or a file
system (an Observable
) for updates. All objects that implement the
EntityFS interface Observable
can be observed. Which events an
observable object sends differ from observable object to observable object.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
Observable
,
EntityEvent
update
void update(EntityEvent<?> event)
- This callback method is called by the observed
Observable
when it sends an event. The method
is called in the thread that generated the event, which has the following
implications:
- The calling thread holds a write lock on the affected entity if the
entity sending the event existed before the operation generating the
event.
- This method should return quickly. Put longer-running operations on
an
Executor
to be executed in its own
thread.
- Parameters:
event
- The event. It contains a reference to the affected entity.