You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2006/05/19 08:00:56 UTC

svn commit: r407724 [1/11] - in /incubator/harmony/enhanced/classlib/trunk: make/ modules/rmi/make/ modules/rmi/src/main/java/java/rmi/ modules/rmi/src/main/java/java/rmi/registry/ modules/rmi/src/main/java/java/rmi/server/ modules/rmi/src/main/java/or...

Author: smishura
Date: Thu May 18 23:00:52 2006
New Revision: 407724

URL: http://svn.apache.org/viewvc?rev=407724&view=rev
Log:
Apply the last patch for HARMONY-471 (Integration of ITC rmi implementaion (jsr14 version))

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/
      - copied from r407183, incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/
      - copied from r407183, incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/java/rmi/
Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
    incubator/harmony/enhanced/classlib/trunk/make/properties.xml
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/make/patternset.txt
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/registry/LocateRegistry.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/ObjID.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMISocketFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObject.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObjectInvocationHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteRef.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteServer.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UnicastRemoteObject.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/DGCScheduledGC.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DGCClient.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DGCQueuePoll.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DirtyRetryTask.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DirtyTask.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/server/DGCData.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/server/DGCDataTable.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/server/DGCImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/registry/RegistryImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/registry/RegistryImpl_Stub.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/runtime/RMIDefaultClassLoaderSpi.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/runtime/RemoteReferenceManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/server/ReferenceTypes.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/server/UnicastRemoteRef2Impl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/server/UnicastRemoteRefImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/server/UnicastServerRef2Impl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/server/UnicastServerRefImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/AbstractClientConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/AbstractServerConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/ClientConnectionFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/ConnectionPool.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/Endpoint.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/EndpointID.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/FallBackType.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/MultiThreadedServer.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/ProtocolException.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/RMIDefaultSocketFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/RMIObjectInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/RMIObjectOutputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/RMIServerSocket.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/ServerConnectionFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/SingleOpClientConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/SingleOpServerConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/StreamClientConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/StreamServerConnection.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/TransportManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpClientInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpClientOutputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpHeaders.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpOutputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpServerInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpServerOutputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpSocketClientSide.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/http/HttpSocketServerSide.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ClientProtocolHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/Header.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/HeaderResponse.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/Message.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/MessageResponse.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/MessageType.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ProtocolHeader.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ProtocolType.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ReturnMessage.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ReturnType.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/transport/jrmp/ServerProtocolHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/MethodHashGenerator.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/Pair.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/PrintStreamHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/PropertiesReader.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/RemoteUtils.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/internal/utils/ReversibleHashSet.java

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=407724&r1=407723&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Thu May 18 23:00:52 2006
@@ -98,7 +98,7 @@
             <src path="modules/nio_char/src/main/java" />
             <src path="modules/prefs/src/main/java" />
             <src path="modules/regex/src/main/java" />
-            <src path="modules/rmi/src/main/java" />
+            <src path="modules/${hy.rmi.module}/src/main/java" />
             <src path="modules/security-kernel/src/main/java" />
             <src path="modules/security/src/main/java/common" />
             <src path="modules/sql/src/main/java" />

Modified: incubator/harmony/enhanced/classlib/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/properties.xml?rev=407724&r1=407723&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/properties.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/properties.xml Thu May 18 23:00:52 2006
@@ -19,6 +19,9 @@
 
 <project name="Common Platform definitions" default="echo" basedir="..">
 
+    <!-- Module implementation properties -->
+    <property name="hy.rmi.module" value="rmi" />
+
     <!-- Javac properties -->
     <property name="hy.javac.source" value="1.5" />
     <property name="hy.javac.target" value="jsr14" />
@@ -94,6 +97,11 @@
     <target name="echo" depends="svn-prop" >
         <echo>
 
+Harmony module implementation properties:
+
+  hy.rmi.module = ${hy.rmi.module}
+
+
 Harmony javac properties:
 
   hy.javac.target = ${hy.javac.target}
@@ -157,7 +165,13 @@
         <attribute name="target" />
         <sequential>
             <subant target="@{target}">
-                <fileset dir="modules" includes="*/make/build.xml" />
+                <fileset dir="modules">
+                    <include name="*/make/build.xml" />
+                    <exclude name="rmi*/make/build.xml" />
+                </fileset>
+                <fileset dir="modules">
+                    <include name="${hy.rmi.module}/make/build.xml" />
+                </fileset>
             </subant>
         </sequential>
     </macrodef>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/make/patternset.txt
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/make/patternset.txt?rev=407724&r1=407723&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/make/patternset.txt (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/make/patternset.txt Thu May 18 23:00:52 2006
@@ -13,3 +13,18 @@
 # limitations under the License.
 
 java/rmi/*
+java/rmi/dgc/*
+java/rmi/activation/*
+java/rmi/server/*
+java/rmi/registry/*
+
+org/apache/harmony/rmi/internal/dgc/*
+org/apache/harmony/rmi/internal/dgc/client/*
+org/apache/harmony/rmi/internal/dgc/server/*
+org/apache/harmony/rmi/internal/transport/*
+org/apache/harmony/rmi/internal/transport/http/*
+org/apache/harmony/rmi/internal/transport/jrmp/*
+org/apache/harmony/rmi/internal/utils/*
+org/apache/harmony/rmi/internal/runtime/*
+org/apache/harmony/rmi/internal/server/*
+org/apache/harmony/rmi/internal/registry/*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/registry/LocateRegistry.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/registry/LocateRegistry.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/registry/LocateRegistry.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/registry/LocateRegistry.java Thu May 18 23:00:52 2006
@@ -1,94 +1,94 @@
-/* 
-*  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.registry;
-
-import java.rmi.RemoteException;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RMIServerSocketFactory;
-
-import ar.org.fitc.rmi.registry.RegistryImpl;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public final class LocateRegistry {
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry createRegistry(int port) throws RemoteException {
-        RegistryImpl registry = new RegistryImpl();
-        registry.exportObject(port, null, null, false);
-        return registry;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry createRegistry(int port, RMIClientSocketFactory csf,
-            RMIServerSocketFactory ssf) throws RemoteException {
-        RegistryImpl registry = new RegistryImpl();
-        registry.exportObject(port, csf, ssf, true);
-        return registry;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry getRegistry() throws RemoteException {
-        return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, null,
-                null, false);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry getRegistry(int port) throws RemoteException {
-        return (Registry) RegistryImpl.createStub(port, null, null, false);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry getRegistry(String host) throws RemoteException {
-        return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, host,
-                null, false);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry getRegistry(String host, int port)
-            throws RemoteException {
-        return (Registry) RegistryImpl.createStub(port, host, null, false);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Registry getRegistry(String host, int port,
-            RMIClientSocketFactory csf) throws RemoteException {
-        return (Registry) RegistryImpl.createStub(port, host, csf, true);
-    }
-}
+/* 
+*  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.registry;
+
+import java.rmi.RemoteException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+
+import org.apache.harmony.rmi.internal.registry.RegistryImpl;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public final class LocateRegistry {
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry createRegistry(int port) throws RemoteException {
+        RegistryImpl registry = new RegistryImpl();
+        registry.exportObject(port, null, null, false);
+        return registry;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry createRegistry(int port, RMIClientSocketFactory csf,
+            RMIServerSocketFactory ssf) throws RemoteException {
+        RegistryImpl registry = new RegistryImpl();
+        registry.exportObject(port, csf, ssf, true);
+        return registry;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry getRegistry() throws RemoteException {
+        return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, null,
+                null, false);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry getRegistry(int port) throws RemoteException {
+        return (Registry) RegistryImpl.createStub(port, null, null, false);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry getRegistry(String host) throws RemoteException {
+        return (Registry) RegistryImpl.createStub(Registry.REGISTRY_PORT, host,
+                null, false);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry getRegistry(String host, int port)
+            throws RemoteException {
+        return (Registry) RegistryImpl.createStub(port, host, null, false);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Registry getRegistry(String host, int port,
+            RMIClientSocketFactory csf) throws RemoteException {
+        return (Registry) RegistryImpl.createStub(port, host, csf, true);
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/ObjID.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/ObjID.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/ObjID.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/ObjID.java Thu May 18 23:00:52 2006
@@ -1,168 +1,168 @@
-/* 
-*  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.server;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.security.SecureRandom;
-
-import ar.org.fitc.rmi.utils.PropertiesReader;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public final class ObjID implements Serializable {
-
-    /**
-     * This class defines unique Object Identifiers. It uses an UID and a
-     * counter or a Random generated number to identify between objects within
-     * the same UID.
-     */
-    private static final long serialVersionUID = -6386392263968365220L;
-
-    public static final int REGISTRY_ID = 0;
-
-    public static final int ACTIVATOR_ID = 1;
-
-    public static final int DGC_ID = 2;
-
-    private static long objNumCounter = 0;
-
-    /*
-     * REVIEW: It's assumed that we need the same UID for every object in the
-     * same JVM. This satisfies the specification, though the same UID could be
-     * needed somewhere else, so it may be neccesary to obtain the UID from
-     * somewhere else instead of creating a static one in this class.
-     */
-
-    private static final UID objUIDConst = new UID();
-
-    private static final SecureRandom random = new SecureRandom();
-
-    private static final boolean IsSecureRandom;
-
-    private long objNum;
-
-    private UID objUID;
-
-    /*
-     * The random number generator is set to a default by the SecureRandom()
-     * constructor. The seed is automaticaly set in the first call to
-     * nextLong().
-     */
-    static {
-        String randomIds = 
-            PropertiesReader.readString("java.rmi.server.randomIDs");
-        if (randomIds == null) {
-            IsSecureRandom = false;
-        } else {
-            IsSecureRandom = randomIds.equalsIgnoreCase("true");
-        }
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public ObjID() {
-
-        if (IsSecureRandom) {
-            this.objNum = random.nextLong();
-        } else {
-            synchronized (ObjID.class) {
-                this.objNum = objNumCounter;
-                objNumCounter++;
-            }
-            this.objUID = objUIDConst;
-        }
-
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public ObjID(int objNum) {
-        this.objNum = objNum;
-        this.objUID = new UID((short) 0);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public int hashCode() {
-
-        /*
-         * REVIEW: This is an arbitrary election for the hash function, that
-         * does not seem to do any harm and it satisfies the specification.
-         */
-        return (int) this.objNum ^ this.objUID.hashCode();
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static ObjID read(ObjectInput in) throws IOException {
-        ObjID newObj = new ObjID();
-
-        newObj.objNum = in.readLong();
-        newObj.objUID = UID.read(in);
-
-        return newObj;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public boolean equals(Object obj) {
-
-        if (obj == null)
-            return false;
-        if (obj == this)
-            return true;
-        if (!(obj instanceof ObjID))
-            return false;
-        return (((ObjID) obj).objNum == this.objNum && ((ObjID) obj).objUID
-                .equals(this.objUID));
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public String toString() {
-        return "[ObjID:" + this.objNum + ", " + this.objUID.toString() + "]";
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public void write(ObjectOutput out) throws IOException {
-
-        out.writeLong(this.objNum);
-        this.objUID.write(out);
-    }
-}
+/* 
+*  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.server;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
+import java.security.SecureRandom;
+
+import org.apache.harmony.rmi.internal.utils.PropertiesReader;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public final class ObjID implements Serializable {
+
+    /**
+     * This class defines unique Object Identifiers. It uses an UID and a
+     * counter or a Random generated number to identify between objects within
+     * the same UID.
+     */
+    private static final long serialVersionUID = -6386392263968365220L;
+
+    public static final int REGISTRY_ID = 0;
+
+    public static final int ACTIVATOR_ID = 1;
+
+    public static final int DGC_ID = 2;
+
+    private static long objNumCounter = 0;
+
+    /*
+     * REVIEW: It's assumed that we need the same UID for every object in the
+     * same JVM. This satisfies the specification, though the same UID could be
+     * needed somewhere else, so it may be neccesary to obtain the UID from
+     * somewhere else instead of creating a static one in this class.
+     */
+
+    private static final UID objUIDConst = new UID();
+
+    private static final SecureRandom random = new SecureRandom();
+
+    private static final boolean IsSecureRandom;
+
+    private long objNum;
+
+    private UID objUID;
+
+    /*
+     * The random number generator is set to a default by the SecureRandom()
+     * constructor. The seed is automaticaly set in the first call to
+     * nextLong().
+     */
+    static {
+        String randomIds = 
+            PropertiesReader.readString("java.rmi.server.randomIDs");
+        if (randomIds == null) {
+            IsSecureRandom = false;
+        } else {
+            IsSecureRandom = randomIds.equalsIgnoreCase("true");
+        }
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ObjID() {
+
+        if (IsSecureRandom) {
+            this.objNum = random.nextLong();
+        } else {
+            synchronized (ObjID.class) {
+                this.objNum = objNumCounter;
+                objNumCounter++;
+            }
+            this.objUID = objUIDConst;
+        }
+
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public ObjID(int objNum) {
+        this.objNum = objNum;
+        this.objUID = new UID((short) 0);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public int hashCode() {
+
+        /*
+         * REVIEW: This is an arbitrary election for the hash function, that
+         * does not seem to do any harm and it satisfies the specification.
+         */
+        return (int) this.objNum ^ this.objUID.hashCode();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static ObjID read(ObjectInput in) throws IOException {
+        ObjID newObj = new ObjID();
+
+        newObj.objNum = in.readLong();
+        newObj.objUID = UID.read(in);
+
+        return newObj;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public boolean equals(Object obj) {
+
+        if (obj == null)
+            return false;
+        if (obj == this)
+            return true;
+        if (!(obj instanceof ObjID))
+            return false;
+        return (((ObjID) obj).objNum == this.objNum && ((ObjID) obj).objUID
+                .equals(this.objUID));
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public String toString() {
+        return "[ObjID:" + this.objNum + ", " + this.objUID.toString() + "]";
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public void write(ObjectOutput out) throws IOException {
+
+        out.writeLong(this.objNum);
+        this.objUID.write(out);
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMIClassLoader.java Thu May 18 23:00:52 2006
@@ -1,202 +1,202 @@
-/* 
-*  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.server;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.ClassLoader;
-import java.rmi.server.RMIClassLoaderSpi;
-import java.util.Scanner;
-import java.util.regex.Pattern;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import ar.org.fitc.rmi.runtime.RMIDefaultClassLoaderSpi;
-import ar.org.fitc.rmi.utils.PropertiesReader;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public class RMIClassLoader {
-
-    static private RMIClassLoaderSpi provider = null;
-
-    /*
-     * This initialization is specified in the ClassLoader API, though it is an
-     * awful design.
-     */
-
-    static {
-        String property = 
-            PropertiesReader.readString("java.rmi.server.RMIClassLoaderSpi");
-        Class clazz;
-
-        if (property != null) {
-            if (property.equals("default")) {
-                provider = getDefaultProviderInstance();
-            } else {
-                try {
-                    clazz = ClassLoader.getSystemClassLoader().loadClass(
-                            property);
-                    if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
-                        provider = (RMIClassLoaderSpi) clazz.newInstance();
-                    } else {
-                        throw new Error("RMIClassLoader Initialization Failed");
-                    }
-                } catch (ClassNotFoundException e) {
-                    throw new Error("RMIClassLoader Initialization Failed");
-                } catch (InstantiationException e) {
-                    throw new Error("RMIClassLoader Initialization Failed");
-                } catch (IllegalAccessException e) {
-                    throw new Error("RMIClassLoader Initialization Failed");
-                }
-            }
-        } else {
-            InputStream in = ClassLoader
-                    .getSystemResourceAsStream("META-INF/services/java.rmi.server.RMIClassLoaderSpi");
-            String providerName = null;
-
-            if (in != null) {
-                Scanner scanner = new Scanner(in);
-                Pattern pat = Pattern.compile("\\b[\\w\\.]*\\b",
-                        Pattern.COMMENTS);
-                try {
-                    while ((in.available() > 0) && provider == null) {
-                        if (scanner.hasNext(pat)) {
-                            providerName = scanner.next(pat);
-                            break;
-                        } else if (in.available() > 0) {
-                            scanner.nextLine();
-                        }
-                    }
-                } catch (IOException e) {
-                    throw new Error("RMIClassLoader Initialization Failed");
-                }
-            }
-            if (providerName != null) {
-                try {
-                    clazz = ClassLoader.getSystemClassLoader().loadClass(
-                            providerName);
-                } catch (Exception e) {
-                    throw new Error(
-                            "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
-                }
-                if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
-                    try {
-                        provider = (RMIClassLoaderSpi) clazz.newInstance();
-                    } catch (Exception e) {
-                        throw new Error(
-                                "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
-                    }
-                } else {
-                    throw new Error("RMIClassLoader Initialization Failed");
-                }
-            } else {
-                provider = getDefaultProviderInstance();
-            }
-        }
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static String getClassAnnotation(Class<?> cl)
-            throws NullPointerException {
-
-        return provider.getClassAnnotation(cl);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static ClassLoader getClassLoader(String codebase)
-            throws MalformedURLException, SecurityException {
-
-        return provider.getClassLoader(codebase);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static RMIClassLoaderSpi getDefaultProviderInstance() {
-
-        if (System.getSecurityManager() != null) {
-            System.getSecurityManager().checkPermission(
-                    new RuntimePermission("setFactory"));
-        }
-        if (provider == null) {
-            provider = new RMIDefaultClassLoaderSpi();
-        }
-        return provider;
-    }
-
-    @Deprecated
-    public static Object getSecurityContext(@SuppressWarnings("unused") ClassLoader loader) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Deprecated
-    public static Class<?> loadClass(String name) throws MalformedURLException,
-            ClassNotFoundException {
-        return loadClass((String) null, name);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Class<?> loadClass(String codebase, String name)
-            throws MalformedURLException, ClassNotFoundException {
-        return provider.loadClass(codebase, name, null);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Class<?> loadClass(String codebase, String name,
-            ClassLoader defaultLoader) throws MalformedURLException,
-            ClassNotFoundException {
-
-        return provider.loadClass(codebase, name, defaultLoader);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Class<?> loadClass(URL codebase, String name)
-            throws MalformedURLException, ClassNotFoundException {
-        String codebaseStr =  codebase == null ? null : codebase.toString();
-        
-        return provider.loadClass(codebaseStr, name, null);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Class<?> loadProxyClass(String codebase, String[] interfaces,
-            ClassLoader defaultLoader) throws MalformedURLException,
-            ClassNotFoundException, IllegalArgumentException {
-
-        return provider.loadProxyClass(codebase, interfaces, defaultLoader);
-    }
-}
+/* 
+*  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.server;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ClassLoader;
+import java.rmi.server.RMIClassLoaderSpi;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.harmony.rmi.internal.runtime.RMIDefaultClassLoaderSpi;
+import org.apache.harmony.rmi.internal.utils.PropertiesReader;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class RMIClassLoader {
+
+    static private RMIClassLoaderSpi provider = null;
+
+    /*
+     * This initialization is specified in the ClassLoader API, though it is an
+     * awful design.
+     */
+
+    static {
+        String property = 
+            PropertiesReader.readString("java.rmi.server.RMIClassLoaderSpi");
+        Class clazz;
+
+        if (property != null) {
+            if (property.equals("default")) {
+                provider = getDefaultProviderInstance();
+            } else {
+                try {
+                    clazz = ClassLoader.getSystemClassLoader().loadClass(
+                            property);
+                    if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
+                        provider = (RMIClassLoaderSpi) clazz.newInstance();
+                    } else {
+                        throw new Error("RMIClassLoader Initialization Failed");
+                    }
+                } catch (ClassNotFoundException e) {
+                    throw new Error("RMIClassLoader Initialization Failed");
+                } catch (InstantiationException e) {
+                    throw new Error("RMIClassLoader Initialization Failed");
+                } catch (IllegalAccessException e) {
+                    throw new Error("RMIClassLoader Initialization Failed");
+                }
+            }
+        } else {
+            InputStream in = ClassLoader
+                    .getSystemResourceAsStream("META-INF/services/java.rmi.server.RMIClassLoaderSpi");
+            String providerName = null;
+
+            if (in != null) {
+                Scanner scanner = new Scanner(in);
+                Pattern pat = Pattern.compile("\\b[\\w\\.]*\\b",
+                        Pattern.COMMENTS);
+                try {
+                    while ((in.available() > 0) && provider == null) {
+                        if (scanner.hasNext(pat)) {
+                            providerName = scanner.next(pat);
+                            break;
+                        } else if (in.available() > 0) {
+                            scanner.nextLine();
+                        }
+                    }
+                } catch (IOException e) {
+                    throw new Error("RMIClassLoader Initialization Failed");
+                }
+            }
+            if (providerName != null) {
+                try {
+                    clazz = ClassLoader.getSystemClassLoader().loadClass(
+                            providerName);
+                } catch (Exception e) {
+                    throw new Error(
+                            "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
+                }
+                if (RMIClassLoaderSpi.class.isAssignableFrom(clazz)) {
+                    try {
+                        provider = (RMIClassLoaderSpi) clazz.newInstance();
+                    } catch (Exception e) {
+                        throw new Error(
+                                "RMIClassLoader Initialization Failed from a RMIClassLoaderSpi configuration file");
+                    }
+                } else {
+                    throw new Error("RMIClassLoader Initialization Failed");
+                }
+            } else {
+                provider = getDefaultProviderInstance();
+            }
+        }
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static String getClassAnnotation(Class<?> cl)
+            throws NullPointerException {
+
+        return provider.getClassAnnotation(cl);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static ClassLoader getClassLoader(String codebase)
+            throws MalformedURLException, SecurityException {
+
+        return provider.getClassLoader(codebase);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static RMIClassLoaderSpi getDefaultProviderInstance() {
+
+        if (System.getSecurityManager() != null) {
+            System.getSecurityManager().checkPermission(
+                    new RuntimePermission("setFactory"));
+        }
+        if (provider == null) {
+            provider = new RMIDefaultClassLoaderSpi();
+        }
+        return provider;
+    }
+
+    @Deprecated
+    public static Object getSecurityContext(@SuppressWarnings("unused") ClassLoader loader) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Deprecated
+    public static Class<?> loadClass(String name) throws MalformedURLException,
+            ClassNotFoundException {
+        return loadClass((String) null, name);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Class<?> loadClass(String codebase, String name)
+            throws MalformedURLException, ClassNotFoundException {
+        return provider.loadClass(codebase, name, null);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Class<?> loadClass(String codebase, String name,
+            ClassLoader defaultLoader) throws MalformedURLException,
+            ClassNotFoundException {
+
+        return provider.loadClass(codebase, name, defaultLoader);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Class<?> loadClass(URL codebase, String name)
+            throws MalformedURLException, ClassNotFoundException {
+        String codebaseStr =  codebase == null ? null : codebase.toString();
+        
+        return provider.loadClass(codebaseStr, name, null);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Class<?> loadProxyClass(String codebase, String[] interfaces,
+            ClassLoader defaultLoader) throws MalformedURLException,
+            ClassNotFoundException, IllegalArgumentException {
+
+        return provider.loadProxyClass(codebase, interfaces, defaultLoader);
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMISocketFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMISocketFactory.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMISocketFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RMISocketFactory.java Thu May 18 23:00:52 2006
@@ -1,115 +1,115 @@
-/* 
-*  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.server;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-import ar.org.fitc.rmi.transport.RMIDefaultSocketFactory;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public abstract class RMISocketFactory implements RMIClientSocketFactory,
-        RMIServerSocketFactory {
-
-    private static RMIFailureHandler failureHandler;
-
-    private static RMISocketFactory socketFactory;
-
-    private static RMISocketFactory defaultSocketFactory;
-
-    static {
-        defaultSocketFactory = new RMIDefaultSocketFactory();
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public RMISocketFactory() {
-    	super();
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public abstract Socket createSocket(String host, int port)
-            throws IOException;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public abstract ServerSocket createServerSocket(int port)
-            throws IOException;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static RMISocketFactory getDefaultSocketFactory() {
-        return defaultSocketFactory;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static RMIFailureHandler getFailureHandler() {
-        return failureHandler;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static RMISocketFactory getSocketFactory() {
-        return socketFactory;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static void setFailureHandler(RMIFailureHandler fh) {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-            security.checkSetFactory();
-        }
-        failureHandler = fh;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static void setSocketFactory(RMISocketFactory fac)
-            throws IOException {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-            security.checkSetFactory();
-        }
-        if (socketFactory == null) {
-            socketFactory = fac;
-        } else {
-            throw new IOException("RMI Socket Factory already set");
-        }
-    }
-}
+/* 
+*  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.server;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import org.apache.harmony.rmi.internal.transport.RMIDefaultSocketFactory;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public abstract class RMISocketFactory implements RMIClientSocketFactory,
+        RMIServerSocketFactory {
+
+    private static RMIFailureHandler failureHandler;
+
+    private static RMISocketFactory socketFactory;
+
+    private static RMISocketFactory defaultSocketFactory;
+
+    static {
+        defaultSocketFactory = new RMIDefaultSocketFactory();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RMISocketFactory() {
+    	super();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public abstract Socket createSocket(String host, int port)
+            throws IOException;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public abstract ServerSocket createServerSocket(int port)
+            throws IOException;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static RMISocketFactory getDefaultSocketFactory() {
+        return defaultSocketFactory;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static RMIFailureHandler getFailureHandler() {
+        return failureHandler;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static RMISocketFactory getSocketFactory() {
+        return socketFactory;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static void setFailureHandler(RMIFailureHandler fh) {
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            security.checkSetFactory();
+        }
+        failureHandler = fh;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static void setSocketFactory(RMISocketFactory fac)
+            throws IOException {
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            security.checkSetFactory();
+        }
+        if (socketFactory == null) {
+            socketFactory = fac;
+        } else {
+            throw new IOException("RMI Socket Factory already set");
+        }
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObject.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObject.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObject.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObject.java Thu May 18 23:00:52 2006
@@ -1,190 +1,190 @@
-/* 
-*  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.server;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.reflect.Proxy;
-import java.rmi.NoSuchObjectException;
-import java.rmi.Remote;
-
-import ar.org.fitc.rmi.runtime.RemoteReferenceManager;
-import ar.org.fitc.rmi.server.ReferenceTypes;
-import ar.org.fitc.rmi.server.UnicastRemoteRef2Impl;
-import ar.org.fitc.rmi.server.UnicastRemoteRefImpl;
-import ar.org.fitc.rmi.server.UnicastServerRef2Impl;
-import ar.org.fitc.rmi.server.UnicastServerRefImpl;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public abstract class RemoteObject implements Remote, Serializable {
-
-    private static final long serialVersionUID = -3215090123894869218L;
-
-    protected transient RemoteRef ref;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    protected RemoteObject() {
-        super();
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    protected RemoteObject(RemoteRef newRef) {
-    	if (newRef == null) {
-    		throw new NullPointerException(); 
-    	}
-        ref = newRef;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public int hashCode() {
-        if (ref != null) {
-            return ref.remoteHashCode();
-        } else {
-            return super.hashCode();
-        }
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public boolean equals(Object obj) {
-        if (obj != null) {
-            if (obj == this) {
-                return true;
-            }
-            if (obj instanceof RemoteObject) {
-                if (ref == null) {
-                    return false;
-                }
-                return ref.remoteEquals(((RemoteObject) obj).getRef());
-            } else {
-                return obj.equals(this);
-            }
-        }
-        return false;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    @Override
-	public String toString() {
-        if (ref != null) {
-            return "[" + this.getClass().getName() + " " + ref.remoteToString()
-                    + "]";
-        } else {
-            return super.toString();
-        }
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public RemoteRef getRef() {
-        return ref;
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public static Remote toStub(Remote obj) throws NoSuchObjectException {
-        if (obj == null) {
-            throw new NoSuchObjectException(
-                    "Invalid (null) Remote server object.");
-        }
-        if (obj instanceof RemoteStub) {
-            return obj;
-        }
-        if (Proxy.isProxyClass(obj.getClass())) {
-            if (Proxy.getInvocationHandler(obj).getClass().equals(
-                    RemoteObjectInvocationHandler.class)) {
-                return obj;
-            }
-        }
-        RemoteReferenceManager rrm = RemoteReferenceManager
-                .getRemoteReferenceManager();
-        return rrm.getStub(obj);
-    }
-
-    /**
-     * 
-     * 
-     */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-        out.defaultWriteObject();
-        if (ref != null) {
-            String externalRefTypeName = ref.getRefClass(out);
-            if (externalRefTypeName != null && externalRefTypeName.length() > 0) {
-                out.writeUTF(externalRefTypeName);
-                ref.writeExternal(out);
-            } else {
-                out.writeUTF("");
-                out.writeObject(ref);
-            }
-        }
-    }
-
-    /**
-     * 
-     * 
-     */
-    private void readObject(ObjectInputStream in) throws IOException,
-            ClassNotFoundException {
-        in.defaultReadObject();
-        String externalRefTypeName = in.readUTF();
-        if (externalRefTypeName.length() == 0) {
-            ref = (RemoteRef) in.readObject();
-        } else {
-            if (externalRefTypeName.equals(ReferenceTypes.UNICAST_REF
-                    .toString())) {
-                ref = new UnicastRemoteRefImpl();
-            } else if (externalRefTypeName.equals(ReferenceTypes.UNICAST_REF2
-                    .toString())) {
-                ref = new UnicastRemoteRef2Impl();
-            } else if (externalRefTypeName
-                    .equals(ReferenceTypes.UNICAST_SERVER_REF.toString())) {
-                ref = new UnicastServerRefImpl();
-            } else if (externalRefTypeName
-                    .equals(ReferenceTypes.UNICAST_SERVER_REF2.toString())) {
-                ref = new UnicastServerRef2Impl();
-            } else {
-                throw new ClassNotFoundException(
-                        "Invalid external ref type name");
-            }
-            ref.readExternal(in);
-        }
-    }
-}
+/* 
+*  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.server;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.reflect.Proxy;
+import java.rmi.NoSuchObjectException;
+import java.rmi.Remote;
+
+import org.apache.harmony.rmi.internal.runtime.RemoteReferenceManager;
+import org.apache.harmony.rmi.internal.server.ReferenceTypes;
+import org.apache.harmony.rmi.internal.server.UnicastRemoteRef2Impl;
+import org.apache.harmony.rmi.internal.server.UnicastRemoteRefImpl;
+import org.apache.harmony.rmi.internal.server.UnicastServerRef2Impl;
+import org.apache.harmony.rmi.internal.server.UnicastServerRefImpl;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public abstract class RemoteObject implements Remote, Serializable {
+
+    private static final long serialVersionUID = -3215090123894869218L;
+
+    protected transient RemoteRef ref;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected RemoteObject() {
+        super();
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    protected RemoteObject(RemoteRef newRef) {
+    	if (newRef == null) {
+    		throw new NullPointerException(); 
+    	}
+        ref = newRef;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public int hashCode() {
+        if (ref != null) {
+            return ref.remoteHashCode();
+        } else {
+            return super.hashCode();
+        }
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public boolean equals(Object obj) {
+        if (obj != null) {
+            if (obj == this) {
+                return true;
+            }
+            if (obj instanceof RemoteObject) {
+                if (ref == null) {
+                    return false;
+                }
+                return ref.remoteEquals(((RemoteObject) obj).getRef());
+            } else {
+                return obj.equals(this);
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    @Override
+	public String toString() {
+        if (ref != null) {
+            return "[" + this.getClass().getName() + " " + ref.remoteToString()
+                    + "]";
+        } else {
+            return super.toString();
+        }
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RemoteRef getRef() {
+        return ref;
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public static Remote toStub(Remote obj) throws NoSuchObjectException {
+        if (obj == null) {
+            throw new NoSuchObjectException(
+                    "Invalid (null) Remote server object.");
+        }
+        if (obj instanceof RemoteStub) {
+            return obj;
+        }
+        if (Proxy.isProxyClass(obj.getClass())) {
+            if (Proxy.getInvocationHandler(obj).getClass().equals(
+                    RemoteObjectInvocationHandler.class)) {
+                return obj;
+            }
+        }
+        RemoteReferenceManager rrm = RemoteReferenceManager
+                .getRemoteReferenceManager();
+        return rrm.getStub(obj);
+    }
+
+    /**
+     * 
+     * 
+     */
+    private void writeObject(ObjectOutputStream out) throws IOException {
+        out.defaultWriteObject();
+        if (ref != null) {
+            String externalRefTypeName = ref.getRefClass(out);
+            if (externalRefTypeName != null && externalRefTypeName.length() > 0) {
+                out.writeUTF(externalRefTypeName);
+                ref.writeExternal(out);
+            } else {
+                out.writeUTF("");
+                out.writeObject(ref);
+            }
+        }
+    }
+
+    /**
+     * 
+     * 
+     */
+    private void readObject(ObjectInputStream in) throws IOException,
+            ClassNotFoundException {
+        in.defaultReadObject();
+        String externalRefTypeName = in.readUTF();
+        if (externalRefTypeName.length() == 0) {
+            ref = (RemoteRef) in.readObject();
+        } else {
+            if (externalRefTypeName.equals(ReferenceTypes.UNICAST_REF
+                    .toString())) {
+                ref = new UnicastRemoteRefImpl();
+            } else if (externalRefTypeName.equals(ReferenceTypes.UNICAST_REF2
+                    .toString())) {
+                ref = new UnicastRemoteRef2Impl();
+            } else if (externalRefTypeName
+                    .equals(ReferenceTypes.UNICAST_SERVER_REF.toString())) {
+                ref = new UnicastServerRefImpl();
+            } else if (externalRefTypeName
+                    .equals(ReferenceTypes.UNICAST_SERVER_REF2.toString())) {
+                ref = new UnicastServerRef2Impl();
+            } else {
+                throw new ClassNotFoundException(
+                        "Invalid external ref type name");
+            }
+            ref.readExternal(in);
+        }
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObjectInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObjectInvocationHandler.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObjectInvocationHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteObjectInvocationHandler.java Thu May 18 23:00:52 2006
@@ -1,88 +1,88 @@
-/* 
-*  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.server;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.rmi.Remote;
-import java.rmi.UnexpectedException;
-import ar.org.fitc.rmi.utils.MethodHashGenerator;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public class RemoteObjectInvocationHandler extends RemoteObject implements
-        InvocationHandler {
-
-    private static final long serialVersionUID = 2L;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public RemoteObjectInvocationHandler(RemoteRef ref) {
-        super(ref);
-    }
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    public Object invoke(Object proxy, Method method, Object[] args)
-            throws Throwable {
-
-        Method hashCode = Object.class.getMethod("hashCode", (Class[]) null);
-        Method equals = Object.class.getMethod("equals", Object.class);
-        Method toString = Object.class.getMethod("toString", (Class[]) null);
-
-        if (method.equals(hashCode)) {
-            return ref.remoteHashCode();
-        }
-        if (method.equals(equals)) {
-            if ((args[0] != null)
-                    && (Proxy.isProxyClass(args[0].getClass()))
-                    && (this.equals(Proxy.getInvocationHandler(args[0])))) {
-                return true;
-            } else {
-                return false;
-            }
-        }
-        if (method.equals(toString)) {
-            return "[" + "Proxy " + ref.remoteToString() + "]";
-        }
-        if (!(proxy instanceof Remote)) {
-            throw new IllegalArgumentException(
-                    "Proxy must be an instance of java.rmi.Remote");
-        }
-
-        long methodHash = MethodHashGenerator.getMethodHash(method);
-        try {
-            return ref.invoke((Remote) proxy, method, args, methodHash);
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            Class[] exceptions = method.getExceptionTypes();
-            for (Class<Exception> exception : exceptions) {
-                if (exception.isAssignableFrom(e.getClass())) {
-                    throw e;
-                }
-            }
-            throw new UnexpectedException("undeclared checked exception", e);
-        }
-    }
-}
+/* 
+*  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.server;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.rmi.Remote;
+import java.rmi.UnexpectedException;
+import org.apache.harmony.rmi.internal.utils.MethodHashGenerator;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public class RemoteObjectInvocationHandler extends RemoteObject implements
+        InvocationHandler {
+
+    private static final long serialVersionUID = 2L;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public RemoteObjectInvocationHandler(RemoteRef ref) {
+        super(ref);
+    }
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    public Object invoke(Object proxy, Method method, Object[] args)
+            throws Throwable {
+
+        Method hashCode = Object.class.getMethod("hashCode", (Class[]) null);
+        Method equals = Object.class.getMethod("equals", Object.class);
+        Method toString = Object.class.getMethod("toString", (Class[]) null);
+
+        if (method.equals(hashCode)) {
+            return ref.remoteHashCode();
+        }
+        if (method.equals(equals)) {
+            if ((args[0] != null)
+                    && (Proxy.isProxyClass(args[0].getClass()))
+                    && (this.equals(Proxy.getInvocationHandler(args[0])))) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+        if (method.equals(toString)) {
+            return "[" + "Proxy " + ref.remoteToString() + "]";
+        }
+        if (!(proxy instanceof Remote)) {
+            throw new IllegalArgumentException(
+                    "Proxy must be an instance of java.rmi.Remote");
+        }
+
+        long methodHash = MethodHashGenerator.getMethodHash(method);
+        try {
+            return ref.invoke((Remote) proxy, method, args, methodHash);
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            Class[] exceptions = method.getExceptionTypes();
+            for (Class<Exception> exception : exceptions) {
+                if (exception.isAssignableFrom(e.getClass())) {
+                    throw e;
+                }
+            }
+            throw new UnexpectedException("undeclared checked exception", e);
+        }
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteRef.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteRef.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteRef.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteRef.java Thu May 18 23:00:52 2006
@@ -1,84 +1,84 @@
-/* 
-*  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.server;
-
-import java.io.Externalizable;
-import java.io.ObjectOutput;
-import java.lang.reflect.Method;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public interface RemoteRef extends Externalizable {
-
-    static final long serialVersionUID = 3632638527362204081L;
-
-    static final String packagePrefix = "ar.org.fitc.rmi.server";
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    String getRefClass(ObjectOutput out);
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    boolean remoteEquals(RemoteRef obj);
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    int remoteHashCode();
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    String remoteToString();
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
-            throws RemoteException;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    Object invoke(Remote obj, Method method, Object[] params, long opnum)
-            throws Exception;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    void invoke(RemoteCall call) throws Exception;
-
-    /**
-     * @ar.org.fitc.spec_ref
-     * 
-     */
-    void done(RemoteCall call) throws RemoteException;
-
-}
+/* 
+*  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.server;
+
+import java.io.Externalizable;
+import java.io.ObjectOutput;
+import java.lang.reflect.Method;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public interface RemoteRef extends Externalizable {
+
+    static final long serialVersionUID = 3632638527362204081L;
+
+    static final String packagePrefix = "org.apache.harmony.rmi.internal.server";
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    String getRefClass(ObjectOutput out);
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    boolean remoteEquals(RemoteRef obj);
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    int remoteHashCode();
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    String remoteToString();
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
+            throws RemoteException;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    Object invoke(Remote obj, Method method, Object[] params, long opnum)
+            throws Exception;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    void invoke(RemoteCall call) throws Exception;
+
+    /**
+     * @ar.org.fitc.spec_ref
+     * 
+     */
+    void done(RemoteCall call) throws RemoteException;
+
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteServer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteServer.java?rev=407724&r1=407183&r2=407724&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteServer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/RemoteServer.java Thu May 18 23:00:52 2006
@@ -1,131 +1,131 @@
-/* 
-*  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.server;
-
-import java.io.PrintStream;
-import java.io.OutputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.LoggingPermission;
-
-import ar.org.fitc.rmi.transport.TransportManager;
-import ar.org.fitc.rmi.utils.PrintStreamHandler;
-import ar.org.fitc.rmi.utils.PropertiesReader;
-
-/**
- * @ar.org.fitc.spec_ref
- * 
- */
-public abstract class RemoteServer extends RemoteObject {
-
-	private static final long serialVersionUID = -4100238210092549637L;
-
-	static private PrintStream logStream;
-
-	private static Logger logger;
-
-	private static Logger serverLog;
-
-	private static PrintStreamHandler logHandler;
-
-	// Initialize loggers
-	static {
-		logger = Logger.getLogger("ar.org.fitc.rmi.server");
-		logger.setUseParentHandlers(false);
-		logger.setLevel(Level.ALL);
-
-		String propertyValue = 
-            PropertiesReader.readString("java.rmi.server.logCalls");
-		if (propertyValue != null) {
-			boolean logAllowed = propertyValue.equalsIgnoreCase("true");
-			if (logAllowed) {
-				PrintStreamHandler errHandler = new PrintStreamHandler();
-				errHandler.setLevel(Level.ALL);
-				logger.addHandler(errHandler);
-			}
-		}
-
-		// Implementation-specific logger to log server information
-		serverLog = Logger.getLogger("ar.org.fitc.rmi.server.log");
-        propertyValue = 
-            PropertiesReader.readString("ar.org.fitc.rmi.server.log");
-
-        if (propertyValue  != null
-				&& propertyValue.equalsIgnoreCase("true")) {
-			serverLog.setLevel(Level.ALL);
-		} else {
-			serverLog.setLevel(Level.OFF);
-		}
-
-	}
-
-	/**
-	 * @ar.org.fitc.spec_ref
-	 * 
-	 */
-	protected RemoteServer() {
-		super();
-	}
-
-	/**
-	 * @ar.org.fitc.spec_ref
-	 * 
-	 */
-	protected RemoteServer(RemoteRef ref) {
-		super(ref);
-	}
-
-	/**
-	 * @ar.org.fitc.spec_ref
-	 * 
-	 */
-	public static String getClientHost() throws ServerNotActiveException {
-		TransportManager tm = TransportManager.getTransportManager();
-		return tm.getClientHost();
-	}
-
-	/**
-	 * @ar.org.fitc.spec_ref
-	 * 
-	 */
-	public static PrintStream getLog() {
-		return logStream;
-	}
-
-	/**
-	 * @ar.org.fitc.spec_ref
-	 * 
-	 */
-	public static void setLog(OutputStream out) {
-
-		// Check security permission as stated in specification
-		SecurityManager security = System.getSecurityManager();
-		if (security != null) {
-			security.checkPermission(new LoggingPermission("control", null));
-		}
-
-		logger.removeHandler(logHandler);
-		if (out != null) {
-			logStream = new PrintStream(out);
-			logHandler = new PrintStreamHandler(logStream);
-			logHandler.setLevel(Level.ALL);
-			logger.addHandler(logHandler);
-		} else {
-			logStream = null;
-		}
-		return;
-	}
-}
+/* 
+*  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.server;
+
+import java.io.PrintStream;
+import java.io.OutputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+import org.apache.harmony.rmi.internal.transport.TransportManager;
+import org.apache.harmony.rmi.internal.utils.PrintStreamHandler;
+import org.apache.harmony.rmi.internal.utils.PropertiesReader;
+
+/**
+ * @ar.org.fitc.spec_ref
+ * 
+ */
+public abstract class RemoteServer extends RemoteObject {
+
+	private static final long serialVersionUID = -4100238210092549637L;
+
+	static private PrintStream logStream;
+
+	private static Logger logger;
+
+	private static Logger serverLog;
+
+	private static PrintStreamHandler logHandler;
+
+	// Initialize loggers
+	static {
+		logger = Logger.getLogger("org.apache.harmony.rmi.internal.server");
+		logger.setUseParentHandlers(false);
+		logger.setLevel(Level.ALL);
+
+		String propertyValue = 
+            PropertiesReader.readString("java.rmi.server.logCalls");
+		if (propertyValue != null) {
+			boolean logAllowed = propertyValue.equalsIgnoreCase("true");
+			if (logAllowed) {
+				PrintStreamHandler errHandler = new PrintStreamHandler();
+				errHandler.setLevel(Level.ALL);
+				logger.addHandler(errHandler);
+			}
+		}
+
+		// Implementation-specific logger to log server information
+		serverLog = Logger.getLogger("org.apache.harmony.rmi.internal.server.log");
+        propertyValue = 
+            PropertiesReader.readString("org.apache.harmony.rmi.internal.server.log");
+
+        if (propertyValue  != null
+				&& propertyValue.equalsIgnoreCase("true")) {
+			serverLog.setLevel(Level.ALL);
+		} else {
+			serverLog.setLevel(Level.OFF);
+		}
+
+	}
+
+	/**
+	 * @ar.org.fitc.spec_ref
+	 * 
+	 */
+	protected RemoteServer() {
+		super();
+	}
+
+	/**
+	 * @ar.org.fitc.spec_ref
+	 * 
+	 */
+	protected RemoteServer(RemoteRef ref) {
+		super(ref);
+	}
+
+	/**
+	 * @ar.org.fitc.spec_ref
+	 * 
+	 */
+	public static String getClientHost() throws ServerNotActiveException {
+		TransportManager tm = TransportManager.getTransportManager();
+		return tm.getClientHost();
+	}
+
+	/**
+	 * @ar.org.fitc.spec_ref
+	 * 
+	 */
+	public static PrintStream getLog() {
+		return logStream;
+	}
+
+	/**
+	 * @ar.org.fitc.spec_ref
+	 * 
+	 */
+	public static void setLog(OutputStream out) {
+
+		// Check security permission as stated in specification
+		SecurityManager security = System.getSecurityManager();
+		if (security != null) {
+			security.checkPermission(new LoggingPermission("control", null));
+		}
+
+		logger.removeHandler(logHandler);
+		if (out != null) {
+			logStream = new PrintStream(out);
+			logHandler = new PrintStreamHandler(logStream);
+			logHandler.setLevel(Level.ALL);
+			logger.addHandler(logHandler);
+		} else {
+			logStream = null;
+		}
+		return;
+	}
+}