Package com.globalmentor.net
Interface ResourceListener
-
- All Superinterfaces:
java.util.EventListener
public interface ResourceListener extends java.util.EventListener
Indicates the implementing class can listen for events relating to resource additions, removals, and changes.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onResourceAdded(ResourceEvent resourceEvent)
Called when a resource is added.void
onResourceMoved(ResourceEvent resourceEvent)
Called when a resource is renamed to a different referenceURI.void
onResourceRemoved(ResourceEvent resourceEvent)
Called when a resource is removed.
-
-
-
Method Detail
-
onResourceAdded
void onResourceAdded(ResourceEvent resourceEvent)
Called when a resource is added. The URI of the added resource will be ingetResoureURI()
. The resource description may be ingetResource()
, and information about the parent resource may be ingetParentResourceURI()
andgetParentResource()
, depending on the implementing class.- Parameters:
resourceEvent
- The event identifying the added resource.- See Also:
ResourceEvent.getResourceURI()
,ResourceEvent.getResource()
-
onResourceRemoved
void onResourceRemoved(ResourceEvent resourceEvent)
Called when a resource is removed. The URI of the removed resource will be ingetResoureURI()
. The resource description may be ingetResource()
, and information about the parent resource may be ingetParentResourceURI()
andgetParentResource()
, depending on the implementing class.- Parameters:
resourceEvent
- The event identifying the removed resource.- See Also:
ResourceEvent.getResourceURI()
,ResourceEvent.getResource()
-
onResourceMoved
void onResourceMoved(ResourceEvent resourceEvent)
Called when a resource is renamed to a different referenceURI. The new URI of the renamed resource will be ingetResoureURI()
, and its resource description may be ingetResource()
, depending on the implementing class. The old URI of the renamed resource will be ingetOldResourceURI
, and its old resource description may be ingetOldResource()
, depending on the implementing class. Information about the new parent resource may be ingetParentResourceURI()
andgetParentResource()
, and information about the old parent resource may be ingetOldParentResourceURI()
andgetOldParentResource()
, depending on the implementing class.- Parameters:
resourceEvent
- The event identifying the removed resource.- See Also:
ResourceEvent.getOldParentResourceURI()
,ResourceEvent.getOldParentResource()
,ResourceEvent.getOldResourceURI()
,ResourceEvent.getOldResource()
,ResourceEvent.getParentResourceURI()
,ResourceEvent.getParentResource()
,ResourceEvent.getResourceURI()
,ResourceEvent.getResource()
-
-