KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > internal > caching > ResourceCache


1 /* ResourceCache.java */
2
3 package org.enhydra.shark.api.internal.caching;
4
5 import org.enhydra.shark.api.internal.working.*;
6 import org.enhydra.shark.api.RootException;
7
8 /**
9  * This interface presents cache that stores resources.
10  * @author Vladimir Puskas
11  * @author Tanja Jovanovic
12  */

13 public interface ResourceCache extends ObjectCache {
14
15    /**
16     * Adds resource to the resource cache.
17     *
18     * @param username username of the resource.
19     * @param res WfResourceInternal object to be added to the resource cache.
20     *
21     * @exception RootException Thrown if an error occurs.
22     */

23    public void add(String JavaDoc username, WfResourceInternal res) throws RootException;
24
25    /**
26     * Removes resource from the resource cache.
27     *
28     * @param username username of the resource.
29     * @exception RootException Thrown if an error occurs.
30     */

31    public void remove(String JavaDoc username) throws RootException;
32
33    /**
34     * Returns the resource from the resource cache with username <i>username</i>.
35     *
36     * @param username username of the resource.
37     * @return Resource from the cache with the username <i>username</i> if exists,
38     * otherwise null.
39     * @exception RootException Thrown if an error occurs.
40     */

41    public WfResourceInternal get(String JavaDoc username) throws RootException;
42 }
43 /* End of ResourceCache.java */
44
Popular Tags