1 package org.sapia.regis.remote.client; 2 3 import java.rmi.RemoteException ; 4 import java.util.Properties ; 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 } 32 33 public void syncLoad(Path path, String username, String password, String xmlConf, Properties props) throws RemoteException , Exception { 34 ((Configurable)_remote).syncLoad(path, username, password, xmlConf, props); 35 } 36 37 public void load(Path path, String username, String password, String xmlConf, Properties props) throws RemoteException , Exception { 38 ((Configurable)_remote).load(path, username, password, xmlConf, props); 39 } 40 } 41 | Popular Tags |