com.anthonyeden.lib.resource
Interface ResourceLoader
- All Known Implementing Classes:
- AbstractResourceLoader
- 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.
- Author:
- Anthony Eden
Method Summary |
void |
loadResource(java.lang.String path,
ResourceRecipient handler,
boolean monitor)
Load the resource specified by the given path. |
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 pathhandler
- The ResourceRecipient callbackmonitor
- True to monitor the resource
- Throws:
ResourceException
Copyright (c) 2000-2003 Anthony Eden. All Rights Reserved.