[Remoterengine-commits] r91 - in pkg/RemoteREngine: . inst inst/java_src inst/java_src/src/client/org/rosuda/REngine/remote/client inst/java_src/src/common/org/rosuda/REngine/remote/common inst/java_src/src/common/org/rosuda/REngine/remote/common/callbacks inst/java_src/src/common/org/rosuda/REngine/remote/common/console inst/java_src/src/common/org/rosuda/REngine/remote/common/history inst/java_src/src/common/org/rosuda/REngine/remote/common/tools inst/java_src/src/server/org/rosuda/REngine/remote/server inst/java_src/src/server/org/rosuda/REngine/remote/server/callbacks inst/java_src/src/server/org/rosuda/REngine/remote/server/console

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Sep 6 21:15:39 CEST 2009


Author: romain
Date: 2009-09-06 21:15:38 +0200 (Sun, 06 Sep 2009)
New Revision: 91

Added:
   pkg/RemoteREngine/configure
   pkg/RemoteREngine/inst/java_src/
   pkg/RemoteREngine/inst/java_src/build.xml
   pkg/RemoteREngine/inst/java_src/src/client/org/rosuda/REngine/remote/client/RemoteREngine.java
   pkg/RemoteREngine/inst/java_src/src/client/org/rosuda/REngine/remote/client/callbacks/
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/RemoteREngineInterface.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/callbacks/InputCallback.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/callbacks/RCallback.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/callbacks/RestrictedCallback.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/console/Command.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/console/CommandSender.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/console/DefaultConsoleReadLine.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/console/RemoteREngineClientSender.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/console/UnknownSender.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/CommandHistory.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/CommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/ContainsCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/EndsWithCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/NoCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/PatternCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/StartsWithCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/history/YesCommandMatcher.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/NoFactoryForServiceException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceImplementationNotFoundException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceManager.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceWrappedException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/StoppableThread.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/StoppableThreadWithSynchronizer.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/Synchronizer.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/Waiter.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/REngineServer.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/RemoteREngine_Server.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/RemoteRMainLoopCallbacks.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/callbacks/CallbackResponseWaiter.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/callbacks/CallbackSender.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/callbacks/ClientCallbackListener.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/Command.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleCallbackHandler.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleSync.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleThread.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ServerConsoleSender.java
Removed:
   pkg/RemoteREngine/inst/java_src/Makefile
   pkg/RemoteREngine/inst/java_src/Makefile.win
   pkg/RemoteREngine/inst/java_src/build.xml
   pkg/RemoteREngine/inst/java_src/src/client/org/rosuda/REngine/remote/client/RemoteREngine.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/RemoteREngineInterface.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/callbacks/RCallback.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/NoFactoryForServiceException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceImplementationNotFoundException.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/ServiceManager.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/Synchronizer.java
   pkg/RemoteREngine/inst/java_src/src/common/org/rosuda/REngine/remote/common/tools/apt/
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/REngineServer.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/RemoteREngine_Server.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/RemoteRMainLoopCallbacks.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/callbacks/ClientCallbackListener.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleCallbackHandler.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleCallbackSync.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleSync.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/ConsoleThread.java
   pkg/RemoteREngine/inst/java_src/src/server/org/rosuda/REngine/remote/server/console/DefaultConsoleReadLine.java
Log:
moved src to inst/java_src

Added: pkg/RemoteREngine/configure
===================================================================
--- pkg/RemoteREngine/configure	                        (rev 0)
+++ pkg/RemoteREngine/configure	2009-09-06 19:15:38 UTC (rev 91)
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd inst/java_src
+"${R_HOME}/bin/Rscript" -e "ant::ant()"
+

Copied: pkg/RemoteREngine/inst/java_src (from rev 74, pkg/RemoteREngine/src)

Deleted: pkg/RemoteREngine/inst/java_src/Makefile
===================================================================
--- pkg/RemoteREngine/src/Makefile	2009-08-26 16:58:25 UTC (rev 74)
+++ pkg/RemoteREngine/inst/java_src/Makefile	2009-09-06 19:15:38 UTC (rev 91)
@@ -1,11 +0,0 @@
-FAKE_OBJ=remoterengine.so
-
-all: 
-	ant all
-	@touch $(FAKE_OBJ)
-
-clean:
-	rm -fv $(FAKE_OBJ)
-
-
-

Deleted: pkg/RemoteREngine/inst/java_src/Makefile.win
===================================================================
--- pkg/RemoteREngine/src/Makefile.win	2009-08-26 16:58:25 UTC (rev 74)
+++ pkg/RemoteREngine/inst/java_src/Makefile.win	2009-09-06 19:15:38 UTC (rev 91)
@@ -1,4 +0,0 @@
-all:
-	ant all
-
-clean:

Deleted: pkg/RemoteREngine/inst/java_src/build.xml
===================================================================
--- pkg/RemoteREngine/src/build.xml	2009-08-26 16:58:25 UTC (rev 74)
+++ pkg/RemoteREngine/inst/java_src/build.xml	2009-09-06 19:15:38 UTC (rev 91)
@@ -1,310 +0,0 @@
-<?xml version="1.0"?>
-<project name="remoterengine" default="all" basedir=".">
-
-  <!--{{{ Copyright (c) 2009, Romain Francois <francoisromain at free.fr>
- :tabSize=2:indentSize=2:noTabs=false:folding=explicit:collapseFolds=1:
- This file is part of the RemoteREngine project
- 
- The RemoteREngine project is free software: 
- you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
- 
- The RemoteREngine project is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- along with the RemoteREngine project. If not, see <http://www.gnu.org/licenses/>.
-}}}-->
-
-	<!--{{{ Properties -->
-  <property file="./build.properties"/>
-  <property name="compiler.debug"         value="on" />
-  <property name="compiler.debuglevel"    value="lines,vars,source" />
-  <property name="compiler.optimize"      value="off" />
-  <property name="compiler.deprecation"   value="off" />
-  <property name="compiler.verbose"       value="off" />
-  <property name="compiler.nowarn"        value="off" />
-  <property name="compiler.target"        value="1.5" />
-  <property name="compiler.source"        value="1.5" />
-  
-  <property name="target.dir" value="${install.dir}/java" />
-  
-  <!-- TODO: remove when we move to testng -->
-  <property name="JUNIT_JAR" value="lib/junit-4.7.jar" />
-  
-  <!--}}}-->
-    
-	<!--{{{ clean -->
-	<target name="clean">
-		<delete dir="build" />
-		<delete dir="jars" />
-		
-		<delete dir="${javadoc.dir}" />
-	</target>
-
-	<target name="init" depends="clean"> 	
-		<mkdir dir="build" />
-		<mkdir dir="build/common" />
-		<mkdir dir="build/server" />
-		<mkdir dir="build/client" />
-		<mkdir dir="build/stubs"/>
-		<mkdir dir="build/annotations"/>
-		<mkdir dir="build/client-junit"/>
-		
-		<mkdir dir="jars" />
-		
-		<mkdir dir="${javadoc.dir}" />
-		<mkdir dir="${target.dir}" />
-		
-	</target>
-	<!-- }}} -->
-	
-	<!--{{{ common -->
-	
-	<path id="common_classpath">
-		<pathelement location="lib/REngine.jar" />
-	</path>
-	
-	<target name="common" depends="init">
-		<javac srcdir="src/common" 
-			destdir="build/common"  
-			includeJavaRuntime="yes"
-			debug="${compiler.debug}"
-      debuglevel="${compiler.debuglevel}"
-      optimize="${compiler.optimize}"
-      deprecation="${compiler.deprecation}"
-      verbose="${compiler.verbose}"
-      nowarn="${compiler.nowarn}"
-      target="${compiler.target}"
-      source="${compiler.source}" >
-			<classpath refid="common_classpath" />
-		</javac>	
-		
-	</target>
-	<target name="javadoc"
-		description="Compile the Javadoc API documentation to dist dir">
-		<javadoc
-		           destdir="${javadoc.dir}"
-		           author="true"
-		           version="true"
-		           use="true"
-				   private="true"
-		           windowtitle="Remote R Server Javadoc"
-				   classpathref="server_classpath">
-
-		    <fileset dir="src" defaultexcludes="yes">	
-		    	<exclude name="**/*.xml"/>
-		    	<exclude name="**/*.properties"/>
-		    	<exclude name="**/*.html"/>
-		    	<exclude name="**/*.htm"/>
-		    	<exclude name="**/test/*"/>
-		    	<exclude name="**/*Test.java"/>
-		    	<exclude name="**/All*Test.java"/>
-		    	<exclude name="**/All*Tests.java"/>
-		    </fileset>
-
-		    <doctitle><![CDATA[<h1>Remote R Server Javadoc</h1>]]></doctitle>
-		    <bottom><![CDATA[<i>Copyright &#169; 2009, Romain Francois <a href="mailto://francoisromain@free.fr">francoisromain at free.fr</a></i>]]></bottom>
-		    <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
-		    <link href="http://www.rforge.net/org/docs/" />
-		    <link href="."/>
-		</javadoc>
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ server side -->
-	
-	<path id="server_classpath">
-		<pathelement location="build/common" />
-		<pathelement location="lib/REngine.jar" />
-		<pathelement location="lib/JRIEngine.jar" />
-		<pathelement location="lib/JRI.jar" />
-	</path>
-	
-	<target name="server" depends="common">
-		<javac srcdir="src/server" 
-			destdir="build/server"  
-			includeJavaRuntime="yes"
-			debug="${compiler.debug}"
-      debuglevel="${compiler.debuglevel}"
-      optimize="${compiler.optimize}"
-      deprecation="${compiler.deprecation}"
-      verbose="${compiler.verbose}"
-      nowarn="${compiler.nowarn}"
-      target="${compiler.target}"
-      source="${compiler.source}" >
-			<classpath refid="server_classpath" />
-		</javac>
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ client side -->
-	<path id="client_classpath">
-		<pathelement location="build/common" />
-		<pathelement location="lib/REngine.jar" />
-	</path>
-	
-	<target name="client" depends="common,server">
-		<javac
-				destdir="build/client"  
-				includeJavaRuntime="yes"
-				debug="${compiler.debug}"
-      	debuglevel="${compiler.debuglevel}"
-      	optimize="${compiler.optimize}"
-      	deprecation="${compiler.deprecation}"
-      	verbose="${compiler.verbose}"
-      	nowarn="${compiler.nowarn}"
-      	target="${compiler.target}"
-      	source="${compiler.source}">
-      
-      <src path="src/client" />
-			<classpath refid="client_classpath" />
-			<include name="**/*.java"/>
-			<exclude name="**/test/*"/>
-
-		</javac>
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ client and server stubs -->
-	<path id="stubs_classpath">
-		<pathelement location="build/server" />
-		<pathelement location="build/common" />
-		<pathelement location="build/client" />
-		<pathelement location="lib/REngine.jar" />
-		<pathelement location="lib/JRIEngine.jar" />
-		<pathelement location="lib/JRI.jar" />
-	</path>
-	
-
-	<target name="stubs" depends="common,client,server">
-		<!-- server stubs -->
-		<rmic base="build/stubs" classpathref="stubs_classpath" 
-			classname="org.rosuda.REngine.remote.server.files.RemoteFileInputStream_Server" />
-		<rmic base="build/stubs" classpathref="stubs_classpath"  
-			classname="org.rosuda.REngine.remote.server.files.RemoteFileOutputStream_Server" />
-		<!-- client stubs (callbacks) -->
-		<rmic base="build/stubs" classpathref="stubs_classpath"  
-			classname="org.rosuda.REngine.remote.client.RemoteREngine" />
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ annotation processing -->
-	<path id="annotation_classpath">
-		<pathelement location="lib/REngine.jar" />
-		<pathelement location="build/common" />
-		<pathelement location="build/server" />
-		<pathelement location="build/client" />
-	</path>
-	
-	<target name="annotation-javac" depends="client">
-		<javac srcdir="src/apt" 
-			destdir="build/annotations"  
-			includeJavaRuntime="yes"
-			debug="${compiler.debug}"
-      debuglevel="${compiler.debuglevel}"
-      optimize="${compiler.optimize}"
-      deprecation="${compiler.deprecation}"
-      verbose="${compiler.verbose}"
-      nowarn="${compiler.nowarn}"
-      target="${compiler.target}"
-      source="${compiler.source}" >
-			<classpath refid="annotation_classpath" />
-		</javac>
-	</target>
-	
-	<target name="annotation-jar" depends="annotation-javac">
-		<jar jarfile="jars/RemoteREngine-annotationprocessor.jar">
-			<fileset dir="build/annotations" />
-			<fileset dir="build/common" />
-			<fileset dir="build/server" />
-			<fileset dir="build/client" />
-		</jar>
-	</target>
-	
-	<path id="annotation_factory_path">
-		<pathelement location="jars/RemoteREngine-annotationprocessor.jar" />
-		<!-- TODO: remove when we move to testng -->
-		<pathelement location="${JUNIT_JAR}" />
-	</path>
-	
-	<target name="annotation" depends="annotation-jar">
-		<apt destdir="build/annotations" debug="on" compile="false"
-     		factory="com.addictedtor.remoterengine.apt.RemoteREngineAnnotationProcessorFactory" >
-     <classpath refid="annotation_factory_path" />
-     <src path="src/client" />
-     <src path="src/server" />
-     <src path="src/common" />
-    </apt>
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ creating the jar -->
-	<target name="makejars" depends="stubs">
-		<!-- client jar -->
-		<unjar src="lib/REngine.jar"   	dest="build/client" />
-		<jar jarfile="${target.dir}/RemoteREngine-client.jar">
-			<fileset dir="build/client" />
-			<fileset dir="build/common" />
-			<fileset dir="build/stubs" />
-		</jar>
-		
-		<!-- server jar -->
-		<unjar src="lib/JRI.jar"       dest="build/server" />
-		<unjar src="lib/JRIEngine.jar" dest="build/server" />
-		<unjar src="lib/REngine.jar"   dest="build/server" />
-		
-		<jar jarfile="${target.dir}/RemoteREngine-server.jar">
-			<fileset dir="build/server" />
-			<fileset dir="build/common" />
-			<fileset dir="build/stubs" />
-		</jar>
-
-	</target>
-	<!--}}}-->
-	
-	<!--{{{ creating the jar containing unit tests -->
-	<path id="client_junit_classpath">
-		<pathelement location="build/common" />
-		<pathelement location="lib/REngine.jar" />
-		<pathelement location="${JUNIT_JAR}" />
-	</path>
-
-	<target name="compile-client-junit" depends="client">
-			<javac
-				destdir="build/client-junit"  
-				includeJavaRuntime="yes"
-				debug="${compiler.debug}"
-      	debuglevel="${compiler.debuglevel}"
-      	optimize="${compiler.optimize}"
-      	deprecation="${compiler.deprecation}"
-      	verbose="${compiler.verbose}"
-      	nowarn="${compiler.nowarn}"
-      	target="${compiler.target}"
-      	source="${compiler.source}">
-      
-      <src path="src/client" />
-			<classpath refid="client_junit_classpath" />
-		</javac>
-	</target>
-	
-	<target name="build-client-junit" depends="compile-client-junit,stubs">
-		<!-- client jar -->
-		<unjar src="lib/REngine.jar"   	dest="build/client-junit" />
-		<unjar src="${JUNIT_JAR}" dest="build/client-junit" />
-		<jar jarfile="${target.dir}/RemoteREngine-client-junit.jar">
-			<fileset dir="build/client-junit" />
-			<fileset dir="build/common" />
-			<fileset dir="build/stubs" />
-		</jar>
-		
-	</target>
-	<!--}}}-->
-	
-	<target name="all" depends="javadoc,makejars,build-client-junit" />
-
-</project>

Copied: pkg/RemoteREngine/inst/java_src/build.xml (from rev 76, pkg/RemoteREngine/src/build.xml)
===================================================================
--- pkg/RemoteREngine/inst/java_src/build.xml	                        (rev 0)
+++ pkg/RemoteREngine/inst/java_src/build.xml	2009-09-06 19:15:38 UTC (rev 91)
@@ -0,0 +1,313 @@
+<?xml version="1.0"?>
+<project name="remoterengine" default="all" basedir=".">
+
+  <!--{{{ Copyright (c) 2009, Romain Francois <francoisromain at free.fr>
+ :tabSize=2:indentSize=2:noTabs=false:folding=explicit:collapseFolds=1:
+ This file is part of the RemoteREngine project
+ 
+ The RemoteREngine project is free software: 
+ you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ 
+ The RemoteREngine project is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with the RemoteREngine project. If not, see <http://www.gnu.org/licenses/>.
+}}}-->
+
+	<!--{{{ Properties -->
+  <property file="./build.properties"/>
+  <property name="compiler.debug"         value="on" />
+  <property name="compiler.debuglevel"    value="lines,vars,source" />
+  <property name="compiler.optimize"      value="off" />
+  <property name="compiler.deprecation"   value="off" />
+  <property name="compiler.verbose"       value="off" />
+  <property name="compiler.nowarn"        value="off" />
+  <property name="compiler.target"        value="1.5" />
+  <property name="compiler.source"        value="1.5" />
+  
+  <property name="target.dir" value="${install.dir}/java" />
+  
+  <!-- TODO: remove when we move to testng -->
+  <property name="JUNIT_JAR" value="lib/junit-4.7.jar" />
+  
+  <!--}}}-->
+    
+	<!--{{{ clean -->
+	<target name="clean">
+		<delete dir="build" />
+		<delete dir="jars" />
+		
+		<delete dir="${javadoc.dir}" />
+	</target>
+
+	<target name="init" depends="clean"> 	
+		<mkdir dir="build" />
+		<mkdir dir="build/common" />
+		<mkdir dir="build/server" />
+		<mkdir dir="build/client" />
+		<mkdir dir="build/stubs"/>
+		<mkdir dir="build/annotations"/>
+		<mkdir dir="build/client-junit"/>
+		
+		<mkdir dir="jars" />
+		
+		<mkdir dir="${javadoc.dir}" />
+		<mkdir dir="${target.dir}" />
+		
+	</target>
+	<!-- }}} -->
+	
+	<!--{{{ common -->
+	
+	<path id="common_classpath">
+		<pathelement location="lib/REngine.jar" />
+	</path>
+	
+	<target name="common" depends="init">
+		<javac srcdir="src/common" 
+			destdir="build/common"  
+			includeJavaRuntime="yes"
+			debug="${compiler.debug}"
+      debuglevel="${compiler.debuglevel}"
+      optimize="${compiler.optimize}"
+      deprecation="${compiler.deprecation}"
+      verbose="${compiler.verbose}"
+      nowarn="${compiler.nowarn}"
+      target="${compiler.target}"
+      source="${compiler.source}" >
+			<classpath refid="common_classpath" />
+		</javac>	
+		
+	</target>
+	<target name="javadoc"
+		description="Compile the Javadoc API documentation to dist dir">
+		<javadoc
+		           destdir="${javadoc.dir}"
+		           author="true"
+		           version="true"
+		           use="true"
+				   private="true"
+		           windowtitle="Remote R Server Javadoc"
+				   classpathref="server_classpath">
+
+		    <fileset dir="src" defaultexcludes="yes">	
+		    	<exclude name="**/*.xml"/>
+		    	<exclude name="**/*.properties"/>
+		    	<exclude name="**/*.html"/>
+		    	<exclude name="**/*.htm"/>
+		    	<exclude name="**/test/*"/>
+		    	<exclude name="**/*Test.java"/>
+		    	<exclude name="**/All*Test.java"/>
+		    	<exclude name="**/All*Tests.java"/>
+		    </fileset>
+
+		    <doctitle><![CDATA[<h1>Remote R Server Javadoc</h1>]]></doctitle>
+		    <bottom><![CDATA[<i>Copyright &#169; 2009, Romain Francois <a href="mailto://francoisromain@free.fr">francoisromain at free.fr</a></i>]]></bottom>
+		    <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+		    <link href="http://www.rforge.net/org/docs/" />
+		    <link href="."/>
+		</javadoc>
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ server side -->
+	
+	<path id="server_classpath">
+		<pathelement location="build/common" />
+		<pathelement location="lib/REngine.jar" />
+		<pathelement location="lib/JRIEngine.jar" />
+		<pathelement location="lib/JRI.jar" />
+	</path>
+	
+	<target name="server" depends="common">
+		<javac srcdir="src/server" 
+			destdir="build/server"  
+			includeJavaRuntime="yes"
+			debug="${compiler.debug}"
+      debuglevel="${compiler.debuglevel}"
+      optimize="${compiler.optimize}"
+      deprecation="${compiler.deprecation}"
+      verbose="${compiler.verbose}"
+      nowarn="${compiler.nowarn}"
+      target="${compiler.target}"
+      source="${compiler.source}" >
+			<classpath refid="server_classpath" />
+		</javac>
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ client side -->
+	<path id="client_classpath">
+		<pathelement location="build/common" />
+		<pathelement location="lib/REngine.jar" />
+	</path>
+	
+	<target name="client" depends="common,server">
+		<javac
+				destdir="build/client"  
+				includeJavaRuntime="yes"
+				debug="${compiler.debug}"
+      	debuglevel="${compiler.debuglevel}"
+      	optimize="${compiler.optimize}"
+      	deprecation="${compiler.deprecation}"
+      	verbose="${compiler.verbose}"
+      	nowarn="${compiler.nowarn}"
+      	target="${compiler.target}"
+      	source="${compiler.source}">
+      
+      <src path="src/client" />
+			<classpath refid="client_classpath" />
+			<include name="**/*.java"/>
+			<exclude name="**/test/*"/>
+
+		</javac>
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ client and server stubs -->
+	<path id="stubs_classpath">
+		<pathelement location="build/server" />
+		<pathelement location="build/common" />
+		<pathelement location="build/client" />
+		<pathelement location="lib/REngine.jar" />
+		<pathelement location="lib/JRIEngine.jar" />
+		<pathelement location="lib/JRI.jar" />
+	</path>
+	
+
+	<target name="stubs" depends="common,client,server">
+		<!-- server stubs -->
+		<rmic base="build/stubs" classpathref="stubs_classpath" 
+			classname="org.rosuda.REngine.remote.server.files.RemoteFileInputStream_Server" />
+		<rmic base="build/stubs" classpathref="stubs_classpath"  
+			classname="org.rosuda.REngine.remote.server.files.RemoteFileOutputStream_Server" />
+		<!-- client stubs (callbacks) -->
+		<rmic base="build/stubs" classpathref="stubs_classpath"  
+			classname="org.rosuda.REngine.remote.client.RemoteREngine" />
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ annotation processing -->
+	<path id="annotation_classpath">
+		<pathelement location="lib/REngine.jar" />
+		<pathelement location="build/common" />
+		<pathelement location="build/server" />
+		<pathelement location="build/client" />
+	</path>
+	
+	<target name="annotation-javac" depends="client">
+		<javac srcdir="src/apt" 
+			destdir="build/annotations"  
+			includeJavaRuntime="yes"
+			debug="${compiler.debug}"
+      debuglevel="${compiler.debuglevel}"
+      optimize="${compiler.optimize}"
+      deprecation="${compiler.deprecation}"
+      verbose="${compiler.verbose}"
+      nowarn="${compiler.nowarn}"
+      target="${compiler.target}"
+      source="${compiler.source}" >
+			<classpath refid="annotation_classpath" />
+		</javac>
+	</target>
+	
+	<target name="annotation-jar" depends="annotation-javac">
+		<jar jarfile="jars/RemoteREngine-annotationprocessor.jar">
+			<fileset dir="build/annotations" />
+			<fileset dir="build/common" />
+			<fileset dir="build/server" />
+			<fileset dir="build/client" />
+		</jar>
+	</target>
+	
+	<path id="annotation_factory_path">
+		<pathelement location="jars/RemoteREngine-annotationprocessor.jar" />
+		<!-- TODO: remove when we move to testng -->
+		<pathelement location="${JUNIT_JAR}" />
+	</path>
+	
+	<target name="annotation" depends="annotation-jar">
+		<apt destdir="build/annotations" debug="on" compile="false"
+     		factory="com.addictedtor.remoterengine.apt.RemoteREngineAnnotationProcessorFactory" >
+     <classpath refid="annotation_factory_path" />
+     <src path="src/client" />
+     <src path="src/server" />
+     <src path="src/common" />
+    </apt>
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ creating the jar -->
+	<target name="makejars" depends="stubs,annotation">
+		<!-- client jar -->
+		<unjar src="lib/REngine.jar"   	dest="build/client" />
+		<jar jarfile="${target.dir}/RemoteREngine-client.jar">
+			<fileset dir="build/client" />
+			<fileset dir="build/common" />
+			<fileset dir="build/stubs" />
+			<fileset file="build/services.xml" />
+		</jar>
+		
+		<!-- server jar -->
+		<unjar src="lib/JRI.jar"       dest="build/server" />
+		<unjar src="lib/JRIEngine.jar" dest="build/server" />
+		<unjar src="lib/REngine.jar"   dest="build/server" />
+		
+		<jar jarfile="${target.dir}/RemoteREngine-server.jar">
+			<fileset dir="build/server" />
+			<fileset dir="build/common" />
+			<fileset dir="build/stubs" />
+			<fileset file="build/services.xml" />
+		</jar>
+
+	</target>
+	<!--}}}-->
+	
+	<!--{{{ creating the jar containing unit tests -->
+	<path id="client_junit_classpath">
+		<pathelement location="build/common" />
+		<pathelement location="lib/REngine.jar" />
+		<pathelement location="${JUNIT_JAR}" />
+	</path>
+
+	<target name="compile-client-junit" depends="client">
+			<javac
+				destdir="build/client-junit"  
+				includeJavaRuntime="yes"
+				debug="${compiler.debug}"
+      	debuglevel="${compiler.debuglevel}"
+      	optimize="${compiler.optimize}"
+      	deprecation="${compiler.deprecation}"
+      	verbose="${compiler.verbose}"
+      	nowarn="${compiler.nowarn}"
+      	target="${compiler.target}"
+      	source="${compiler.source}">
+      
+      <src path="src/client" />
+			<classpath refid="client_junit_classpath" />
+		</javac>
+	</target>
+	
+	<target name="build-client-junit" depends="compile-client-junit,stubs">
+		<!-- client jar -->
+		<unjar src="lib/REngine.jar"   	dest="build/client-junit" />
+		<unjar src="${JUNIT_JAR}" dest="build/client-junit" />
+		<jar jarfile="${target.dir}/RemoteREngine-client-junit.jar">
+			<fileset dir="build/client-junit" />
+			<fileset dir="build/common" />
+			<fileset dir="build/stubs" />
+			<fileset file="build/services.xml" />
+		</jar>
+		
+	</target>
+	<!--}}}-->
+	
+	<target name="all" depends="javadoc,makejars,build-client-junit" />
+
+</project>

Deleted: pkg/RemoteREngine/inst/java_src/src/client/org/rosuda/REngine/remote/client/RemoteREngine.java
===================================================================
--- pkg/RemoteREngine/src/src/client/org/rosuda/REngine/remote/client/RemoteREngine.java	2009-08-26 16:58:25 UTC (rev 74)
+++ pkg/RemoteREngine/inst/java_src/src/client/org/rosuda/REngine/remote/client/RemoteREngine.java	2009-09-06 19:15:38 UTC (rev 91)
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 2009, Romain Francois <francoisromain at free.fr>
- *
- * This file is part of the RemoteREngine project
- *
- * The RemoteREngine project is free software: 
- * you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * The RemoteREngine project is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with the RemoteREngine project. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package org.rosuda.REngine.remote.client ;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.rmi.NotBoundException;
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.UnicastRemoteObject;
-
-import org.rosuda.REngine.REXP;
-import org.rosuda.REngine.REXPMismatchException;
-import org.rosuda.REngine.REXPNull;
-import org.rosuda.REngine.REXPReference;
-import org.rosuda.REngine.REngine;
-import org.rosuda.REngine.REngineException;
-import org.rosuda.REngine.REnginePool;
-import org.rosuda.REngine.remote.common.JRIEngineGlobalVariables;
-import org.rosuda.REngine.remote.common.RemoteREngineClient;
-import org.rosuda.REngine.remote.common.RemoteREngineConstants;
-import org.rosuda.REngine.remote.common.RemoteREngineInterface;
-import org.rosuda.REngine.remote.common.callbacks.RCallback;
-import org.rosuda.REngine.remote.common.exceptions.FileAlreadyExistsException;
-import org.rosuda.REngine.remote.common.exceptions.NotRegisteredException;
-import org.rosuda.REngine.remote.common.exceptions.ServerSideIOException;
-import org.rosuda.REngine.remote.common.files.FileChunk;
-import org.rosuda.REngine.remote.common.files.RemoteFileInputStream;
-import org.rosuda.REngine.remote.common.files.RemoteFileOutputStream;
-
-/**
- * An implementation of the REngine API that communicates through an 
- * RMI protocol
- */
-public class RemoteREngine extends REngine implements RemoteREngineClient {
-
-	/**
-	 * The remote interface through which this client calls the server
-	 */
-	private RemoteREngineInterface engine;
-
-	/** 
-	 * reference to the global environment of the remote engine
-	 */
-	public REXPReference globalEnv ; 
-	
-	/**
-	 * reference to the empty environment of the remote engine
-	 */
-	public REXPReference emptyEnv ; 
-	
-	/**
-	 * Reference to the base environment of the remote engine
-	 */
-	public REXPReference baseEnv ; 
-	
-	/**
-	 * Reference to the NULL value of the remote engine
-	 */
-	public REXPReference nullValueRef;
-
-	/**
-	 * canonical NULL object (obtained from the server)
-	 */
-	public REXPNull nullValue;
-
-	/** 
-	 * the hashcode of the server this shadows
-	 */
-	private int serverHashCode ; 
-	
-	/**
-	 * Is this engine valid ?
-	 */
-	private boolean valid = false; 
-
-	/**
-	 * Shutdown hook for this client
-	 */
-	private RemoteREngineShutdownHook shutdownHook ; 
-	
-	/**
-	 * Construct a RemoteREngine
-	 * @param registryHost Name or IP Address of the host containing the RMI registry
-	 * @param name Name of the Remote server registered within the Registry
-	 * @param port port to use to connect to the server
-	 */
-	public RemoteREngine(String name, String registryHost, int port){
-		if (name == null || name.length()==0) {
-			System.err.println("RMI Name of remote engine not defined");
-		}
-		try{
-			Registry reg = LocateRegistry.getRegistry(registryHost, port);
-			engine = (RemoteREngineInterface) reg.lookup(name);
-
-			/* subscribe to the server and populate the fields */
-			/* System.out.println( "subscribe to the server" ) ; */
-			UnicastRemoteObject.exportObject(this) ;
-			JRIEngineGlobalVariables variables = engine.subscribe(this) ;
-			serverHashCode = variables.hashCode ;
-			globalEnv    = variables.globalEnv ;
-			emptyEnv     = variables.emptyEnv ; 
-			baseEnv      = variables.baseEnv ; 
-			nullValueRef = variables.nullValueRef ;
-			nullValue    = variables.nullValue ; 
-			
-			/* store this engine in the pool */
-			REnginePool.add( this, serverHashCode ); 
-			valid = true; 
-			
-		} catch ( NotBoundException nb) {
-			System.out.println("Unable to locate " + name + " within RMI Registry");
-		} catch( Exception e ){
-			System.out.println( e.getClass().getName() + " creating the RemoteREngine" ) ;
-			e.printStackTrace();
-		}
-		
-		shutdownHook = new RemoteREngineShutdownHook(); 
-		
-		/* let the server know when the jvm of this client closes */
-		Runtime.getRuntime().addShutdownHook( shutdownHook ) ;
-	}
-	
-	/**
-	 * Shutdown hook for the client. This is used when the jvm of the client
-	 * is about to shutdown so that the server is informed and can stop
-	 * sending callbacks to this client
-	 * 
-	 * @see Runtime#addShutdownHook(Thread)
-	 * @author Romain Francois
-	 *
-	 */
-	private class RemoteREngineShutdownHook extends Thread {
-		public void run(){
-			if( isValid() ){
-				close( ) ; 
-			}
-		}
-	}
-
-	/**
-	 * Indicates if this engine is valid
-	 */
-	public boolean isValid(){
-		/* TODO: maybe ping the engine */
-		return valid; 
-	}
-	
-	/**
-	 * Constructor using the default port
-	 * 
-	 * @see RemoteREngineConstants#RMIPORT for the default value
-	 * @param name name of the remote object in the registry
-	 * @param registryHost host name
-	 */
-	public RemoteREngine(String name, String registryHost ){
-		this( name, registryHost, 1099 ) ;
-	}
-
-	/**                                                    
-	 * parse a string into an expression vector         
-	 *
-	 * @param text string to parse
-	 * @param resolve resolve the resulting REXP (<code>true</code>) or just return a reference (<code>false</code>)
-	 * @return parsed expression 
-	 */
-	public REXP parse(String text, boolean resolve) throws REngineException{
-		REXP res = null ; 
-		try{
-			res = engine.parse( text, resolve );
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "parse" ); 
-		}
-		return res ;
-	}
-
-	/** 
-	 * evaluate an expression vector
-	 * @param what an expression (or vector of such) to evaluate
-	 * @param where environment to evaluate in (use <code>null</code> for the global environemnt and/or if environments are not supported by the engine)
-	 * @param resolve resolve the resulting REXP or just return a reference
-	 * @return the result of the evaluation of the last expression 
-	 */
-	public REXP eval(REXP what, REXP where, boolean resolve) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.eval( what, where, resolve );  
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "eval" ); 
-		}
-		return res ;
-	}
-
-	/**
-	 * assign into an environment
-	 *
-	 * @param symbol symbol name
-	 * @param value value to assign
-	 * @param env environment to assign to (use <code>null</code> for the global environemnt and/or if environments are not supported by the engine
-	 */
-	public void assign(String symbol, REXP value, REXP env) throws REngineException, REXPMismatchException{
-		try{
-			engine.assign( symbol, value, env );  
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "assign" ); 
-		}
-	}
-
-	/**
-	 * get a value from an environment
-	 * @param symbol symbol name
-	 * @param env environment (use <code>null</code> for the global environemnt and/or if environments are not supported by the engine)
-	 * @param resolve resolve the resulting REXP or just return a reference		
-	 * @return value
-	 */
-	public REXP get(String symbol, REXP env, boolean resolve) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.get( symbol, env, resolve );  
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "get" ); 
-		}
-		return res ;
-	}
-
-	/** 
-	 * fetch the contents of the given reference. 
-	 * The resulting REXP may never be REXPReference. 
-	 * The engine should raise a {@link #REngineException} exception
-	 * if {@link #supportsReferences()} returns <code>false</code>.
-	 * 
-	 * @param ref reference to resolve
-	 * @return resolved reference
-	 */
-	public REXP resolveReference(REXP ref) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.resolveReference(ref) ;  
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "resolveReference" ); 
-		}
-		return res ;
-	}
-
-	/** 
-	 * create a reference by pushing local data to R and returning a reference to the data. If ref is a reference it is returned as-is. 
-	 * The engine should raise a {@link #REngineException} exception if {@link #supportsReferences()} returns <code>false</code>.
-	 * 
-	 * @param value to create reference to
-	 * @return reference to the value
-	 */
-	public REXP createReference(REXP value) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.createReference( value );    
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "createReference" ); 
-		}
-		return res ;
-	}
-
-	/** 
-	 * removes reference from the R side. This method is called automatically by the finalizer 
-	 * of <code>REXPReference</code> and should never be called directly.
-	 *
-	 * @param ref reference to finalize 
-	 */
-	public void finalizeReference(REXP ref) throws REngineException, REXPMismatchException{
-		try{
-			engine.finalizeReference( ref );     
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "finalizeReference" ); 
-		}
-	}
-
-	/**
-	 * get the parent environemnt of an environment
-	 *
-	 * @param env environment to query
-	 * @param resolve whether to resolve the resulting environment reference
-	 * @return parent environemnt of env
-	 */
-	public REXP getParentEnvironment(REXP env, boolean resolve) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.getParentEnvironment( env, resolve );    
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "getParentEnvironment" ); 
-		}
-		return res ;
-	}
-
-	/**
-	 * create a new environment
-	 *
-	 * @param parent parent environment
-	 * @param resolve whether to resolve the reference to the environemnt (usually <code>false</code> since the returned environment will be empty)
-	 * @return resulting environment
-	 */
-	public REXP newEnvironment(REXP parent, boolean resolve) throws REngineException, REXPMismatchException{
-		REXP res = null ; 
-		try{
-			res = engine.newEnvironment( parent, resolve ) ;    
-		} catch( RemoteException e){
-			RemoteExceptionManager.send( e, "newEnvironment" ); 
-		}
-		return res ;
-	}
-
-	/**
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/remoterengine -r 91


More information about the Remoterengine-commits mailing list