Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

wal
Interface CacheService  view CacheService download CacheService.java

All Superinterfaces:
FileStateListener
All Known Implementing Classes:
CacheServiceImpl

public interface CacheService
extends FileStateListener

CacheService manages the cache of downloaded resources. CacheService is meant to hold only resources for a single application. So anything in cache is related to that application.

To initialize cache, you have to start WAL at least once with argument -i. Please use first argument -h to see detail about initialize parameter.

Created on 06.10.2003


Field Summary
static java.lang.String CACHE
          name of the cache directory
 
Fields inherited from interface wal.FileStateListener
DEATH, FINISHED, NEW, STARTED
 
Method Summary
 void addResourceUpdater(wal.net.ResourceUpdater ru)
          Installs an ResourceUpdater which is responsible to keep cache directory up to date.
 FileHandle getFileHandle(java.net.URL url)
          Take a FileHandle if you want cache a new resource.
 boolean isResourceCached(java.net.URL url, java.lang.String version)
           
 void removeResource(java.net.URL url, java.lang.String str)
           
 void runClass(java.lang.String string, java.lang.String[] strings)
          Invokes main class which is looked up from a jar file within cache directory.
 void stateChanged(byte state, java.lang.String url)
           
 

Field Detail

CACHE

public static final java.lang.String CACHE
name of the cache directory

See Also:
Constant Field Values
Method Detail

isResourceCached

public boolean isResourceCached(java.net.URL url,
                                java.lang.String version)

removeResource

public void removeResource(java.net.URL url,
                           java.lang.String str)
                    throws java.io.IOException

stateChanged

public void stateChanged(byte state,
                         java.lang.String url)
Specified by:
stateChanged in interface FileStateListener

getFileHandle

public FileHandle getFileHandle(java.net.URL url)
                         throws java.io.IOException
Take a FileHandle if you want cache a new resource. It should be the only way for adding new resources to cache directory.


addResourceUpdater

public void addResourceUpdater(wal.net.ResourceUpdater ru)
Installs an ResourceUpdater which is responsible to keep cache directory up to date.


runClass

public void runClass(java.lang.String string,
                     java.lang.String[] strings)
Invokes main class which is looked up from a jar file within cache directory.