KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > loader > rmi > RemoteTreeCacheImpl


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.loader.rmi;
8
9 import org.jboss.cache.CacheImpl;
10 import org.jboss.cache.Fqn;
11 import org.jboss.cache.Node;
12
13 import java.rmi.RemoteException JavaDoc;
14 import java.rmi.server.UnicastRemoteObject JavaDoc;
15 import java.util.Map JavaDoc;
16 import java.util.Set JavaDoc;
17
18 /**
19  * Implementation of the {@link org.jboss.cache.CacheImpl}'s remote interface.
20  *
21  * @author Daniel Gredler
22  * @version $Id: RemoteTreeCacheImpl.java,v 1.11 2006/12/30 17:50:00 msurtani Exp $
23  */

24 public class RemoteTreeCacheImpl extends UnicastRemoteObject JavaDoc implements RemoteTreeCache
25 {
26
27    private static final long serialVersionUID = 3096209368650710385L;
28
29    //private TreeCacheMBean cache;
30
private CacheImpl cache;
31
32    /**
33     * @throws RemoteException
34     */

35    //public RemoteTreeCacheImpl(TreeCacheMBean cache) throws RemoteException {
36
public RemoteTreeCacheImpl(CacheImpl cache) throws RemoteException JavaDoc
37    {
38       this.cache = cache;
39    }
40
41    /**
42     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#getChildrenNames(org.jboss.cache.Fqn)
43     */

44    public Set JavaDoc getChildrenNames(Fqn fqn) throws Exception JavaDoc, RemoteException JavaDoc
45    {
46       return this.cache.getChildrenNames(fqn);
47    }
48
49    /**
50     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#get(org.jboss.cache.Fqn,java.lang.Object)
51     */

52    public Object JavaDoc get(Fqn name, Object JavaDoc key) throws Exception JavaDoc, RemoteException JavaDoc
53    {
54       return this.cache.get(name, key);
55    }
56
57    /**
58     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#get(org.jboss.cache.Fqn)
59     */

60    public Node get(Fqn name) throws Exception JavaDoc, RemoteException JavaDoc
61    {
62       return this.cache.get(name);
63    }
64
65    /**
66     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#exists(org.jboss.cache.Fqn)
67     */

68    public boolean exists(Fqn name) throws Exception JavaDoc, RemoteException JavaDoc
69    {
70       return this.cache.exists(name);
71    }
72
73    /**
74     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#put(org.jboss.cache.Fqn,java.lang.Object,java.lang.Object)
75     */

76    public Object JavaDoc put(Fqn name, Object JavaDoc key, Object JavaDoc value) throws Exception JavaDoc, RemoteException JavaDoc
77    {
78       return this.cache.put(name, key, value);
79    }
80
81    /**
82     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#put(org.jboss.cache.Fqn,java.util.Map)
83     */

84    public void put(Fqn name, Map JavaDoc attributes) throws Exception JavaDoc, RemoteException JavaDoc
85    {
86       this.cache.put(name, attributes);
87    }
88
89    /**
90     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#remove(org.jboss.cache.Fqn,java.lang.Object)
91     */

92    public Object JavaDoc remove(Fqn name, Object JavaDoc key) throws Exception JavaDoc, RemoteException JavaDoc
93    {
94       return this.cache.remove(name, key);
95    }
96
97    /**
98     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#remove(org.jboss.cache.Fqn)
99     */

100    public void remove(Fqn name) throws Exception JavaDoc, RemoteException JavaDoc
101    {
102       this.cache.remove(name);
103    }
104
105    /**
106     * @see org.jboss.cache.loader.rmi.RemoteTreeCache#removeData(org.jboss.cache.Fqn)
107     */

108    public void removeData(Fqn name) throws Exception JavaDoc, RemoteException JavaDoc
109    {
110       this.cache.removeData(name);
111    }
112 }
113
Popular Tags