com.threerings.resource
Class ResourceManager.ObservedResource

java.lang.Object
  extended by com.threerings.resource.ResourceManager.ObservedResource
Enclosing class:
ResourceManager

protected static class ResourceManager.ObservedResource
extends Object

Contains the state of an observed file resource.


Field Summary
protected  File _file
           
protected  long _lastModified
           
 WeakObserverList<ResourceManager.ModificationObserver> observers
          The observers listening for modifications to this resource.
 
Constructor Summary
ResourceManager.ObservedResource(File file)
           
 
Method Summary
 boolean checkForModification(String path)
          Checks for a modification to the observed resource, notifying the observers if one is detected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

observers

public WeakObserverList<ResourceManager.ModificationObserver> observers
The observers listening for modifications to this resource.


_file

protected File _file

_lastModified

protected long _lastModified
Constructor Detail

ResourceManager.ObservedResource

public ResourceManager.ObservedResource(File file)
Method Detail

checkForModification

public boolean checkForModification(String path)
Checks for a modification to the observed resource, notifying the observers if one is detected.

Parameters:
path - the path of the resource (to forward to observers).
Returns:
true if the list of observers is empty and the resource should be removed from the observed list, false if it should remain in the list.