You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/05/16 15:52:07 UTC

svn commit: r406944 [10/30] - in /incubator/harmony/enhanced/classlib/trunk/modules/rmi2: ./ build/ doc/ doc/testing/ doc/testing/rmi http tunneling/ doc/testing/rmi http tunneling/Results - ITC/ doc/testing/rmi http tunneling/Results - SUN/ doc/testin...

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCalculatorServerBI.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCalculatorServerBI.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCalculatorServerBI.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCalculatorServerBI.java Tue May 16 06:51:00 2006
@@ -0,0 +1,34 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.logging.Logger;
+
+public class RemoteCalculatorServerBI {
+
+    private static Logger logger = 
+        Logger.getAnonymousLogger();
+    
+    public static void main(String[] args) {
+    	
+        System.setProperty("sun.rmi.transport.logLevel", "VERBOSE");
+        System.setProperty("sun.rmi.transport.tcp.logLevel", "VERBOSE");
+      
+        Registry localRegistry = null;
+        try {
+            localRegistry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
+        } catch (RemoteException e) {
+            e.printStackTrace();
+        }
+        
+        try {
+            RemoteCalculatorBI rc = new RemoteCalculatorBI();
+            localRegistry.rebind(RemoteCalculatorBI.SERVICENAME,rc);
+            logger.info("RemoteCalculator Server Ready.");
+        } catch (RemoteException e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipher.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipher.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipher.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipher.java Tue May 16 06:51:00 2006
@@ -0,0 +1,15 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.io.Serializable;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface RemoteCipher<T extends Serializable> extends Remote {
+
+	public byte[] encipher(T s) throws RemoteException;
+	public T decipher(byte[] b) throws RemoteException;
+	public byte[][] encipher(T[] s) throws RemoteException;
+	public T[] decipher(byte[][] b) throws RemoteException;
+	
+	public Class getTClass() throws RemoteException;
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipherImpl.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipherImpl.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipherImpl.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteCipherImpl.java Tue May 16 06:51:00 2006
@@ -0,0 +1,103 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.math.BigInteger;
+import java.rmi.RemoteException;
+import java.security.GeneralSecurityException;
+import java.security.Key;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+
+
+public class RemoteCipherImpl implements RemoteCipher<BigInteger> {
+
+	private Cipher encipher;
+	private Cipher decipher;
+	
+	private final BigInteger deserialization(byte[] b) throws IOException,
+	ClassNotFoundException {
+		ByteArrayInputStream bais = new ByteArrayInputStream(b);
+		ObjectInputStream ois = new ObjectInputStream(bais);
+		BigInteger result = (BigInteger) ois.readObject();
+		ois.close();
+		return result;
+	}
+	
+	private final byte[] serialization(BigInteger object) throws IOException {
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		ObjectOutputStream oos = new ObjectOutputStream(baos);
+		oos.writeObject(object);
+		oos.close();
+		return baos.toByteArray();
+	}
+	static public Cipher getCipher(int mode) {
+		Cipher cipher;
+		try {
+			cipher = Cipher.getInstance("DES/CFB8/NoPadding", "SunJCE");
+			byte[] password = new byte[] {(byte)1, (byte)24, (byte)234, (byte)345, (byte)23, (byte)432, (byte)3, (byte)43};
+			Key key = SecretKeyFactory.getInstance("DES").translateKey(
+					new SecretKeySpec(password, "DES"));
+			cipher.init(mode, key, new IvParameterSpec(password));
+		} catch (GeneralSecurityException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
+		}
+		return cipher;
+	}
+	
+	public RemoteCipherImpl() {
+		super();
+		encipher = getCipher(Cipher.ENCRYPT_MODE);
+		decipher = getCipher(Cipher.DECRYPT_MODE);
+	}
+
+	public byte[] encipher(BigInteger s) throws RemoteException {
+		try {
+			return encipher.update(serialization(s));
+		} catch (IOException e) {
+			throw new RemoteException(e.getMessage());
+		}
+	}
+
+	public byte[][] encipher(BigInteger[] s) throws RemoteException {
+		byte[][] result;
+		result = new byte[s.length][];
+		for (int i=s.length; i-- > 0;) {
+			result[i] = encipher(s[i]);
+		}	
+		return result;
+	}
+
+	public BigInteger decipher(byte[] b) throws RemoteException {
+		try {
+			return deserialization(decipher.update(b));
+		} catch (IOException e) {
+			throw new RemoteException(e.getMessage());
+		} catch (ClassNotFoundException e) {
+			throw new RemoteException(e.getMessage());
+		}	
+	}
+
+	public BigInteger[] decipher(byte[][] b) throws RemoteException {
+		BigInteger[] result;
+		result = new BigInteger[b.length];
+		for (int i=b.length; i-- > 0;) {
+			result[i] = decipher(b[i]);
+		}	
+		return result;
+	}
+
+	public Class getTClass() throws RemoteException {
+		return BigInteger.class;
+	}
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashClient.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashClient.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashClient.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashClient.java Tue May 16 06:51:00 2006
@@ -0,0 +1,163 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.RMISocketFactory;
+import java.util.logging.Logger;
+
+import ar.org.fitc.test.rmi.tunneling.testrunner.Util;
+
+public class RemoteHashClient {
+
+    private static Logger logger = Logger.getAnonymousLogger();
+    
+    private static boolean checkPopulatedHashMap(String[] data, String[] key,
+            String addr, RemoteMap remoteMap) {
+        for (int i = 0; i < key.length; i++) {
+            if (!getCall(key[i], addr, remoteMap).equals(data[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private static String getCall(String pattern, String addr,
+            RemoteMap remoteMap) {
+        String value = null;
+        try {
+            value = (String) remoteMap.get(pattern);
+
+            if (value != null)
+                logger.info("RemoteMapClient found at " + addr
+                        + ", value=" + value);
+            else
+                logger.info("RemoteMapClient could not find key " + addr
+                        + ".");
+
+        } catch (RemoteException e) {
+            logger.info("RemoteMapClient problem with " + addr
+                    + ", exception:\n   " + e);
+            e.printStackTrace();
+        }
+        return value;
+    }
+
+    /*
+     * arg[0] ---> mode
+     * arg[1] ---> proxy ip number
+     * arg[2] ---> proxy port number
+     * arg[3] ---> client ip number
+     * arg[4] ---> rmi package supplier
+     * 
+     */
+    
+    public static void main(String[] args) {
+        
+        if (args.length != 5) {
+            System.err.println("5 Parameters needed...");
+            System.exit(1);
+        }
+
+        System.setProperty("sun.rmi.transport.logLevel", "VERBOSE");
+        System.setProperty("sun.rmi.transport.tcp.logLevel", "VERBOSE");
+        System.setProperty("sun.rmi.transport.tcp.readTimeout", "1000");
+
+        System.setProperty("http.proxyHost",args[1]);
+        System.setProperty("http.proxyPort",args[2]);        
+        
+        if (args[4].equalsIgnoreCase("sun")) {
+            try {
+                RMISocketFactory.setSocketFactory(Util.getSunSocketFactory(args[0]));
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+        } else if (args[4].equalsIgnoreCase("itc")) {
+            Util.setITCSocketFactoryMode(args[0]);
+        }
+        
+        String addr = args[3];
+        if (addr == null) {
+            addr = "10.100.2.246"; 
+        }
+
+        RemoteMap remoteMap = null;
+        Registry remoteRegistry = null;
+
+        String[] numbers = { "one", "two", "three", "four", "five", "six",
+                "seven" };
+        
+        String[] data = { "pride", "envy", "gluttony", "lust", "anger",
+                "greed", "sloth" };
+
+        try {
+                System.out
+                        .println("RemoteMapClient locating RMI registry on remote host \""
+                                + addr + "\".");
+                remoteRegistry = LocateRegistry.getRegistry(addr);
+                logger.info("RemoteMapClient looking up service \""
+                        + RemoteMap.SERVICENAME + "\".");
+                remoteMap = (RemoteMap) remoteRegistry
+                        .lookup(RemoteMap.SERVICENAME);
+        } catch (Exception e) {
+            System.out
+                    .println("RemoteMapClient problem with RemoteMap, exception:\n   "
+                            + e);
+        }
+
+        if (populateHashMap(data, numbers, addr, remoteMap)) {
+            System.out
+                    .println("RemoteMapClient HashMap successfully populated...");
+        }
+
+        // getCall("one",addr,remoteMap);
+        if (data.length == sizeCall(remoteMap)) {
+            logger.info("RemoteMapClient HashMap size correct...");
+        }
+
+        if (checkPopulatedHashMap(data, numbers, addr, remoteMap)) {
+            logger.info("RemoteMapClient HashMap check passed...");
+        }
+    }
+
+    private static boolean populateHashMap(String[] data, String[] key,
+            String addr, RemoteMap remoteMap) {
+        boolean retval = false;
+        for (int i = 0; i < data.length; i++) {
+            System.out.println(data[i]);
+            retval = putCall(key[i], data[i], addr, remoteMap);
+        }
+        return retval;
+    }
+
+    private static boolean putCall(String pattern1, String pattern2,
+            String addr, RemoteMap remoteMap) {
+        try {
+            logger.info("RemoteMapClient inserting on " + addr + " key="
+                    + pattern1 + ", value=" + pattern2);
+            remoteMap.put(pattern1, pattern2);
+
+        } catch (RemoteException e) {
+            logger.info("RemoteMapClient problem with " + addr
+                    + ", exception:\n   " + e);
+            e.printStackTrace();
+            return false;
+        }
+        return true;
+    }
+
+    private static int sizeCall(RemoteMap remoteMap) {
+        int retval = -1;
+        try {
+            retval = remoteMap.size();
+            logger.info("RemoteMapClient HashMap size: " + retval);
+
+        } catch (RemoteException e) {
+            e.printStackTrace();
+            return retval;
+        }
+        return retval;
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashServer.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashServer.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashServer.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteHashServer.java Tue May 16 06:51:00 2006
@@ -0,0 +1,39 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Hashtable;
+import java.util.logging.Logger;
+
+public class RemoteHashServer {
+
+    private static Logger logger = 
+        Logger.getAnonymousLogger();
+    
+    public static void main(String[] args) {
+    
+        try {
+            System.setProperty("sun.rmi.transport.logLevel", "VERBOSE");
+            System.setProperty("sun.rmi.transport.tcp.logLevel", "VERBOSE");
+            System.setProperty("sun.rmi.transport.tcp.readTimeout", "1000");
+            
+            logger.info("RemoteMapServer creating a local RMI registry on the default port.");
+            Registry localRegistry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT );
+
+            logger.info("RemoteMapServer creating local object and remote adapter.");
+            Hashtable hash = new Hashtable();
+            RemoteMapAdapter adapter = new RemoteMapAdapter( hash );
+
+            logger.info("RemoteMapServer publishing service \"" + RemoteMap.SERVICENAME + "\" in local registry.");
+            localRegistry.rebind( RemoteMap.SERVICENAME, adapter );
+
+            logger.info("Published RemoteMap as service \"" + RemoteMap.SERVICENAME + "\". Ready.");
+         } catch (RemoteException e) {
+            logger.fine("RemoteMapServer problem with remote object, exception:\n   " + e);
+         }
+
+    }
+    
+    
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMap.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMap.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMap.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMap.java Tue May 16 06:51:00 2006
@@ -0,0 +1,25 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface RemoteMap extends Remote {
+
+    public static final String SERVICENAME = "RemoteHashMap";
+
+    public int size() throws RemoteException;
+
+    public boolean isEmpty() throws RemoteException;
+
+    public boolean containsKey(Object key) throws RemoteException;
+
+    public boolean containsValue(Object value) throws RemoteException;
+
+    public Object get(Object key) throws RemoteException;
+
+    public Object put(Object key, Object value) throws RemoteException;
+
+    public Object remove(Object key) throws RemoteException;
+
+    public void clear() throws RemoteException;
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMapAdapter.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMapAdapter.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMapAdapter.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/integration/RemoteMapAdapter.java Tue May 16 06:51:00 2006
@@ -0,0 +1,65 @@
+package ar.org.fitc.test.rmi.tunneling.integration;
+
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.Hashtable;
+
+
+public class RemoteMapAdapter extends UnicastRemoteObject implements RemoteMap {
+
+    private static final long serialVersionUID = 1L;
+
+    private int getCalls = 0;
+
+    protected Hashtable hashMap;
+
+    private int putCalls = 0;
+
+    public RemoteMapAdapter(Hashtable table) throws RemoteException {
+        this.hashMap = table;
+    }
+
+    public synchronized void clear() throws RemoteException {
+        hashMap.clear();
+    }
+
+    public boolean containsKey(Object key) throws RemoteException {
+        return hashMap.containsKey(key);
+    }
+
+    public boolean containsValue(Object value) throws RemoteException {
+        return hashMap.contains(value);
+    }
+
+    public synchronized Object get(Object key) throws RemoteException {
+        getCalls++;
+        printStatus();
+        return hashMap.get(key);
+    }
+
+    public boolean isEmpty() throws RemoteException {
+        return hashMap.isEmpty();
+    }
+
+    private void printStatus() {
+        System.out.println("Internal HashMap Status... Timestamp: "
+                + System.currentTimeMillis());
+        System.out.println("get() called " + getCalls + " time(s)..");
+        System.out.println("put() called " + putCalls + " time(s)");
+    }
+
+    public synchronized Object put(Object key, Object value)
+            throws RemoteException {
+        putCalls++;
+        printStatus();
+        return hashMap.put(key, value);
+    }
+
+    public synchronized Object remove(Object key) throws RemoteException {
+        return hashMap.remove(key);
+    }
+
+    public int size() throws RemoteException {
+        return hashMap.size();
+    }
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/FallbackTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/FallbackTest.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/FallbackTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/FallbackTest.java Tue May 16 06:51:00 2006
@@ -0,0 +1,24 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+
+import java.io.IOException;
+import java.net.*;
+
+public class FallbackTest {
+    public static void main(String[] args) {
+        URL url = null;
+        try {
+            url = new URL("http://10.100.2.246:1099");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        
+        Proxy prox = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("90.0.0.1", 3128));
+
+        try {
+            url.openConnection(prox);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+}
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientITCDirect.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientITCDirect.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientITCDirect.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientITCDirect.java Tue May 16 06:51:00 2006
@@ -0,0 +1,10 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+
+import ar.org.fitc.test.rmi.tunneling.integration.RemoteCalculatorClient;
+
+public class RemoteCalculatorClientITCDirect {
+    public static void main(String[] args) {
+        String[] data = {"direct","90.0.0.1","3128","10.100.2.246","itc"};
+        RemoteCalculatorClient.main(data);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunDirect.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunDirect.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunDirect.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunDirect.java Tue May 16 06:51:00 2006
@@ -0,0 +1,12 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+
+import ar.org.fitc.test.rmi.tunneling.integration.RemoteCalculatorClient;
+
+public class RemoteCalculatorClientSunDirect {
+
+    public static void main(String[] args) {
+        String[] data = {"direct","90.0.0.1","3128","10.100.2.246","sun"};
+        RemoteCalculatorClient.main(data);
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpCgi.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpCgi.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpCgi.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpCgi.java Tue May 16 06:51:00 2006
@@ -0,0 +1,12 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+
+import ar.org.fitc.test.rmi.tunneling.integration.RemoteCalculatorClient;
+
+public class RemoteCalculatorClientSunHttpCgi {
+
+    public static void main(String[] args) {
+        String[] data = {"cgi","90.0.0.1","3128","10.100.2.246","sun"};
+        RemoteCalculatorClient.main(data);
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpDirect.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpDirect.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpDirect.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/RemoteCalculatorClientSunHttpDirect.java Tue May 16 06:51:00 2006
@@ -0,0 +1,12 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+
+import ar.org.fitc.test.rmi.tunneling.integration.RemoteCalculatorClient;
+
+public class RemoteCalculatorClientSunHttpDirect {
+
+    public static void main(String[] args) {
+        String[] data = {"http","90.0.0.1","3128","10.100.2.246","sun"};
+        RemoteCalculatorClient.main(data);
+    }
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/Util.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/Util.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/Util.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/test/rmi/tunneling/testrunner/Util.java Tue May 16 06:51:00 2006
@@ -0,0 +1,40 @@
+package ar.org.fitc.test.rmi.tunneling.testrunner;
+import java.rmi.server.RMISocketFactory;
+
+import sun.rmi.transport.proxy.RMIDirectSocketFactory;
+import sun.rmi.transport.proxy.RMIHttpToCGISocketFactory;
+import sun.rmi.transport.proxy.RMIHttpToPortSocketFactory;
+
+public class Util {
+
+    private Util() {
+        
+    }
+    
+    public static RMISocketFactory getSunSocketFactory(String type) {
+        if (type.equalsIgnoreCase("default")) {
+            System.out.println("No forced SocketFactory, enabled DefaultSocketFactory supporting Fallback mode");
+            return new RMIDirectSocketFactory();
+        } else if (type.equalsIgnoreCase("cgi")) {
+            System.out.println("RMIToCGISocketFactory enabled...");
+            return new RMIHttpToCGISocketFactory();    
+        } else if (type.equalsIgnoreCase("http")) {
+            System.out.println("RMIHttpToPortSocketFactory enabled...");
+            return new RMIHttpToPortSocketFactory();
+        } else if (type.equalsIgnoreCase("direct")) {
+            System.out.println("RMIDirectSocketFactory enabled...");
+            return new RMIDirectSocketFactory();
+        }
+        return new RMIDirectSocketFactory(); // if null returns default socket factory
+    }
+
+    public static void setITCSocketFactoryMode(String string) {
+        if (string.equalsIgnoreCase("cgi")) {
+            System.setProperty("ar.org.fitc.rmi.transport.proxy.httpToCgiOnly","true");
+        } else if (string.equalsIgnoreCase("http")) {
+            System.setProperty("ar.org.fitc.rmi.transport.proxy.httpToPortOnly","true");
+        } // anything else should use the default socket factory
+        
+    }
+    
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/dependencies/junit.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/dependencies/junit.jar?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/dependencies/junit.jar
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/dependencies/junit.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/RefTaglet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/RefTaglet.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/RefTaglet.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/RefTaglet.java Tue May 16 06:51:00 2006
@@ -0,0 +1,167 @@
+package doctools;
+
+import com.sun.tools.doclets.Taglet;
+import com.sun.javadoc.*;
+import java.util.Map;
+
+/**
+ * A sample Taglet representing @todo. This tag can be used in any kind of
+ * {@link com.sun.javadoc.Doc}.  It is not an inline tag. The text is displayed
+ * in yellow to remind the developer to perform a task.  For
+ * example, "@todo Fix this!" would be shown as:
+ * <DL>
+ * <DT>
+ * <B>To Do:</B>
+ * <DD><table cellpadding=2 cellspacing=0><tr><td bgcolor="yellow">Fix this!
+ * </td></tr></table></DD>
+ * </DL>
+ *
+ * @author Jamie Ho
+ * @since 1.4
+ */
+
+public class RefTaglet implements Taglet {
+    
+    private static final String NAME = "ar.org.fitc.ref";
+    private static final String HEADER = "References:";
+    private static UrlTaglet urlTaglet = new UrlTaglet();
+    
+    /**
+     * Return the name of this custom tag.
+     */
+    public String getName() {
+        return NAME;
+    }
+    
+    /**
+     * Will return false since <code>@ar.org.fitc.spec_ref</code>
+     * can not be used in field documentation.
+     * @return false since <code>@ar.org.fitc.spec_ref</code>
+     * can not be used in field documentation.
+     */
+    public boolean inField() {
+        return false;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in constructor documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in constructor documentation and false
+     * otherwise.
+     */
+    public boolean inConstructor() {
+        return true;
+    }
+    
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation and false
+     * otherwise.
+     */
+    public boolean inMethod() {
+        return true;
+    }
+    
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in overview documentation and false
+     * otherwise.
+     */
+    public boolean inOverview() {
+        return true;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in package documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in package documentation and false
+     * otherwise.
+     */
+    public boolean inPackage() {
+        return true;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in type documentation (classes or interfaces).
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in type documentation and false
+     * otherwise.
+     */
+    public boolean inType() {
+        return true;
+    }
+    
+    /**
+     * Will return false since <code>@ar.org.fitc.spec_ref</code>
+     * is not an inline tag.
+     * @return false since <code>@ar.org.fitc.spec_ref</code>
+     * is not an inline tag.
+     */
+    
+    public boolean isInlineTag() {
+        return false;
+    }
+    
+    /**
+     * Register this Taglet.
+     * @param tagletMap  the map to register this tag to.
+     */
+    public static void register(Map tagletMap) {
+       RefTaglet tag = new RefTaglet();
+       Taglet t = (Taglet) tagletMap.get(tag.getName());
+       if (t != null) {
+           tagletMap.remove(tag.getName());
+       }
+       tagletMap.put(tag.getName(), tag);
+    }
+
+    private String format(Tag tag){
+    	String ret = "";
+    	for (Tag inlineTag:tag.inlineTags()){
+    		if (inlineTag.name().equals("@"+urlTaglet.getName())){
+    				ret += urlTaglet.toString(inlineTag);
+    		} else
+    			ret += inlineTag.text();
+    	}
+    	return String.format("<li>%s</li>\n",ret);
+    }
+    
+    /**
+     * Given the <code>Tag</code> representation of this custom
+     * tag, return its string representation.
+     * @param tag   the <code>Tag</code> representation of this custom tag.
+     */
+    public String toString(Tag tag) {
+        String ret = "";
+        if (tag.text()!= null && tag.text().length() > 0){
+        	ret = String.format("<DT><B>%s</B><DD><ul>%s</ul>", HEADER,format(tag));
+        }
+        return ret;
+    }
+    
+    
+    /**
+     * Given an array of <code>Tag</code>s representing this custom
+     * tag, return its string representation.
+     * @param tags  the array of <code>Tag</code>s representing of this custom tag.
+     */
+    public String toString(Tag[] tags) {
+        String ret = null;
+        for (Tag tag: tags)
+        	if (tag.text()!= null && tag.text().length() > 0){
+        		if (ret == null)
+        			ret = String.format("<DT><B>%s</B><DD><ul>", HEADER);
+        		ret += format(tag);
+        	}
+        return ret == null ? "" : ret + "</ul>";
+    }
+}
+
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/RefTaglet.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/SpecRefTaglet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/SpecRefTaglet.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/SpecRefTaglet.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/SpecRefTaglet.java Tue May 16 06:51:00 2006
@@ -0,0 +1,181 @@
+package doctools;
+
+import com.sun.tools.doclets.Taglet;
+import com.sun.javadoc.*;
+
+import java.util.Map;
+
+/**
+ * A sample Taglet representing @todo. This tag can be used in any kind of
+ * {@link com.sun.javadoc.Doc}.  It is not an inline tag. The text is displayed
+ * in yellow to remind the developer to perform a task.  For
+ * example, "@todo Fix this!" would be shown as:
+ * <DL>
+ * <DT>
+ * <B>To Do:</B>
+ * <DD><table cellpadding=2 cellspacing=0><tr><td bgcolor="yellow">Fix this!
+ * </td></tr></table></DD>
+ * </DL>
+ *
+ * @author Jamie Ho
+ * @author Diego Raúl Mercado (bug fixes)
+ * @since 1.4
+ */
+
+public class SpecRefTaglet implements Taglet {
+    
+    private static final String NAME = "ar.org.fitc.spec_ref";
+    private static final String HEADER = "Spec reference:";
+    private static final String BASE_URL = "http://java.sun.com/j2se/1.5.0/docs/api/";
+    
+    /**
+     * Return the name of this custom tag.
+     */
+    public String getName() {
+        return NAME;
+    }
+    
+    /**
+     * Will return false since <code>@ar.org.fitc.spec_ref</code>
+     * can not be used in field documentation.
+     * @return false since <code>@ar.org.fitc.spec_ref</code>
+     * can not be used in field documentation.
+     */
+    public boolean inField() {
+        return true;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in constructor documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in constructor documentation and false
+     * otherwise.
+     */
+    public boolean inConstructor() {
+        return true;
+    }
+    
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation and false
+     * otherwise.
+     */
+    public boolean inMethod() {
+        return true;
+    }
+    
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in method documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in overview documentation and false
+     * otherwise.
+     */
+    public boolean inOverview() {
+        return true;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in package documentation.
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in package documentation and false
+     * otherwise.
+     */
+    public boolean inPackage() {
+        return true;
+    }
+
+    /**
+     * Will return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in type documentation (classes or interfaces).
+     * @return true since <code>@ar.org.fitc.spec_ref</code>
+     * can be used in type documentation and false
+     * otherwise.
+     */
+    public boolean inType() {
+        return true;
+    }
+    
+    /**
+     * Will return false since <code>@ar.org.fitc.spec_ref</code>
+     * is not an inline tag.
+     * @return false since <code>@ar.org.fitc.spec_ref</code>
+     * is not an inline tag.
+     */
+    
+    public boolean isInlineTag() {
+        return false;
+    }
+    
+    /**
+     * Register this Taglet.
+     * @param tagletMap  the map to register this tag to.
+     */
+    public static void register(Map tagletMap) {
+       SpecRefTaglet tag = new SpecRefTaglet();
+       Taglet t = (Taglet) tagletMap.get(tag.getName());
+       if (t != null) {
+           tagletMap.remove(tag.getName());
+       }
+       tagletMap.put(tag.getName(), tag);
+    }
+
+    /**
+     * Given the <code>Tag</code> representation of this custom
+     * tag, return its string representation.
+     * @param tag   the <code>Tag</code> representation of this custom tag.
+     */
+    public String toString(Tag tag) {
+        Doc holder = tag.holder(); 
+        String holderString = holder.toString(); 
+        String holderName = holder.name(); 
+        String url = BASE_URL;
+
+        if (holder.isField()) {
+            url += holderString.substring(0,holderString.lastIndexOf(".")).replace(".", "/") 
+            + ".html#" + holderString.substring(holderString.lastIndexOf(".") + 1);
+        } else if (holder.isClass()) {
+            //BUG FIXED: FOR NESTED CLASSES
+            if (holder.name().contains(".")) { 
+                url += holderString.substring(0, holderString.lastIndexOf(holderName)).
+                        replace('.', '/') + holderName + ".html";
+            } else {
+                url += holderString.replace('.','/') + ".html";    
+            }
+        } else if (holder.isMethod() || holder.isConstructor()){
+            int i = holderString.indexOf(holderName+"(");
+            url += holderString.substring(0,i-1).replace('.','/') 
+            + (holder.isConstructor() ? "/" + holderName : "") +".html#" + holderString.substring(i);
+        } 
+        
+        String ret = String.format("<DT><B>%s</B><DD>"
+                + "<table cellpadding=2 cellspacing=0><tr><td>"
+                + "See corresponding <a href=\"%s\">J2SE API specification reference</a>"
+                + "</td></tr></table></DD>\n"
+                , HEADER, url);
+        
+        if (tag.text()!= null && tag.text().length() > 0)
+            ret += String.format("<DT><B>%s</B><DD>"
+               + "<table cellpadding=2 cellspacing=0><tr><td>%s</td></tr></table></DD>\n",
+               "Clarification:", tag.text());       
+        return ret;
+    }
+    
+    /**
+     * Given an array of <code>Tag</code>s representing this custom
+     * tag, return its string representation.
+     * @param tags  the array of <code>Tag</code>s representing of this custom tag.
+     */
+    public String toString(Tag[] tags) {
+        if (tags.length == 0) {
+            return null;
+        }
+        return toString(tags[0]);
+    }
+}
+
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/SpecRefTaglet.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/UrlTaglet.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/UrlTaglet.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/UrlTaglet.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/UrlTaglet.java Tue May 16 06:51:00 2006
@@ -0,0 +1,67 @@
+package doctools;
+
+import java.util.Map;
+import com.sun.javadoc.Tag;
+import com.sun.tools.doclets.Taglet;
+
+public class UrlTaglet implements Taglet {
+	public static final String NAME = "ar.org.fitc.url";
+
+	public boolean inField() {
+		return false;
+	}
+
+	public boolean inConstructor() {
+		return false;
+	}
+
+	public boolean inMethod() {
+		return false;
+	}
+
+	public boolean inOverview() {
+		return false;
+	}
+
+	public boolean inPackage() {
+		return false;
+	}
+
+	public boolean inType() {
+		return false;
+	}
+
+	public boolean isInlineTag() {
+		return true;
+	}
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String toString(Tag tag) {
+		String url = tag.text().contains("://") ? tag.text() : "http://" + tag.text();
+		String[] components = url.split("\\s+",2);
+		if (components.length == 1)
+			return String.format("&lt;<a href=%s>%s</a>&gt;",url,url);
+		if (components[1].startsWith("\"") && components[1].endsWith("\""))
+			return String.format("\"<a href=%s>%s</a>\"",components[0],components[1].substring(1,components[1].length()-1));
+		else
+			return String.format("<a href=%s>%s</a>",components[0],components[1]);			
+	}
+
+	public String toString(Tag[] tags) {
+		return null;
+	}
+    
+	public static void register(Map tagletMap) {
+        UrlTaglet tag = new UrlTaglet();
+        Taglet t = (Taglet) tagletMap.get(tag.getName());
+        if (t != null) {
+            tagletMap.remove(tag.getName());
+        }
+        tagletMap.put(tag.getName(), tag);
+     }
+
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/doctools/UrlTaglet.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AccessException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AccessException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AccessException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AccessException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class AccessException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 6314925228044966088L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public AccessException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public AccessException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AlreadyBoundException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AlreadyBoundException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AlreadyBoundException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/AlreadyBoundException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class AlreadyBoundException extends Exception {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 9218657361741657110L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public AlreadyBoundException() {
+        super();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public AlreadyBoundException(String s) {
+        super(s);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class ConnectException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 4863550261346652506L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ConnectException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ConnectException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectIOException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectIOException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectIOException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ConnectIOException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class ConnectIOException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -8087809532704668744L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ConnectIOException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ConnectIOException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class MarshalException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 6223554758134037936L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public MarshalException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public MarshalException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalledObject.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalledObject.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalledObject.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/MarshalledObject.java Tue May 16 06:51:00 2006
@@ -0,0 +1,63 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public final class MarshalledObject implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 8988374069173025854L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public MarshalledObject(Object obj) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public int hashCode() {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public boolean equals(Object obj) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public Object get() throws IOException, ClassNotFoundException {
+        throw new UnsupportedOperationException();
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Naming.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Naming.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Naming.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Naming.java Tue May 16 06:51:00 2006
@@ -0,0 +1,176 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.rmi.registry.Registry;
+import java.rmi.registry.LocateRegistry;
+import java.net.URI;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ * This class contains static methods which have the same names as 
+ * methods were defined in the Registry Interface. It handles a 
+ * String in an URL format (without the scheme component). The URL 
+ * is parsed and the host/port information is forwarded to 
+ * LocateRegistry. Naming uses the stub returned by LocateRegistry 
+ * to invoke the correct method on the registry. 
+ *
+ * @author Marcelo Arcidiacono
+ */
+public class Naming  {
+	
+	/**
+	 * @ar.org.fitc.spec_ref
+	 *
+	 */
+    public static String[] list(String name) throws RemoteException, 
+    		MalformedURLException {
+    	
+    	URI uri = nameParseURI(name);
+    	Registry reg = getRegistry(uri);
+    	String[] result = new String[reg.list().length];
+    	for(int i = 0; i < reg.list().length; i++) {
+    		result[i] = "//" + uri.getHost() + ":" + uri.getPort() 
+    				  + "/" + reg.list()[i];
+    	}
+    	return result;
+    }
+
+    /**
+	 * @ar.org.fitc.spec_ref
+	 *
+	 */
+    public static Remote lookup(String name) throws NotBoundException, 
+    		MalformedURLException, RemoteException {
+    	Remote rem;
+    	
+    	URI uri = nameParseURI(name);
+    	Registry reg = getRegistry(uri);
+    	try {
+    		rem = reg.lookup(uri.getPath().substring(1));
+    	} catch(NotBoundException nbe){
+    		throw new NotBoundException("The key " + name + " is not currently bound.");
+    	}
+    	return rem;
+    }
+
+    /**
+	 * @ar.org.fitc.spec_ref
+	 *
+	 */
+    public static void bind(String name, Remote obj) throws AlreadyBoundException, 
+    		MalformedURLException, RemoteException {
+        
+    	URI uri = nameParseURI(name);
+    	Registry reg = getRegistry(uri);
+    	try {
+    		reg.bind(uri.getPath().substring(1),obj);
+    	} catch(AlreadyBoundException abe){
+    		throw new AlreadyBoundException ("The key " + name + " already exists."); 
+    	}
+    }
+    
+    /**
+	 * @ar.org.fitc.spec_ref
+	 *
+	 */
+    public static void rebind(String name, Remote obj) throws RemoteException, 
+    		MalformedURLException {
+    	
+    	URI uri = nameParseURI(name);
+    	Registry reg = getRegistry(uri);
+    	reg.rebind(uri.getPath().substring(1),obj);
+    }
+    
+    /**
+	 * @ar.org.fitc.spec_ref
+	 *
+	 */
+    public static void unbind(String name) throws RemoteException, 
+    		NotBoundException, MalformedURLException {
+    	
+    	URI uri = nameParseURI(name);
+    	Registry reg = getRegistry(uri);
+    	try {
+    		reg.unbind(uri.getPath().substring(1));
+    	} catch(NotBoundException nbe){
+			throw new NotBoundException("The key " + name + " is not courrently bound.");
+    	}
+    }
+    
+
+    /**
+     * Returns a reference to the remote object Registry on the specified 
+     * host and port.
+     * 
+     * @param uri that contains the specified host and port
+     * @return a reference to the remote object Registry
+     * @throws RemoteException if the reference could not be created
+     */
+    private static Registry getRegistry(URI uri) throws RemoteException {
+    	
+    	return LocateRegistry.getRegistry(uri.getHost(), uri.getPort());    	
+    }	
+    	
+    
+  
+    /**
+     * Parses a string in an URL format without the scheme component 
+     * and set it to an URI format. If the host is not defined, the 
+     * default host is the localhost. If the port is not defined the 
+     * default port is 1099.
+     * 
+     * @param name a string in URL format (without the scheme component)
+     * @return an URI without the scheme component with the host and port in
+     * explicit way  
+     * @throws MalformedURLException if the name should be in invalid URL form
+     */
+    private static URI nameParseURI (String name) throws MalformedURLException {
+    	URI uri;
+    	URL url;
+    	String path;
+    	    	
+    	try {
+    		uri = new URI(name.trim());
+    	} catch (URISyntaxException e) {
+    		throw new MalformedURLException("invalid URL string: " + name);
+    	}
+    	if(uri.getScheme()!=null) {
+    		throw new MalformedURLException("invalid URL scheme: " + name);
+    	} else {
+    		try {				 
+    			url = new URL ("http:" + name.trim());
+    			if (url.getFile().equals(url.getPath())) {
+					path = (uri.getPath().startsWith("/")) 
+					     ?  uri.getPath() 
+    		             : "/" + uri.getPath();
+				} else {
+					throw new MalformedURLException("invalid character in URL name");
+				}    
+    	   		String host = (uri.getHost() != null) ? uri.getHost() : "localhost";
+				int port = (url.getPort() != -1) ? url.getPort() : Registry.REGISTRY_PORT;
+				uri = new URI(null, null, host, port, path, null, null);			
+    		} catch (URISyntaxException e) {
+    			e.getStackTrace(); 	// This exception should never happen.
+    		}
+    	}	
+		return uri;
+    }
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NoSuchObjectException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NoSuchObjectException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NoSuchObjectException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NoSuchObjectException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,36 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class NoSuchObjectException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 6619395951570472985L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public NoSuchObjectException(String s) {
+        super(s);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NotBoundException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NotBoundException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NotBoundException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/NotBoundException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class NotBoundException extends Exception {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -1857741824849069317L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public NotBoundException() {
+        super();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public NotBoundException(String s) {
+        super(s);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,49 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+@Deprecated
+public class RMISecurityException extends SecurityException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -8433406075740433514L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Deprecated
+    public RMISecurityException(String name) {
+        super(name);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Deprecated
+    public RMISecurityException(String name, String arg1) {
+        // Constructor
+        super(name);
+        // arg1 ignored
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityManager.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityManager.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityManager.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RMISecurityManager.java Tue May 16 06:51:00 2006
@@ -0,0 +1,31 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class RMISecurityManager extends SecurityManager {
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RMISecurityManager() {
+        super();
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Remote.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Remote.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Remote.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/Remote.java Tue May 16 06:51:00 2006
@@ -0,0 +1,24 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public interface Remote {
+
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RemoteException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RemoteException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RemoteException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/RemoteException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,65 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+import java.io.IOException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class RemoteException extends IOException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -5148567311918794206L;
+
+    public Throwable detail;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RemoteException() {
+        super();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RemoteException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RemoteException(String s, Throwable cause) {
+        super(s + "; nested exception is:\n\t"  + cause.toString());
+        this.detail = cause;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public Throwable getCause() {
+        return detail;
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerError.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerError.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerError.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerError.java Tue May 16 06:51:00 2006
@@ -0,0 +1,37 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class ServerError extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 8455284893909696482L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ServerError(String s, Error err) {
+        // Constructor
+        super(s, err);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class ServerException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -4775845313121906682L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ServerException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ServerException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerRuntimeException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerRuntimeException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerRuntimeException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/ServerRuntimeException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,36 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class ServerRuntimeException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ServerRuntimeException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/StubNotFoundException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/StubNotFoundException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/StubNotFoundException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/StubNotFoundException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class StubNotFoundException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -7088199405468872373L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public StubNotFoundException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public StubNotFoundException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnexpectedException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnexpectedException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnexpectedException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnexpectedException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class UnexpectedException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1800467484195073863L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnexpectedException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnexpectedException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnknownHostException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnknownHostException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnknownHostException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnknownHostException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class UnknownHostException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -8152710247442114228L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnknownHostException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnknownHostException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnmarshalException.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnmarshalException.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnmarshalException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/UnmarshalException.java Tue May 16 06:51:00 2006
@@ -0,0 +1,44 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class UnmarshalException extends RemoteException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 594380845140740218L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnmarshalException(String s) {
+        super(s);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public UnmarshalException(String s, Exception ex) {
+        super(s, ex);
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activatable.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activatable.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activatable.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/activation/Activatable.java Tue May 16 06:51:00 2006
@@ -0,0 +1,151 @@
+/* 
+*  Copyright 2005 The Apache Software Foundation or its licensors, as applicable. 
+* 
+*  Licensed under the Apache License, Version 2.0 (the "License"); 
+*  you may not use this file except in compliance with the License. 
+*  You may obtain a copy of the License at 
+* 
+*    http://www.apache.org/licenses/LICENSE-2.0 
+* 
+*  Unless required by applicable law or agreed to in writing, software 
+*  distributed under the License is distributed on an "AS IS" BASIS, 
+*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+*  See the License for the specific language governing permissions and 
+*  limitations under the License. 
+*/
+package java.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.NoSuchObjectException;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.RemoteServer;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public abstract class Activatable extends RemoteServer {
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected Activatable(ActivationID id, int port) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected Activatable(ActivationID id, int port,
+            RMIClientSocketFactory csf, RMIServerSocketFactory ssf) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected Activatable(String location, MarshalledObject data,
+            boolean restart, int port) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected Activatable(String location, MarshalledObject data,
+            boolean restart, int port, RMIClientSocketFactory csf,
+            RMIServerSocketFactory ssf) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static ActivationID exportObject(Remote obj, String location,
+            MarshalledObject data, boolean restart, int port)
+            throws ActivationException, RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static ActivationID exportObject(Remote obj, String location,
+            MarshalledObject data, boolean restart, int port,
+            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
+            throws ActivationException, RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Remote exportObject(Remote obj, ActivationID id, int port)
+            throws RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Remote exportObject(Remote obj, ActivationID id, int port,
+            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
+            throws RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static boolean inactive(ActivationID id)
+            throws UnknownObjectException, ActivationException, RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static boolean unexportObject(Remote obj, boolean force)
+            throws NoSuchObjectException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Remote register(ActivationDesc desc)
+            throws UnknownGroupException, ActivationException, RemoteException {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected ActivationID getID() {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static void unregister(ActivationID id)
+            throws UnknownObjectException, ActivationException, RemoteException {
+        throw new UnsupportedOperationException();
+    }
+}