Interface ResourceLoader

All Known Implementing Classes:

public interface ResourceLoader

Generic interface for loading resources. Each form of the loadResource() method accepts a ResourceRecipient which is a callback implemented by classe which will use the resource's data. When the resource is loaded the ResourceRecipient's load() method is called. This allows resources to be monitored and reloaded on a scheduled basis without having to call the ResourceLoader every time. See the FileResourceLoader implementation for an example.

Anthony Eden

Method Summary
 void loadResource(java.lang.String path, ResourceRecipient handler, boolean monitor)
          Load the resource specified by the given path.

Method Detail


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.

path - The path
handler - The ResourceRecipient callback
monitor - True to monitor the resource

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