com.anthonyeden.lib.resource
Class FileResourceLoader

java.lang.Object
  extended bycom.anthonyeden.lib.resource.AbstractResourceLoader
      extended bycom.anthonyeden.lib.resource.FileResourceLoader
All Implemented Interfaces:
ResourceLoader

public class FileResourceLoader
extends AbstractResourceLoader

Implementation of the ResourceLoader interface which loads data from a file.

Author:
Anthony Eden

Field Summary
 
Fields inherited from class com.anthonyeden.lib.resource.AbstractResourceLoader
DEFAULT_DELAY
 
Constructor Summary
FileResourceLoader()
           
 
Method Summary
 void loadResource(java.lang.String path, ResourceRecipient handler)
          Load the resource specified by the given path.
 void loadResource(java.lang.String path, ResourceRecipient handler, boolean monitor)
          Load the resource specified by the given path.
 
Methods inherited from class com.anthonyeden.lib.resource.AbstractResourceLoader
getDelay, getMonitors, setDelay, startMonitors, stopMonitors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResourceLoader

public FileResourceLoader()
Method Detail

loadResource

public void loadResource(java.lang.String path,
                         ResourceRecipient handler)
                  throws ResourceException
Load the resource specified by the given path. Calling this method will cause the resource to be loaded and monitored.

Overrides:
loadResource in class AbstractResourceLoader
Parameters:
path - The path
handler - The ResourceReceipient callback
Throws:
ResourceException

loadResource

public void loadResource(java.lang.String path,
                         ResourceRecipient handler,
                         boolean monitor)
                  throws ResourceException
Load the resource specified by the given path. If monitor is true then the ResourceLoader implementation will monitor the resource and call the ResourceRecipient each time the resource is modified.

Parameters:
path - The path
handler - The ResourceRecipient callback
monitor - True to monitor the resource
Throws:
ResourceException


Copyright (c) 2000-2003 Anthony Eden. All Rights Reserved.