gate.event
Class DatastoreEvent
java.lang.Object
|
+--java.util.EventObject
|
+--gate.event.GateEvent
|
+--gate.event.DatastoreEvent
- All Implemented Interfaces:
- Serializable
- public class DatastoreEvent
- extends GateEvent
This class models events fired by datastores. Such events occur when new
resources are adopted by a datastore or when an existing resource from
the datastore is deleted.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
resource
protected Resource resource
resourceID
protected String resourceID
RESOURCE_ADOPTED
public static int RESOURCE_ADOPTED
- The type of events fired when a resource has been adopted
RESOURCE_DELETED
public static int RESOURCE_DELETED
- The type of events fired when a resource has been deleted from a datastore
RESOURCE_WRITTEN
public static int RESOURCE_WRITTEN
- The type of events fired when a resource has wrote into the datastore
DatastoreEvent
public DatastoreEvent(DataStore source,
int type,
Resource res,
String resourceID)
- Constructor.
- Parameters:
source
- the datastore that originated the event.type
- the event type.res
- the resource that has been adopted/deleted/etc.resourceID
- the ID corresponding to the resource in this datastore
getResourceID
public String getResourceID()
- Gets the ID of the resource involved in this event
getResource
public Resource getResource()
- Gets the resource involved in this event