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 [2/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/testing...

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/Results - SUN/testusingproxyandwebserverwithcgi.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/bashscripts.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/bashscripts.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/bashscripts.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration.pdf
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration.pdf?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/shorewall.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting1/machine1/shorewall.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/shorewall.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/squid.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting1/machine1/squid.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting1/machine1/squid.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/shorewall.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting2/machine1/shorewall.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/shorewall.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/squid.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting2/machine1/squid.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting2/machine1/squid.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/shorewall.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine1/shorewall.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/shorewall.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/squid.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine1/squid.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine1/squid.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine3/shorewall.zip
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/configuration/setting3/machine3/shorewall.zip?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/configuration/setting3/machine3/shorewall.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/index.pdf
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/index.pdf?rev=406944&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/index.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi http tunneling/scripts.pdf
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/doc/testing/rmi%20http%20tunneling/scripts.pdf?rev=406944&view=auto
==============================================================================
Binary files /tmp/tmpfVf8Tf and /tmp/tmpnjG7TL differ

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license Tue May 16 06:51:00 2006
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+ 
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+ 
+   1. Definitions.
+ 
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+ 
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+ 
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+ 
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+ 
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+ 
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+ 
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+ 
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+ 
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+ 
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+ 
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+ 
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+ 
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+ 
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+ 
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+ 
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+ 
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+ 
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+ 
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+ 
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+ 
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+ 
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+ 
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+ 
+   END OF TERMS AND CONDITIONS
+ 
+   APPENDIX: How to apply the Apache License to your work.
+ 
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+ 
+   Copyright [yyyy] [name of copyright owner]
+ 
+   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.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/license
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml Tue May 16 06:51:00 2006
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>  
+<project name="rmi" basedir=".." default="buildAll">
+   
+    <property name="src.base" value="src"/>
+    <property name="classes.dir" value="build/classes"/>
+    <property name="dist.dir" value="build/deploy"/>
+    <property name="doc.dir" value="doc"/>
+    <property name="javadoc.dir" value="${doc.dir}/javadoc"/>
+	<property name="test.deps.dir" value ="${src.base}/dependencies"/>
+
+    <target name="buildAll" description="builds all packages">
+		<antcall target="buildRMI"/> 
+		<antcall target="buildTest"/>   
+		<antcall target="javadocAll"/>  
+    </target>
+    
+    <target name="javadocAll" description="builds javadoc of all packages">
+        <antcall target="javadoc">     
+			<param name="packagenames" value="*"/>
+            <param name="excludepackagesnames" value="doctools/*, ar/org/fitc/test/**"/>
+        </antcall>
+    </target>
+    
+    <target name="buildRMI" description="build java.rmi" depends="buildFITC">
+        <antcall target="build">
+            <param name="package" value="${src.base}/java/rmi"/>
+            <param name="name" value="rmi"/>
+            <param name="toInclude1" value="java/rmi/**"/>
+	    	<param name="toInclude2" value="ar/org/fitc/rmi/**"/>
+        </antcall>       
+	<delete file="${dist.dir}/fitc.jar" failonerror="false"/>
+    </target>
+    
+    <target name="buildFITC" description="build ar.org.fitc">
+        <antcall target="build">
+			<param name="package" value="${src.base}/ar/org/fitc/rmi"/>
+            <param name="name" value="fitc"/>
+            <param name="classpath" value="${dist.dir}/fitc.jar"/>
+			<param name="toInclude2" value="ar/org/fitc/rmi/**"/>
+        </antcall>       
+     </target>
+
+	 <target name="buildTest" description="Builds all tests">
+        <antcall target="build">
+			<param name="package" value="${src.base}/ar/org/fitc/test"/>
+            <param name="name" value="test"/>
+			<param name="classpath" value="${test.deps.dir}/junit.jar:"/>
+            <param name="toInclude1" value="ar/org/fitc/test/**"/>            
+        </antcall>               
+        
+    </target>
+       
+    <target name="buildDoclet" description="build">
+        <antcall target="build">
+            <param name="package" value="${src.base}/doctools"/>
+            <param name="name" value="doctools"/>
+			<param name="toInclude1" value="doctools/*"/>
+        </antcall>
+    </target>
+
+    <target name="clean" description="Delete all generated files"> 
+        <delete dir="${classes.dir}/${package}" failonerror="false"/> 
+        <delete file="${dist.dir}/${package.name}.jar"/> 
+    </target> 
+
+    <target name="compile" description="Compiles the Task"> 
+        <mkdir dir="${classes.dir}"/> 
+        <javac srcdir="${package}" classpath="${classpath}" destdir="${classes.dir}"/> 
+    </target> 
+
+    <target name="jar" description="Jars package.name " depends="compile"> 
+        <mkdir dir="${dist.dir}"/>
+        <jar destfile="${name}.jar"  basedir="${classes.dir}" includes="${toInclude1} 
+			 ${toInclude2}"/>         
+        <move file="${name}.jar" todir="${dist.dir}"/>
+    </target> 
+    
+    <target name="javadoc" depends="buildDoclet">
+        <javadoc access="private"
+            author="true" 
+            destdir="${javadoc.dir}"
+            nodeprecated="false"
+            nodeprecatedlist="false"
+            noindex="false"
+            nonavbar="false"
+            notree="false"
+            sourcepath="${src.base}"
+            packagenames="${packagenames}"
+            excludepackagenames="${excludepackagesnames}"
+			classpath="${test.deps.dir}/junit.jar:"
+			source="1.5"            
+            splitindex="true"
+            use="true"
+            version="true">
+            <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+	    	<taglet name="doctools.SpecRefTaglet" path="${dist.dir}/doctools.jar"/>
+            <taglet name="doctools.UrlTaglet" path="${dist.dir}/doctools.jar"/>
+            <taglet name="doctools.RefTaglet" path="${dist.dir}/doctools.jar"/>        
+        </javadoc>
+    </target> 
+   
+    <target name="build" description="Build package (first parameter of this target)" >
+        <antcall target="clean">
+            <param name="package" value="${package}"/>
+        </antcall>         
+        <antcall target="jar">
+            <param name="package" value="${package}"/>
+            <param name="name" value="${name}"/>
+            <param name="toInclude" value="${toInclude1}"/>
+            <param name="toInclude" value="${toInclude2}"/>
+        </antcall>        
+    </target>
+    
+</project>
\ No newline at end of file

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/make/build.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license Tue May 16 06:51:00 2006
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+ 
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+ 
+   1. Definitions.
+ 
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+ 
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+ 
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+ 
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+ 
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+ 
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+ 
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+ 
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+ 
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+ 
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+ 
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+ 
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+ 
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+ 
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+ 
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+ 
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+ 
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+ 
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+ 
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+ 
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+ 
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+ 
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+ 
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+ 
+   END OF TERMS AND CONDITIONS
+ 
+   APPENDIX: How to apply the Apache License to your work.
+ 
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+ 
+   Copyright [yyyy] [name of copyright owner]
+ 
+   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.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/doc/license
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license Tue May 16 06:51:00 2006
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+ 
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+ 
+   1. Definitions.
+ 
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+ 
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+ 
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+ 
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+ 
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+ 
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+ 
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+ 
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+ 
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+ 
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+ 
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+ 
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+ 
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+ 
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+ 
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+ 
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+ 
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+ 
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+ 
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+ 
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+ 
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+ 
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+ 
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+ 
+   END OF TERMS AND CONDITIONS
+ 
+   APPENDIX: How to apply the Apache License to your work.
+ 
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+ 
+   Copyright [yyyy] [name of copyright owner]
+ 
+   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.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/license
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml Tue May 16 06:51:00 2006
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>  
+<project name="rmi" basedir=".." default="buildAll">
+   
+    <property name="src.base" value="src"/>
+    <property name="classes.dir" value="build/classes"/>
+    <property name="dist.dir" value="build/deploy"/>
+    <property name="doc.dir" value="doc"/>
+    <property name="javadoc.dir" value="${doc.dir}/javadoc"/>
+	<property name="test.deps.dir" value ="${src.base}/dependencies"/>
+
+    <target name="buildAll" description="builds all packages">
+		<antcall target="buildRMI"/> 
+		<antcall target="buildTest"/>   
+		<antcall target="javadocAll"/>  
+    </target>
+    
+    <target name="javadocAll" description="builds javadoc of all packages">
+        <antcall target="javadoc">     
+			<param name="packagenames" value="*"/>
+            <param name="excludepackagesnames" value="doctools/*, ar/org/fitc/test/**"/>
+        </antcall>
+    </target>
+    
+    <target name="buildRMI" description="build java.rmi" depends="buildFITC">
+        <antcall target="build">
+            <param name="package" value="${src.base}/java/rmi"/>
+            <param name="name" value="rmi"/>
+            <param name="toInclude1" value="java/rmi/**"/>
+	    	<param name="toInclude2" value="ar/org/fitc/rmi/**"/>
+        </antcall>       
+	<delete file="${dist.dir}/fitc.jar" failonerror="false"/>
+    </target>
+    
+    <target name="buildFITC" description="build ar.org.fitc">
+        <antcall target="build">
+			<param name="package" value="${src.base}/ar/org/fitc/rmi"/>
+            <param name="name" value="fitc"/>
+            <param name="classpath" value="${dist.dir}/fitc.jar"/>
+			<param name="toInclude2" value="ar/org/fitc/rmi/**"/>
+        </antcall>       
+     </target>
+
+	 <target name="buildTest" description="Builds all tests">
+        <antcall target="build">
+			<param name="package" value="${src.base}/ar/org/fitc/test"/>
+            <param name="name" value="test"/>
+			<param name="classpath" value="${test.deps.dir}/junit.jar:"/>
+            <param name="toInclude1" value="ar/org/fitc/test/**"/>            
+        </antcall>               
+        
+    </target>
+       
+    <target name="buildDoclet" description="build">
+        <antcall target="build">
+            <param name="package" value="${src.base}/doctools"/>
+            <param name="name" value="doctools"/>
+			<param name="toInclude1" value="doctools/*"/>
+        </antcall>
+    </target>
+
+    <target name="clean" description="Delete all generated files"> 
+        <delete dir="${classes.dir}/${package}" failonerror="false"/> 
+        <delete file="${dist.dir}/${package.name}.jar"/> 
+    </target> 
+
+    <target name="compile" description="Compiles the Task"> 
+        <mkdir dir="${classes.dir}"/> 
+        <javac source="1.5" target="jsr14" srcdir="${package}" classpath="${classpath}" destdir="${classes.dir}"/> 
+    </target> 
+
+    <target name="jar" description="Jars package.name " depends="compile"> 
+        <mkdir dir="${dist.dir}"/>
+        <jar destfile="${name}.jar"  basedir="${classes.dir}" includes="${toInclude1} 
+			 ${toInclude2}"/>         
+        <move file="${name}.jar" todir="${dist.dir}"/>
+    </target> 
+    
+    <target name="javadoc" depends="buildDoclet">
+        <javadoc access="private"
+            author="true" 
+            destdir="${javadoc.dir}"
+            nodeprecated="false"
+            nodeprecatedlist="false"
+            noindex="false"
+            nonavbar="false"
+            notree="false"
+            sourcepath="${src.base}"
+            packagenames="${packagenames}"
+            excludepackagenames="${excludepackagesnames}"
+	    classpath="${test.deps.dir}/junit.jar:"
+	    source="1.5"            
+            splitindex="true"
+            use="true"
+            version="true">
+            <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+	    	<taglet name="doctools.SpecRefTaglet" path="${dist.dir}/doctools.jar"/>
+            <taglet name="doctools.UrlTaglet" path="${dist.dir}/doctools.jar"/>
+            <taglet name="doctools.RefTaglet" path="${dist.dir}/doctools.jar"/>        
+        </javadoc>
+    </target> 
+   
+    <target name="build" description="Build package (first parameter of this target)" >
+        <antcall target="clean">
+            <param name="package" value="${package}"/>
+        </antcall>         
+        <antcall target="jar">
+            <param name="package" value="${package}"/>
+            <param name="name" value="${name}"/>
+            <param name="toInclude" value="${toInclude1}"/>
+            <param name="toInclude" value="${toInclude2}"/>
+        </antcall>        
+    </target>
+    
+</project>
\ No newline at end of file

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/make/build.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/DGCScheduledGC.java Tue May 16 06:51:00 2006
@@ -0,0 +1,101 @@
+/* 
+*  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 ar.org.fitc.rmi.dgc;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import ar.org.fitc.rmi.utils.PropertiesReader;
+
+/*
+ * NOTE: 
+ * This class has been modified in order to support 
+ * Java VM 1.4.2 using the javac's target jsr14 
+ */
+
+/**
+ * This class schedules calls to the <code>java.lang.System.gc()</code>
+ * method.
+ * 
+ * @author Gustavo Petri
+ */
+public class DGCScheduledGC {
+
+    /**
+     * Timer to schedule the calls
+     */
+    private Timer timer;
+
+    /**
+     * The interval used by the Timer
+     */
+    private static long gcInterval;
+
+    /**
+     * Flag to indicate the termination of the Thread
+     */
+    private static boolean running = false;
+
+    static {
+        gcInterval = PropertiesReader.readLong(
+                "ar.org.fitc.rmi.dgc.gcInterval", 60000);
+    }
+
+    /**
+     * Schedules the calls to <code>java.lang.System.gc()</code>
+     * 
+     * @see <a
+     *      href="http://archives.java.sun.com/cgi-bin/wa?A2=ind9911&L=rmi-users&F=&S=&P=20099">
+     *      Reference </a>
+     */
+
+    private DGCScheduledGC() {
+        timer = new Timer(true);
+        try {
+            timer.schedule(new RunGCTask(), gcInterval, gcInterval);
+        } catch (Exception e) {
+            // There is no chance that this try will fail unless the runGC
+            // method be errased.
+            throw new AssertionError();
+        }
+        running = true;
+    }
+
+    /**
+     * Schedules and starts the calls to <code>java.lang.System.gc()</code>
+     * 
+     * @see <a
+     *      href="http://archives.java.sun.com/cgi-bin/wa?A2=ind9911&L=rmi-users&F=&S=&P=20099">
+     *      Reference </a>
+     */
+    public static synchronized final void startGC() {
+        if (!running) {
+            new DGCScheduledGC();
+        }
+    }
+
+    /**
+     * Runs the <code>java.lang.System.gc()</code> method.
+     */
+    private class RunGCTask extends TimerTask {
+
+        @Override
+        public void run() {
+            System.gc();
+        }
+    }
+   
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCClient.java Tue May 16 06:51:00 2006
@@ -0,0 +1,410 @@
+/* 
+*  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 ar.org.fitc.rmi.dgc.client;
+
+import java.lang.ref.WeakReference;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.rmi.Remote;
+import java.rmi.UnmarshalException;
+import java.rmi.dgc.Lease;
+import java.rmi.dgc.VMID;
+import java.rmi.server.ObjID;
+import java.rmi.server.RemoteObjectInvocationHandler;
+import java.rmi.server.RemoteRef;
+import java.rmi.server.RemoteStub;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Timer;
+import java.util.WeakHashMap;
+
+import ar.org.fitc.rmi.dgc.DGCScheduledGC;
+import ar.org.fitc.rmi.transport.Endpoint;
+import ar.org.fitc.rmi.transport.TransportManager;
+import ar.org.fitc.rmi.utils.Pair;
+import ar.org.fitc.rmi.utils.PropertiesReader;
+
+/*
+ * NOTE: 
+ * This class has been modified in order to support 
+ * Java VM 1.4.2 using the javac's target jsr14 
+ */
+
+/**
+ * Implements the client's side of the RMI Garbage Collector. This class takes
+ * care of scheduling and sending the dirty and clean calls to the server side
+ * of RMI DGC, when stubs of remote objects are received.
+ * 
+ * @author Gonzalo Ortega
+ * 
+ */
+public final class DGCClient {
+
+	private static DGCClient dgcClient;
+
+    private VMID vmID;
+
+    private long sequenceNumber;
+
+    private long leaseValue;
+
+    private ObjID dgcObjID;
+
+    private Map<Remote, WeakReference<Remote>> stubsCacheTable;
+
+    private Map<RemoteRef, Pair<Endpoint, ObjID>> deserializedRemoteRefTable;
+
+    private Map<Pair<Endpoint, ObjID>, Long> liveReferences;
+
+    private Map<Long, DirtyTask> dirtyTaskTable;
+
+    private Timer taskScheduler;
+
+    private DGCQueuePoll unreferencedPoll;
+    
+    /** The method hash for the "clean" method in the DGC */
+    private static final long SEND_CLEAN_OP_NUM = -5803803475088455571L;
+    
+    /** The method hash for the "dirty" method in the DGC */
+    private static final long SEND_DIRTY_OP_NUM = -8139341527526761862L;
+
+    /**
+     * Implements the singleton behavior. If there is an instance of
+     * <code>DGCClient</code> is returned, else a new instance is created and
+     * returned.
+     * 
+     * @return the only <code>DGCClient</code> instance
+     */
+    public static synchronized final DGCClient getDGCClient() {
+        if (dgcClient == null) {
+            dgcClient = new DGCClient();
+        }
+        return dgcClient;
+    }
+
+    /**
+     * Creates a new instance of DGCClient. Launches the scheduler (as a daemon)
+     * that sends the dirty calls, and starts the monitor (as a daemon) that
+     * will look for unreferenced stubs.
+     */
+    @Deprecated
+    private DGCClient() {
+        stubsCacheTable = new WeakHashMap<Remote, WeakReference<Remote>>();
+        deserializedRemoteRefTable = new WeakHashMap<RemoteRef, Pair<Endpoint, ObjID>>();
+        dirtyTaskTable = new HashMap<Long, DirtyTask>();
+        liveReferences = new Hashtable<Pair<Endpoint, ObjID>, Long>();
+
+        /*
+         * RMI API states that a client should use a null value if it is unable
+         * to generate a VMID. The only way to know if the generated VMID is
+         * somehow "unique" is calling the deprecated VMID.isUnique() method, as
+         * long the VMID constructor doesn't throw any exception. (it always
+         * success)
+         */
+        if (VMID.isUnique()) {
+            vmID = new VMID();
+        }
+        sequenceNumber = 0;
+        leaseValue = 600000L;
+        dgcObjID = new ObjID(ObjID.DGC_ID);
+
+        
+        
+        String propertyValue = 
+            PropertiesReader.readString("java.rmi.dgc.leaseValue");
+        if (propertyValue != null) {
+            try {
+                leaseValue = Long.parseLong(propertyValue);
+            } catch (NumberFormatException e) {
+            }
+        }
+
+        taskScheduler = new Timer(true);
+
+        unreferencedPoll = new DGCQueuePoll(this);
+        unreferencedPoll.setDaemon(true);
+        unreferencedPoll.setName("rmi.dgc.client.unreferencedStubPoll");
+        unreferencedPoll.start();
+
+        DGCScheduledGC.startGC();
+    }
+
+    /**
+     * Stores the data received during the deserialization of a stub. The
+     * <code>Endpoint</code> and <code>ObjID</code> from the remote
+     * reference are stored in order to be used to send dirty and clean calls
+     * grouped by Endpoint.
+     * 
+     * @param ref
+     *            The reference received from the stream.
+     * @param ep
+     *            The <code>Endpoint</code> that corresponds to the reference.
+     * @param objID
+     *            The <code>ObjID</code> that corresponds to the reference.
+     */
+    public synchronized final void registerRemoteRef(RemoteRef ref, Endpoint ep,
+            ObjID objID) {
+        if (!deserializedRemoteRefTable.containsKey(ref)) {
+            deserializedRemoteRefTable.put(ref, new Pair<Endpoint, ObjID>(ep,
+                    objID));
+        }
+        return;
+    }
+
+    /**
+     * If the received stub is the first instance of that stub in the client’s
+     * system, it is cached and returned. The method
+     * <code>activateReference</code> is called in order to start the lease
+     * renewal process. If there is a previous instance of this stub in the
+     * system, the received stub is discarded and the cached instance is
+     * returned.
+     * 
+     * @param stub
+     *            The stub received during deserialization process.
+     * @return The unique instance of this stub in the client's system.
+     * @throws UnmarshalException
+     *             If there is missing information or the dirty call for the
+     *             received stub fails.
+     */
+    public synchronized Remote getStubInstance(Remote stub)
+            throws UnmarshalException {
+        // Get internal RemoteRef from stub
+        RemoteRef ref = null;
+        if (stub instanceof RemoteStub) {
+            ref = ((RemoteStub) stub).getRef();
+        }
+        if (Proxy.isProxyClass(stub.getClass())) {
+            InvocationHandler ih = Proxy.getInvocationHandler(stub);
+            if (ih instanceof RemoteObjectInvocationHandler) {
+                ref = ((RemoteObjectInvocationHandler) ih).getRef();
+            }
+        }
+        // Check whether there is a stub already registered in the DGC
+        WeakReference<Remote> weakStub;
+        if ((weakStub = stubsCacheTable.get(stub)) != null) {
+            Remote cachedStub = weakStub.get();
+            if (cachedStub != null) {
+                checkLiveness(ref);
+                return cachedStub;
+            }
+        }
+        Pair<Endpoint, ObjID> data = activateReference(ref);
+        weakStub = unreferencedPoll.addToReferenceQueue(stub, data);
+        stubsCacheTable.put(stub, weakStub);
+        return stub;
+    }
+
+    /**
+     * Sends the first dirty for a received reference in order to get the
+     * appropiate lease time from the server, and then schedules the dirty call
+     * for lease renewal. If the first dirty message fails, a clean "strong"
+     * message is sent for that remote object. If the first dirty call
+     * succeeded, the reference becomes a "live" reference for the client DGC.
+     * 
+     * @param ref
+     *            The reference received inside the stub
+     * @return The <code>Endpoint / ObjID</code> pair contained inside the
+     *         reference
+     * @throws UnmarshalException
+     *             If the first dirty call fails
+     */
+    private final Pair<Endpoint, ObjID> activateReference(RemoteRef ref)
+            throws UnmarshalException {
+        // Get necessary data previously stored during RemoteRef
+        // deserialization.
+        Pair<Endpoint, ObjID> data = deserializedRemoteRefTable.get(ref);
+        if (data == null) {
+            throw new UnmarshalException(
+                    "Impossible to get a stub for this object.");
+        }
+        Lease lease = sendDirty(data.getFirst(),
+                new ObjID[] { data.getSecond() });
+
+        if (lease != null) {
+            enqueueDirtyCall(data, lease.getValue());
+            liveReferences.put(data, new Long(lease.getValue()));
+            return data;
+        } else {
+            sendClean(data.getFirst(), new ObjID[] { data.getSecond() }, true);
+            throw new UnmarshalException(
+                    "Impossible to get a stub for this object.");
+        }
+    }
+
+    /**
+     * Checks whether the received reference is a "live" reference for the
+     * client garbage collector. The client DGC sends dirties for all "live"
+     * references in order to renew the lease with the remote server. If the DGC
+     * is not sending dirties for a reference (because of persistent network
+     * problems, for instance) that reference is no longer considered "live". If
+     * the received reference is not "live", the method
+     * <code>activateReference</code> will be called in order to restart the
+     * lease renewal process.
+     * 
+     * @param ref
+     *            The reference to be tested
+     */
+    public synchronized final void checkLiveness(RemoteRef ref) {
+        Pair<Endpoint, ObjID> dataRef = deserializedRemoteRefTable.get(ref);
+        if (liveReferences.containsKey(dataRef)) {
+            return;
+        }
+        try {
+            activateReference(ref);
+        } catch (UnmarshalException e) {
+            // An Exception was thrown trying to bring the reference back to
+            // life
+        }
+    }
+
+    /**
+     * Schedules a dirty call to be sent periodically. The dirty call will be
+     * sent every <code>period</code> / 2 milliseconds.
+     * 
+     * @param data
+     *            An <code>Endpoint / ObjID</code> pair representing a
+     *            reference.
+     * @param period
+     *            The lease period granted by the server.
+     */
+    void enqueueDirtyCall(Pair<Endpoint, ObjID> data, long period) {
+        synchronized (dirtyTaskTable) {
+            DirtyTask task = dirtyTaskTable.get(new Long(period));
+            if (task != null) {
+                task.scheduleDirty(data);
+            } else {
+                task = new DirtyTask(this, period, taskScheduler,
+                        dirtyTaskTable);
+                task.scheduleDirty(data);
+                taskScheduler.schedule(task, period / 2, period / 2);
+                dirtyTaskTable.put(new Long(period), task);
+            }
+        }
+    }
+
+    /**
+     * Removes the reference represented by the <code>Endpoint / ObjID</code>
+     * pair from the dirty calls scheduler. No more dirties will be sent for
+     * that reference, and the reference is erased from the "live" references
+     * internal table.
+     * 
+     * @param ep
+     *            The <code>Endpoint</code> of the remote reference.
+     * @param objID
+     *            The <code>ObjID</code> of the remote reference.
+     */
+    void cancelDirtyCall(Endpoint ep, ObjID objID) {
+        synchronized (dirtyTaskTable) {
+            Pair<Endpoint, ObjID> dataRef = new Pair<Endpoint, ObjID>(ep, objID);
+            Long period = liveReferences.get(dataRef);
+            DirtyTask task = dirtyTaskTable.get(period);
+            if (task != null) {
+                task.cancelDirty(ep, objID);
+                if (task.isEmpty()) {
+                    task.cancel();
+                    dirtyTaskTable.remove(period);
+                    /* SEE DISCLAIMER */
+                    //taskScheduler.purge();
+                }
+            }
+            liveReferences.remove(dataRef);
+        }
+    }
+
+    /**
+     * Removes the reference represented by the <code>Endpoint / ObjID</code>
+     * pair from the "live" references internal table.
+     * 
+     * @param dataRef
+     *            The <code>Endpoint / ObjID</code> pair representing the
+     *            reference
+     */
+    void removeFromLiveReferences(Pair<Endpoint, ObjID> dataRef) {
+        liveReferences.remove(dataRef);
+    }
+
+    /**
+     * Checks whether the reference represented by the
+     * <code>Endpoint / ObjID</code> pair is a "live" reference. The client
+     * DGC sends dirties for all "live" references in order to renew the lease
+     * with the remote server.
+     * 
+     * @param dataRef
+     *            An <code>Endpoint / ObjID</code> pair representing a
+     *            reference
+     * @return true if the received pair is a "live" reference
+     */
+    boolean isLiveReference(Pair<Endpoint, ObjID> dataRef) {
+        return liveReferences.containsKey(dataRef);
+    }
+
+    /**
+     * Sends a clean call to the DGC of the remote server.
+     * 
+     * @param ep
+     *            The <code>Endpoint</code> where the clean call will be sent.
+     * @param obj
+     *            An array containing the object identifiers that will be sent
+     *            in the clean call.
+     * @param strong
+     *            The flag that indicates a 'strong' clean call
+     */
+    void sendClean(Endpoint ep, ObjID[] obj, boolean strong) {
+    	synchronized(dgcObjID) { 
+	        Object[] args = new Object[] { obj, ++sequenceNumber, vmID, strong };
+	        TransportManager tm = TransportManager.getTransportManager();
+	        try {
+	            tm.invoke(dgcObjID, ep, args, SEND_CLEAN_OP_NUM, false);
+	        } catch (Exception e) {
+	            // The clean call has failed.
+	        }
+    	}
+    }
+
+    /**
+     * Sends a dirty call to the DGC of the remote server, and returns the
+     * <code>Lease</code> granted by that DGC.
+     * 
+     * @param ep
+     *            The <code>Endpoint</code> where the dirty call will be sent.
+     * @param obj
+     *            An array containing the object identifiers that will be sent
+     *            in the dirty call.
+     * @return The <code>Lease</code> returned from the server DGC, or
+     *         <code>null</code> if the call has failed.
+     */
+    Lease sendDirty(Endpoint ep, ObjID[] obj) {
+    	synchronized(dgcObjID) { 
+	        Lease lease = new Lease(vmID, leaseValue);
+	        Object[] args = new Object[] { obj, ++sequenceNumber, lease };
+	        TransportManager tm = TransportManager.getTransportManager();
+	        Object response;
+	        try {
+	            response = tm.invoke(dgcObjID, ep, args, SEND_DIRTY_OP_NUM, true);
+	            if (response instanceof Lease) {
+	                if (vmID == null) {
+	                    vmID = ((Lease) response).getVMID();
+	                }
+	                return (Lease) response;
+	            }
+	            return null;
+	        } catch (Exception e) {
+	            return null;
+	        }
+    	}
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DGCQueuePoll.java Tue May 16 06:51:00 2006
@@ -0,0 +1,153 @@
+/* 
+*  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 ar.org.fitc.rmi.dgc.client;
+
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.rmi.Remote;
+import java.rmi.server.ObjID;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+
+import ar.org.fitc.rmi.transport.Endpoint;
+import ar.org.fitc.rmi.utils.Pair;
+
+/*
+ * NOTE: 
+ * This class has been modified in order to support 
+ * Java VM 1.4.2 using the javac's target jsr14 
+ */
+
+/**
+ * This class sends the corresponding "clean" call to the remote server’s
+ * garbage collector when a stub with a "live" reference is collected by the
+ * local garbage collector.
+ * 
+ * @author Gonzalo Ortega
+ * 
+ */
+final class DGCQueuePoll extends Thread {
+
+    private ReferenceQueue<Remote> stubsQueue;
+
+    private Map<WeakReference, Pair<Endpoint, ObjID>> referenceDataTable;
+
+    private DGCClient dgc;
+
+    private Map<Endpoint, ArrayList<ObjID>> queuedCleanCalls;
+
+    /**
+     * Creates a new instance of <code>DGCQueuePoll</code>.
+     * 
+     * @param cdgc
+     *            The client garbage collector which has instantiated this
+     *            class.
+     */
+    public DGCQueuePoll(DGCClient cdgc) {
+        stubsQueue = new ReferenceQueue<Remote>();
+//        referenceDataTable = new Hashtable<WeakReference, Pair<Endpoint, ObjID>>();
+        referenceDataTable = new Hashtable<WeakReference, Pair<Endpoint, ObjID>>();
+        queuedCleanCalls = new HashMap<Endpoint, ArrayList<ObjID>>();
+        dgc = cdgc;
+    }
+
+    /**
+     * Adds a stub to the internal reference queue, in order to be detected when
+     * it is garbage collected by the local garbage collector.
+     * 
+     * @param stub
+     *            The stub that the clean call will be sent for.
+     * @param data
+     *            The <code>Endpoint / ObjID</code> pair representing the
+     *            internal data of the remote reference contained inside the
+     *            stub.
+     * @return A weak reference to the stub.
+     */
+    public final WeakReference<Remote> addToReferenceQueue(Remote stub,
+            Pair<Endpoint, ObjID> data) {
+        WeakReference<Remote> weakStub;
+        weakStub = new WeakReference<Remote>(stub, stubsQueue);
+        referenceDataTable.put(weakStub, data);
+        return weakStub;
+    }
+
+    /**
+     * Waits for the local garbage collector to collect a stub, and then removes
+     * the reference corresponding to that stub from the Client DGC's "live"
+     * references table, stops sending dirty calls for that reference, and sends
+     * a clean call for that reference to te remote server's garbage collector.
+     * 
+     */
+    @SuppressWarnings("unchecked")
+    public final void run() {
+        while (true) {
+            try {
+                WeakReference<Remote> remove = (WeakReference<Remote>) stubsQueue
+                        .remove();
+                do {
+                    Pair<Endpoint, ObjID> data = referenceDataTable.get(remove);
+                    if (dgc.isLiveReference(data)) {
+                        dgc.cancelDirtyCall(data.getFirst(), data.getSecond());
+                        enqueueCleanCall(data.getFirst(), data.getSecond());
+                    }
+                    referenceDataTable.remove(remove);
+                } while ((remove = (WeakReference<Remote>) stubsQueue.poll()) 
+                        != null);
+                sendQueuedCalls();
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+
+    /**
+     * Groups the clean calls to be sent by <code>Endpoint</code>, in order
+     * to send only one clean call for all the objects exported in the same
+     * <code>Endpoint</code>.
+     * 
+     * @param ep
+     *            The <code>Endpoint</code> of the reference.
+     * @param objID
+     *            The <code>ObjID</code> of the reference.
+     */
+    private final void enqueueCleanCall(Endpoint ep, ObjID objID) {
+        ArrayList<ObjID> objIDList;
+        objIDList = queuedCleanCalls.get(ep);
+        if (objIDList == null) {
+            objIDList = new ArrayList<ObjID>();
+            queuedCleanCalls.put(ep, objIDList);
+        }
+        objIDList.add(objID);
+    }
+
+    /**
+     * Sends all the grouped clean calls to the remote server's garbage
+     * collector.
+     */
+    private final void sendQueuedCalls() {
+        if (!queuedCleanCalls.isEmpty()) {
+            ArrayList<ObjID> objIDList;
+            for (Endpoint ep : queuedCleanCalls.keySet()) {
+                objIDList = queuedCleanCalls.get(ep);
+                ObjID[] objArray = new ObjID[objIDList.size()];
+                objIDList.toArray(objArray);
+                dgc.sendClean(ep, objArray, false);
+            }
+            queuedCleanCalls.clear();
+        }
+    }
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java?rev=406944&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi2/rmi-1.4.2/src/ar/org/fitc/rmi/dgc/client/DirtyRetryTask.java Tue May 16 06:51:00 2006
@@ -0,0 +1,116 @@
+/* 
+ *  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 ar.org.fitc.rmi.dgc.client;
+
+import java.rmi.server.ObjID;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import ar.org.fitc.rmi.transport.Endpoint;
+import ar.org.fitc.rmi.utils.Pair;
+
+/**
+ * When scheduled dirty calls fail, the dirty retry process uses instances of
+ * this class to attempt to get a lease from the server. A <code>Timer</code>
+ * should run this task in order to send the dirties for renewing the leases
+ * periodically.
+ * 
+ * @author Gonzalo Ortega
+ * 
+ */
+final class DirtyRetryTask extends TimerTask {
+
+	private DGCClient dgc;
+
+	private long originalPeriod;
+
+	private Timer taskScheduler;
+
+	private Endpoint ep;
+
+	private ObjID[] objIDs;
+
+	private int retryNumber;
+
+	private static final int retriesAllowed = 4;
+
+	/**
+	 * Creates a new instance of <code>DirtyRetryTask</code>.
+	 * 
+	 * @param dgc
+	 *            The client DGC.
+	 * @param period
+	 *            The original period in milliseconds of the lease granted to
+	 *            the references grouped in the <code>DirtyTask</code> wich
+	 *            has isntantiated this task.
+	 * @param taskScheduler
+	 *            The <code>Timer</code> object which will run this scheduled
+	 *            <code>DirtyTask</code>.
+	 * @param ep
+	 *            The <code>Endpoint</code> of the references grouped in the
+	 *            failed dirty call.
+	 * @param objIDs
+	 *            The <code>ObjID</code> of the references drouped in the
+	 *            failed dirty call.
+	 * @param retryNumber
+	 *            The number of times the dirty call has been retried.
+	 */
+	public DirtyRetryTask(DGCClient dgc, long period, Timer taskScheduler,
+			Endpoint ep, ObjID[] objIDs, int retryNumber) {
+		this.dgc = dgc;
+		this.originalPeriod = period;
+		this.taskScheduler = taskScheduler;
+		this.ep = ep;
+		this.objIDs = objIDs;
+		this.retryNumber = ++retryNumber;
+	}
+
+	/**
+	 * This <code>DirtyRetryTask</code> will try to re-send the dirty call to
+	 * the detination <code>Endpoint</code>. If this dirty call success, the
+	 * references will be re-scheduled for normal lease renewal. If the dirty
+	 * call fails, a new <code>DirtyRetryTask</code> will be scheduled with an
+	 * exponential delay time for a new retry. If four retry attempts have been
+	 * made and the retry call still hasn't succeeded, no more dirties for those
+	 * references will be sent. The references will be removed from the DGC
+	 * "live" references table and a clean "strong" call will be sent to the
+	 * remote server's DGC.
+	 */
+	@Override
+	public final void run() {
+		if (dgc.sendDirty(ep, objIDs) != null) {
+			for (ObjID objID : objIDs) {
+				dgc.enqueueDirtyCall(new Pair<Endpoint, ObjID>(ep, objID),
+						originalPeriod);
+			}
+		} else {
+			if (retryNumber < retriesAllowed) {
+				DirtyRetryTask retryTask = new DirtyRetryTask(dgc,
+						originalPeriod, taskScheduler, ep, objIDs, retryNumber);
+				taskScheduler.schedule(retryTask, Double.valueOf(
+						(Math.pow(2, retryNumber))).longValue() * 1000);
+			} else {
+				// Giving up on dirties. Sending clean strong call for the
+				// references.
+				for (ObjID objID : objIDs) {
+					dgc.removeFromLiveReferences(new Pair<Endpoint, ObjID>(ep,
+							objID));
+				}
+				dgc.sendClean(ep, objIDs, true);
+			}
+		}
+	}
+}