KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > regis > remote > client > RemoteRegistryProxy


1 package org.sapia.regis.remote.client;
2
3 import java.rmi.RemoteException JavaDoc;
4 import java.util.Properties JavaDoc;
5
6 import org.sapia.regis.Configurable;
7 import org.sapia.regis.Node;
8 import org.sapia.regis.Path;
9 import org.sapia.regis.RegisSession;
10 import org.sapia.regis.Registry;
11
12 public class RemoteRegistryProxy implements Registry, Configurable{
13
14   private Registry _remote;
15   private static RemoteSessionProxy _shared = new RemoteSessionProxy();
16
17   RemoteRegistryProxy(Registry remote){
18     _remote = remote;
19   }
20   
21   public Node getRoot() {
22     return _remote.getRoot();
23   }
24   
25   public RegisSession open() {
26     return _shared;
27   }
28   
29   public void close() {
30     // noop
31
}
32   
33   public void syncLoad(Path path, String JavaDoc username, String JavaDoc password, String JavaDoc xmlConf, Properties JavaDoc props) throws RemoteException JavaDoc, Exception JavaDoc {
34     ((Configurable)_remote).syncLoad(path, username, password, xmlConf, props);
35   }
36   
37   public void load(Path path, String JavaDoc username, String JavaDoc password, String JavaDoc xmlConf, Properties JavaDoc props) throws RemoteException JavaDoc, Exception JavaDoc {
38     ((Configurable)_remote).load(path, username, password, xmlConf, props);
39   }
40 }
41
Popular Tags