You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gh...@apache.org on 2006/05/18 22:01:30 UTC
svn commit: r407625 [15/16] - in
/incubator/harmony/enhanced/classlib/trunk/modules/rmi3: ./ doc/ make/ src/
src/common/ src/common/javasrc/ src/common/javasrc/java/
src/common/javasrc/java/rmi/ src/common/javasrc/java/rmi/activation/
src/common/javasr...
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/RegistryTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/RegistryTest.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/RegistryTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/RegistryTest.java Thu May 18 13:01:22 2006
@@ -0,0 +1,272 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi;
+
+import java.net.InetAddress;
+
+import java.rmi.Naming;
+import java.rmi.RMISecurityManager;
+import java.rmi.Remote;
+
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+
+import java.rmi.server.UnicastRemoteObject;
+
+import org.apache.harmony.rmi.test.MyRemoteObject1;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Unit test for RMI Registry.
+ *
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class RegistryTest extends RMITestBase {
+
+ /**
+ * No-arg constructor to enable serialization.
+ */
+ public RegistryTest() {
+ super();
+ }
+
+ /**
+ * Constructs this test case with the given name.
+ *
+ * @param name
+ * Name for this test case.
+ */
+ public RegistryTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Tests registry creation and destruction.
+ *
+ * @throws Exception
+ * If some error occurs.
+ */
+ public void testBasic() throws Exception {
+ try {
+ System.setSecurityManager(new RMISecurityManager());
+
+ // Create registry.
+ int port = CUSTOM_PORT_1;
+ Registry reg = LocateRegistry.createRegistry(port);
+ System.out.println("Registry on CUSTOM port ("
+ + port + ") created.");
+
+ // Destroy registry.
+ UnicastRemoteObject.unexportObject(reg, true);
+ System.out.println("Test complete.");
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Unexpected exception: " + e);
+ }
+ }
+
+ /**
+ * Tests registry operation in detail.
+ *
+ * @throws Exception
+ * If some error occurs.
+ */
+ public void testDetailed() throws Exception {
+ try {
+ try {
+ System.setSecurityManager(new RMISecurityManager());
+
+ String localHost = InetAddress.getLocalHost().getHostName();
+
+ // Create registry.
+ int port = REGISTRY_PORT;
+ Registry reg = LocateRegistry.createRegistry(port);
+ System.out.println("Registry on DEFAULT port ("
+ + port + ") created.");
+
+ Remote obj1 = new MyRemoteObject1("RemoteObject1");
+ exportedObjects.add(obj1);
+ Remote obj2 = new MyRemoteObject1("RemoteObject2");
+ exportedObjects.add(obj2);
+ Remote obj3 = new MyRemoteObject1("RemoteObject3");
+ exportedObjects.add(obj3);
+ Remote obj4 = new MyRemoteObject1("RemoteObject4");
+ exportedObjects.add(obj4);
+ Remote obj5 = new MyRemoteObject1("RemoteObject5");
+ exportedObjects.add(obj5);
+ Remote obj6 = new MyRemoteObject1("RemoteObject6");
+ exportedObjects.add(obj6);
+ Remote obj7 = new MyRemoteObject1("RemoteObject7");
+ exportedObjects.add(obj7);
+ Remote obj8 = new MyRemoteObject1("RemoteObject8");
+ exportedObjects.add(obj8);
+ System.out.println("Test objects exported.");
+
+ // Check bind.
+ System.out.println("Testing valid Naming.bind names...");
+ Naming.bind("rmi://" + localHost + ":1099/RemoteObject1", obj1);
+ Naming.bind("rmi://127.0.0.1:1099/RemoteObject2", obj2);
+ Naming.bind("//" + localHost + ":1099/RemoteObject3", obj3);
+ Naming.bind("//localhost:1099/RemoteObject4", obj4);
+ Naming.bind("//:1099/RemoteObject5", obj5);
+ Naming.bind("//:/RemoteObject6", obj6);
+ Naming.bind("//" + localHost + "/RemoteObject7", obj7);
+ Naming.bind("RemoteObject8", obj8);
+ System.out.println("Done:");
+ printArray(Naming.list(""));
+ System.out.println("Checking bind complete.");
+
+ // Check rebind.
+ System.out.println("Testing valid Naming.rebind names...");
+ Naming.rebind("rmi://" + localHost + ":1099/RemoteObject1", obj1);
+ Naming.rebind("rmi://127.0.0.1:1099/RemoteObject2", obj2);
+ Naming.rebind("//" + localHost + ":1099/RemoteObject3", obj3);
+ Naming.rebind("//localhost:1099/RemoteObject4", obj4);
+ Naming.rebind("//:1099/RemoteObject5", obj5);
+ Naming.rebind("//:/RemoteObject6", obj6);
+ Naming.rebind("//" + localHost + "/RemoteObject7", obj7);
+ Naming.rebind("RemoteObject8", obj8);
+ System.out.println("Done:");
+ printArray(Naming.list("//127.0.0.1:/"));
+ System.out.println("Checking rebind complete.");
+
+ // Check lookup.
+ System.out.println("Testing valid Naming.lookup names...");
+ System.out.println(Naming.lookup("rmi://" + localHost + ":1099/RemoteObject1"));
+ System.out.println(Naming.lookup("rmi://127.0.0.1:/RemoteObject2"));
+ System.out.println(Naming.lookup("//" + localHost + ":1099/RemoteObject3"));
+ System.out.println(Naming.lookup("//localhost:1099/RemoteObject4"));
+ System.out.println(Naming.lookup("//:1099/RemoteObject5"));
+ System.out.println(Naming.lookup("//:/RemoteObject6"));
+ System.out.println(Naming.lookup("//" + localHost + "/RemoteObject7"));
+ System.out.println(Naming.lookup("RemoteObject8"));
+ System.out.println("Done:");
+ printArray(Naming.list("rmi://" + localHost + ""));
+ System.out.println("Checking lookup complete.");
+
+ // Check unbind.
+ System.out.println("Testing valid Naming.unbind names...");
+ Naming.unbind("rmi://" + localHost + ":1099/RemoteObject1");
+ Naming.unbind("rmi://127.0.0.1:1099/RemoteObject2");
+ Naming.unbind("//" + localHost + ":1099/RemoteObject3");
+ Naming.unbind("//localhost:1099/RemoteObject4");
+ Naming.unbind("//:1099/RemoteObject5");
+ Naming.unbind("//:/RemoteObject6");
+ Naming.unbind("//" + localHost + "/RemoteObject7");
+ Naming.unbind("RemoteObject8");
+ System.out.println("Done:");
+ printArray(Naming.list("//localhost"));
+ System.out.println("Checking unbind complete.");
+
+ // Destroy registry.
+ UnicastRemoteObject.unexportObject(reg, true);
+
+ // Create registry.
+ port = CUSTOM_PORT_2;
+ reg = LocateRegistry.createRegistry(port);
+ System.out.println("Registry on CUSTOM port ("
+ + port + ") created.");
+
+ // Check bind.
+ System.out.println("Testing valid Naming.bind names...");
+ Naming.bind("rmi://" + localHost + ':' + port + "/RemoteObject1", obj1);
+ Naming.bind("rmi://127.0.0.1:" + port + "/RemoteObject2", obj2);
+ Naming.bind("//" + localHost + ':' + port + "/RemoteObject3", obj3);
+ Naming.bind("//localhost:" + port + "/RemoteObject4", obj4);
+ Naming.bind("//:" + port + "/RemoteObject5", obj5);
+ System.out.println("Done:");
+ printArray(Naming.list("//localhost:" + port));
+ System.out.println("Checking bind complete.");
+
+ // Check rebind.
+ System.out.println("Testing valid Naming.rebind names...");
+ Naming.rebind("rmi://" + localHost + ':' + port + "/RemoteObject1", obj1);
+ Naming.rebind("rmi://127.0.0.1:" + port + "/RemoteObject2", obj2);
+ Naming.rebind("//" + localHost + ':' + port + "/RemoteObject3", obj3);
+ Naming.rebind("//localhost:" + port + "/RemoteObject4", obj4);
+ Naming.rebind("//:" + port + "/RemoteObject5", obj5);
+ System.out.println("Done:");
+ printArray(Naming.list("//127.0.0.1:" + port + "/"));
+ System.out.println("Checking rebind complete.");
+
+ // Check lookup.
+ System.out.println("Testing valid Naming.lookup names...");
+ System.out.println(Naming.lookup("rmi://" + localHost + ':' + port + "/RemoteObject1"));
+ System.out.println(Naming.lookup("rmi://127.0.0.1:" + port + "/RemoteObject2"));
+ System.out.println(Naming.lookup("//" + localHost + ':' + port + "/RemoteObject3"));
+ System.out.println(Naming.lookup("//localhost:" + port + "/RemoteObject4"));
+ System.out.println(Naming.lookup("//:" + port + "/RemoteObject5"));
+ System.out.println("Done:");
+ printArray(Naming.list("rmi://:" + port));
+ System.out.println("Checking lookup complete.");
+
+ // Check unbind.
+ System.out.println("Testing valid Naming.unbind names...");
+ Naming.unbind("rmi://" + localHost + ':' + port + "/RemoteObject1");
+ Naming.unbind("rmi://127.0.0.1:" + port + "/RemoteObject2");
+ Naming.unbind("//" + localHost + ':' + port + "/RemoteObject3");
+ Naming.unbind("//localhost:" + port + "/RemoteObject4");
+ Naming.unbind("//:" + port + "/RemoteObject5");
+ System.out.println("Done:");
+ printArray(Naming.list("//localhost:" + port));
+ System.out.println("Checking unbind complete.");
+
+ // Destroy registry.
+ UnicastRemoteObject.unexportObject(reg, true);
+ } finally {
+ System.out.println("Unexporting objects");
+ try {
+ unexportObjects();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println("Test complete.");
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Unexpected exception: " + e);
+ }
+ }
+
+ /**
+ * Returns test suite for this class.
+ *
+ * @return Test suite for this class.
+ */
+ public static Test suite() {
+ return new TestSuite(RegistryTest.class);
+ }
+
+ /**
+ * Starts the testing from the command line.
+ *
+ * @param args
+ * Command line parameters.
+ */
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(suite());
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/RegistryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/DefaultParamTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/DefaultParamTest.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/DefaultParamTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/DefaultParamTest.java Thu May 18 13:01:22 2006
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.5 $
+ */
+package org.apache.harmony.rmi.activation;
+
+import java.rmi.MarshalledObject;
+import java.rmi.Remote;
+import java.rmi.activation.Activatable;
+import java.rmi.activation.ActivationDesc;
+import java.rmi.activation.ActivationGroup;
+import java.rmi.activation.ActivationGroupDesc;
+import java.rmi.activation.ActivationGroupID;
+import java.rmi.activation.ActivationSystem;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+
+import java.util.Properties;
+
+import org.apache.harmony.rmi.JavaInvoker;
+import org.apache.harmony.rmi.common.SubProcess;
+
+import junit.framework.TestCase;
+
+
+/**
+ * DefaultParamTest
+ *
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.5 $
+ */
+public class DefaultParamTest extends TestCase {
+
+ SubProcess rmid;
+
+ SubProcess rmiregistry;
+
+ public void setUp() {
+ try {
+ rmid = JavaInvoker.invokeSimilar((String[]) null, "org.apache.harmony.rmi.activation.Rmid", (String[]) null, true, true);
+ //Runtime.getRuntime().exec("rmid");
+ rmid.pipeError();
+ rmid.pipeInput();
+ rmid.closeOutput();
+
+ rmiregistry = JavaInvoker.invokeSimilar((String[]) null,
+ "org.apache.harmony.rmi.registry.RegistryImpl", (String[]) null, true, true);
+ rmiregistry.pipeError();
+ rmiregistry.pipeInput();
+ rmiregistry.closeOutput();
+
+ Thread.sleep(5000);
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }
+
+ public void tearDown() {
+ rmid.destroy();
+ rmiregistry.destroy();
+ }
+
+ public void testSimpleInstall() throws Exception {
+ try {
+ Properties props = new Properties();
+ ActivationGroupDesc groupDesc = new ActivationGroupDesc(props, null);
+
+ System.out.println("groupDesc = " + groupDesc);
+
+ System.out.flush();
+ ActivationSystem as = ActivationGroup.getSystem();
+
+ System.out.println("ActivationSystem = " + as);
+
+ ActivationGroupID groupID = as.registerGroup(groupDesc);
+ System.out.println("groupID = " + groupID);
+ System.out.println("Activation group descriptor registered.");
+
+ MarshalledObject data = new MarshalledObject("HelloImpl");
+ System.out.println("MarshalledObject data = " + data);
+
+ ActivationDesc desc = new ActivationDesc(groupID, "org.apache.harmony.rmi.activation.HelloImpl", "", null);
+ System.out.println("Registering ActivationDesc:");
+ Remote stub = Activatable.register(desc);
+ System.out.println("Activation descriptor registered: " + stub);
+
+ Registry reg = LocateRegistry.getRegistry();
+ System.out.println("Registry = " + reg);
+
+ reg.rebind("HelloImpl_Stub", stub);
+ System.out.println("Stub bound in registry.");
+ } catch (Throwable t) {
+ System.out.println("Exception in HelloInstaller: " + t);
+ t.printStackTrace();
+ fail("Exception in HelloInstaller: " + t);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/DefaultParamTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloI.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloI.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloI.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloI.java Thu May 18 13:01:22 2006
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+/**
+ * The RMI Hello World application interface.
+ *
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.2 $
+ */
+public interface HelloI extends Remote {
+
+ /**
+ * get() method returns java.lang.String object that should contain "Hello World!".
+ */
+ public String get() throws RemoteException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloI.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl.java Thu May 18 13:01:22 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.activation;
+import java.rmi.RemoteException;
+import java.rmi.MarshalledObject;
+import java.rmi.activation.Activatable;
+import java.rmi.activation.ActivationID;
+
+
+/**
+ * HelloI interface implementation.
+ *
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class HelloImpl extends Activatable implements HelloI {
+
+ public HelloImpl(ActivationID id, MarshalledObject data) throws RemoteException {
+ super(id, 0);
+ }
+
+ public String get() throws RemoteException {
+ return "Hello World!";
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,48 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.activation.HelloImpl
+ * Compatible with stub protocol version 1.2
+ *
+ * Generated by DRL RMI Compiler (rmic).
+ *
+ * DO NOT EDIT!!!
+ * Contents subject to change without notice!
+ */
+package org.apache.harmony.rmi.activation;
+
+
+public final class HelloImpl_Stub extends java.rmi.server.RemoteStub
+ implements org.apache.harmony.rmi.activation.HelloI, java.rmi.Remote {
+
+ private static final long serialVersionUID = 2;
+
+ private static java.lang.reflect.Method $method_get_0;
+
+ static {
+ try {
+ $method_get_0 = org.apache.harmony.rmi.activation.HelloI.class.getMethod("get", new java.lang.Class[] {});
+ } catch (java.lang.NoSuchMethodException e) {
+ throw new java.lang.NoSuchMethodError(
+ "Stub class initialization failed: org.apache.harmony.rmi.activation.HelloImpl_Stub");
+ }
+ }
+
+ public HelloImpl_Stub(java.rmi.server.RemoteRef ref) {
+ super(ref);
+ }
+
+ // Implementation of get()
+ public java.lang.String get()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_get_0, null, 1118015571883637415L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/HelloImpl_Stub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/StartupShutdownTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/StartupShutdownTest.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/StartupShutdownTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/StartupShutdownTest.java Thu May 18 13:01:22 2006
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.5 $
+ */
+package org.apache.harmony.rmi.activation;
+
+import java.rmi.activation.ActivationGroup;
+import java.rmi.activation.ActivationSystem;
+
+import org.apache.harmony.rmi.JavaInvoker;
+import org.apache.harmony.rmi.common.SubProcess;
+
+import junit.framework.TestCase;
+
+
+/**
+ * StartupShutdownTest
+ *
+ * @author Victor A. Martynov
+ * @version $Revision: 1.1.2.5 $
+ */
+public class StartupShutdownTest extends TestCase {
+
+ SubProcess rmid;
+ SubProcess rmiregistry;
+
+ public void testStartup() throws Exception {
+ try {
+ rmid = JavaInvoker.invokeSimilar((String[]) null,
+ "org.apache.harmony.rmi.activation.Rmid",
+ (String[]) null, true, true);
+ rmid.pipeError();
+ rmid.pipeInput();
+ rmid.closeOutput();
+ Thread.sleep(5000);
+ ActivationSystem as = ActivationGroup.getSystem();
+
+ rmid.destroy();
+ } catch (Throwable t) {
+ System.out.println("Unexpected exception: " + t);
+ t.printStackTrace();
+ fail("Unexpected exception: " + t);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/activation/StartupShutdownTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyException.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyException.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyException.java Thu May 18 13:01:22 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class MyException extends Exception {
+
+ public MyException(String msg) {
+ super(msg);
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyInvocationHandler.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyInvocationHandler.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyInvocationHandler.java Thu May 18 13:01:22 2006
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.io.Serializable;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+public class MyInvocationHandler implements InvocationHandler, Serializable {
+
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ if (method.getName().equals("hashCode")) {
+ return new Integer(0);
+ }
+
+ System.out.print("MyInvocationHandler: method = " + method + ", args = ");
+
+ if (args == null) {
+ System.out.println("null");
+ } else if (args.length == 0) {
+ System.out.println("<>");
+ } else {
+ for (int i = 0; i < args.length - 1; ++i) {
+ System.out.print(args[i].toString() + ", ");
+ }
+ System.out.println(args[args.length - 1].toString());
+ }
+ return null;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyInvocationHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface.java Thu May 18 13:01:22 2006
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public interface MyRemoteInterface extends Remote {
+
+ public void test_String_Void(String param) throws RemoteException;
+ public String test_Void_String() throws RemoteException;
+ public void test_Int_Void(int param) throws RemoteException;
+ public int test_Void_Int() throws RemoteException;
+ public void test_Remote_Void(Remote param) throws RemoteException;
+ public void test_UnicastRemoteObject_Void(Remote param) throws RemoteException;
+ public Remote test_Void_Remote() throws RemoteException;
+ public long test_Long_Long(long param) throws RemoteException;
+ public String test_String_String(String param) throws RemoteException;
+ public Remote test_Remote_Remote(Remote param) throws RemoteException;
+ public void test_RemoteString_Void(Remote param1, String param2)
+ throws RemoteException;
+ public Remote test_RemoteRemote_Remote(Remote param1, Remote param2)
+ throws RemoteException;
+ public void test_BooleanStringRemote_Void(boolean param1, String param2,
+ Remote param3) throws RemoteException;
+ public void test_Proxy_Void(Object param) throws RemoteException;
+ public void test_IntArray_Void(int[] param) throws RemoteException;
+ public int[] test_Void_IntArray() throws RemoteException;
+ public void test_Array_Void(String[] param) throws RemoteException;
+ public String[] test_Void_Array() throws RemoteException;
+ public void test_RemoteArray_Void(Remote[] param) throws RemoteException;
+ public Remote[] test_Void_RemoteArray() throws RemoteException;
+ public void test_Exception() throws RemoteException, MyException;
+ public void test_Error() throws RemoteException, MyException;
+ public void test_RuntimeException() throws RemoteException, MyException;
+ public void test_RemoteException() throws RemoteException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface1.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface1.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface1.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface1.java Thu May 18 13:01:22 2006
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public interface MyRemoteInterface1 extends Remote {
+
+ public String test1() throws RemoteException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface1.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface2.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface2.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface2.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface2.java Thu May 18 13:01:22 2006
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.4 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.4 $
+ */
+public interface MyRemoteInterface2 extends Remote {
+
+ public String test2() throws RemoteException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface2.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface3.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface3.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface3.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface3.java Thu May 18 13:01:22 2006
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public interface MyRemoteInterface3 extends Remote {
+
+ public String test3() throws RemoteException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteInterface3.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject.java Thu May 18 13:01:22 2006
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import java.rmi.server.UnicastRemoteObject;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+public class MyRemoteObject extends UnicastRemoteObject
+ implements MyRemoteInterface {
+
+ public MyRemoteObject() throws RemoteException {
+ super();
+ }
+
+ public void test_String_Void(String param) throws RemoteException {
+ System.out.println(
+ "MyRemoteObject: test_String_Void: param = " + param);
+ }
+
+ public String test_Void_String() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_String");
+ return "MyRemoteObject.test_Void_String";
+ }
+
+ public void test_Int_Void(int param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_Int_Void: param = " + param);
+ }
+
+ public int test_Void_Int() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_Int");
+ return 987654321;
+ }
+
+ public void test_Remote_Void(Remote param) throws RemoteException {
+ System.out.println(
+ "MyRemoteObject: test_Remote_Void: param = " + param);
+ System.out.println("Call param.test method: "
+ + ((MyRemoteInterface1) param).test1());
+ }
+
+ public void test_UnicastRemoteObject_Void(Remote param)
+ throws RemoteException {
+ System.out.println(
+ "MyRemoteObject: test_UnicastRemoteObject_Void: param = "
+ + param);
+ }
+
+ public Remote test_Void_Remote() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_Remote");
+ return new MyRemoteObject2("MyRemoteObject.test_Void_Remote");
+ }
+
+ public long test_Long_Long(long param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_Long_Long: param = " + param);
+ return 998877665544332211L;
+ }
+
+ public String test_String_String(String param) throws RemoteException {
+ System.out.println(
+ "MyRemoteObject: test_String_String: param = " + param);
+ return "MyRemoteObject.test_String_String";
+ }
+
+ public Remote test_Remote_Remote(Remote param) throws RemoteException {
+ System.out.println(
+ "MyRemoteObject: test_Remote_Remote: param = " + param);
+ System.out.println("Call param.test method: "
+ + ((MyRemoteInterface1) param).test1());
+ return new MyRemoteObject2("MyRemoteObject.test_Remote_Remote");
+ }
+
+ public void test_RemoteString_Void(Remote param1, String param2)
+ throws RemoteException {
+ System.out.println("MyRemoteObject: test_RemoteString_Void: param1 = "
+ + param1 + ", param2 = " + param2);
+ System.out.println("Call param1.test method: "
+ + ((MyRemoteInterface1) param1).test1());
+ }
+
+ public Remote test_RemoteRemote_Remote(Remote param1, Remote param2)
+ throws RemoteException {
+ System.out.println("MyRemoteObject: test_RemoteRemote_Remote: param1 = "
+ + param1 + ", param2 = " + param2);
+ System.out.println("Call param1.test method: "
+ + ((MyRemoteInterface1) param1).test1());
+ System.out.println("Call param2.test method: "
+ + ((MyRemoteInterface3) param2).test3());
+ return new MyRemoteObject2("MyRemoteObject.test_RemoteRemote_Remote");
+ }
+
+ public void test_BooleanStringRemote_Void(boolean param1, String param2,
+ Remote param3) throws RemoteException {
+ System.out.println("MyRemoteObject: test_BooleanStringRemote_Void: "
+ + "param1 = " + param1 + ", param2 = " + param2 + ", param3 = "
+ + param3);
+ System.out.println("Call param3.test method: "
+ + ((MyRemoteInterface1) param3).test1());
+ }
+
+ public void test_Proxy_Void(Object param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_Proxy_Void: param = " + param);
+ }
+
+ public void test_IntArray_Void(int[] param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_IntArray_Void: param = ");
+ printIntArray(param);
+ }
+
+ public int[] test_Void_IntArray() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_IntArray");
+ return new int[] { 1, 2 };
+ }
+
+ public void test_Array_Void(String[] param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_Array_Void: param = ");
+ printArray(param);
+ }
+
+ public String[] test_Void_Array() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_Array");
+ return new String[] { "MyRemoteObject.test_Void_Array 1",
+ "MyRemoteObject.test_Void_Array 2" };
+ }
+
+ public void test_RemoteArray_Void(Remote[] param) throws RemoteException {
+ System.out.println("MyRemoteObject: test_RemoteArray_Void: param = ");
+ printArray(param);
+ }
+
+ public Remote[] test_Void_RemoteArray() throws RemoteException {
+ System.out.println("MyRemoteObject: test_Void_RemoteArray");
+ return new Remote[] {
+ new MyRemoteObject1("MyRemoteObject.test_Void_RemoteArray 1"),
+ new MyRemoteObject1("MyRemoteObject.test_Void_RemoteArray 2") };
+ }
+
+ public void test_Exception() throws RemoteException, MyException {
+ System.out.println("MyRemoteObject: test_Exception");
+ throw new MyException("MyRemoteObject.test_Exception");
+ }
+
+ public void test_Error() throws RemoteException, MyException {
+ System.out.println("MyRemoteObject: test_Error");
+ throw new Error("MyRemoteObject.test_Error");
+ }
+
+ public void test_RuntimeException() throws RemoteException, MyException {
+ System.out.println("MyRemoteObject: test_RuntimeException");
+ throw new RuntimeException("MyRemoteObject.text_RuntimeException");
+ }
+
+ public void test_RemoteException() throws RemoteException {
+ System.out.println("MyRemoteObject: test_RemoteException");
+ throw new RemoteException("MyRemoteObject.text_RemoteException");
+ }
+
+ public static void printArray(Object[] objs) {
+ if (objs == null) {
+ System.out.println(" Array is NULL.");
+ }
+
+ for (int i = 0; i < objs.length; ++i) {
+ System.out.println(" " + objs[i]);
+ }
+ }
+
+ public static void printIntArray(int[] arr) {
+ if (arr == null) {
+ System.out.println(" Int Array is NULL.");
+ }
+
+ for (int i = 0; i < arr.length; ++i) {
+ System.out.println(" " + arr[i]);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1.java Thu May 18 13:01:22 2006
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.RemoteException;
+
+import java.rmi.server.UnicastRemoteObject;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class MyRemoteObject1 extends UnicastRemoteObject
+ implements MyRemoteInterface1 {
+
+ protected String param = null;
+
+ public MyRemoteObject1(String str) throws RemoteException {
+ param = str;
+ }
+
+ public String test1() throws RemoteException {
+ System.out.println("MyRemoteObject1: test1 called");
+ return param;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,48 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.test.MyRemoteObject1
+ * Compatible with stub protocol version 1.2
+ *
+ * Generated by DRL RMI Compiler (rmic).
+ *
+ * DO NOT EDIT!!!
+ * Contents subject to change without notice!
+ */
+package org.apache.harmony.rmi.test;
+
+
+public final class MyRemoteObject1_Stub extends java.rmi.server.RemoteStub
+ implements org.apache.harmony.rmi.test.MyRemoteInterface1, java.rmi.Remote {
+
+ private static final long serialVersionUID = 2;
+
+ private static java.lang.reflect.Method $method_test1_0;
+
+ static {
+ try {
+ $method_test1_0 = org.apache.harmony.rmi.test.MyRemoteInterface1.class.getMethod("test1", new java.lang.Class[] {});
+ } catch (java.lang.NoSuchMethodException e) {
+ throw new java.lang.NoSuchMethodError(
+ "Stub class initialization failed: org.apache.harmony.rmi.test.MyRemoteObject1_Stub");
+ }
+ }
+
+ public MyRemoteObject1_Stub(java.rmi.server.RemoteRef ref) {
+ super(ref);
+ }
+
+ // Implementation of test1()
+ public java.lang.String test1()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test1_0, null, -52386119061268754L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject1_Stub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2.java Thu May 18 13:01:22 2006
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.4 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.RemoteException;
+
+import java.rmi.server.UnicastRemoteObject;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.4 $
+ */
+public class MyRemoteObject2 extends UnicastRemoteObject
+ implements MyRemoteInterface2 {
+
+ String param = null;
+
+ public MyRemoteObject2(String str) throws RemoteException {
+ param = str;
+ }
+
+ public String test2() throws RemoteException {
+ System.out.println("MyRemoteObject2: test2 called");
+ return param;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,48 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.test.MyRemoteObject2
+ * Compatible with stub protocol version 1.2
+ *
+ * Generated by DRL RMI Compiler (rmic).
+ *
+ * DO NOT EDIT!!!
+ * Contents subject to change without notice!
+ */
+package org.apache.harmony.rmi.test;
+
+
+public final class MyRemoteObject2_Stub extends java.rmi.server.RemoteStub
+ implements org.apache.harmony.rmi.test.MyRemoteInterface2, java.rmi.Remote {
+
+ private static final long serialVersionUID = 2;
+
+ private static java.lang.reflect.Method $method_test2_0;
+
+ static {
+ try {
+ $method_test2_0 = org.apache.harmony.rmi.test.MyRemoteInterface2.class.getMethod("test2", new java.lang.Class[] {});
+ } catch (java.lang.NoSuchMethodException e) {
+ throw new java.lang.NoSuchMethodError(
+ "Stub class initialization failed: org.apache.harmony.rmi.test.MyRemoteObject2_Stub");
+ }
+ }
+
+ public MyRemoteObject2_Stub(java.rmi.server.RemoteRef ref) {
+ super(ref);
+ }
+
+ // Implementation of test2()
+ public java.lang.String test2()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test2_0, null, 5666065769628162627L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject2_Stub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3.java Thu May 18 13:01:22 2006
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.RemoteException;
+
+import java.rmi.server.UnicastRemoteObject;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class MyRemoteObject3 extends UnicastRemoteObject
+ implements MyRemoteInterface3 {
+
+ String param = null;
+
+ public MyRemoteObject3(String str) throws RemoteException {
+ param = str;
+ }
+
+ public String test3() throws RemoteException {
+ System.out.println("MyRemoteObject3: test3 called");
+ return param;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,48 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.test.MyRemoteObject3
+ * Compatible with stub protocol version 1.2
+ *
+ * Generated by DRL RMI Compiler (rmic).
+ *
+ * DO NOT EDIT!!!
+ * Contents subject to change without notice!
+ */
+package org.apache.harmony.rmi.test;
+
+
+public final class MyRemoteObject3_Stub extends java.rmi.server.RemoteStub
+ implements org.apache.harmony.rmi.test.MyRemoteInterface3, java.rmi.Remote {
+
+ private static final long serialVersionUID = 2;
+
+ private static java.lang.reflect.Method $method_test3_0;
+
+ static {
+ try {
+ $method_test3_0 = org.apache.harmony.rmi.test.MyRemoteInterface3.class.getMethod("test3", new java.lang.Class[] {});
+ } catch (java.lang.NoSuchMethodException e) {
+ throw new java.lang.NoSuchMethodError(
+ "Stub class initialization failed: org.apache.harmony.rmi.test.MyRemoteObject3_Stub");
+ }
+ }
+
+ public MyRemoteObject3_Stub(java.rmi.server.RemoteRef ref) {
+ super(ref);
+ }
+
+ // Implementation of test3()
+ public java.lang.String test3()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test3_0, null, 3743488659963366430L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject3_Stub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject4.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject4.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject4.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject4.java Thu May 18 13:01:22 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+package org.apache.harmony.rmi.test;
+
+import java.rmi.RemoteException;
+
+
+/**
+ * @author Mikhail A. Markov, Vasily Zakharov
+ * @version $Revision: 1.1.2.1 $
+ */
+public class MyRemoteObject4 extends MyRemoteObject1 {
+
+ public MyRemoteObject4(String str) throws RemoteException {
+ super(str);
+ }
+
+ public String test1() throws RemoteException {
+ System.out.println("MyRemoteObject4: test1 called");
+ return param;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject4.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/test/common/unit/org/apache/harmony/rmi/test/MyRemoteObject_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,431 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.test.MyRemoteObject
+ * Compatible with stub protocol version 1.2
+ *
+ * Generated by DRL RMI Compiler (rmic).
+ *
+ * DO NOT EDIT!!!
+ * Contents subject to change without notice!
+ */
+package org.apache.harmony.rmi.test;
+
+
+public final class MyRemoteObject_Stub extends java.rmi.server.RemoteStub
+ implements org.apache.harmony.rmi.test.MyRemoteInterface, java.rmi.Remote {
+
+ private static final long serialVersionUID = 2;
+
+ private static java.lang.reflect.Method $method_test_Array_Void_0;
+ private static java.lang.reflect.Method $method_test_BooleanStringRemote_Void_1;
+ private static java.lang.reflect.Method $method_test_Error_2;
+ private static java.lang.reflect.Method $method_test_Exception_3;
+ private static java.lang.reflect.Method $method_test_IntArray_Void_4;
+ private static java.lang.reflect.Method $method_test_Int_Void_5;
+ private static java.lang.reflect.Method $method_test_Long_Long_6;
+ private static java.lang.reflect.Method $method_test_Proxy_Void_7;
+ private static java.lang.reflect.Method $method_test_RemoteArray_Void_8;
+ private static java.lang.reflect.Method $method_test_RemoteException_9;
+ private static java.lang.reflect.Method $method_test_RemoteRemote_Remote_10;
+ private static java.lang.reflect.Method $method_test_RemoteString_Void_11;
+ private static java.lang.reflect.Method $method_test_Remote_Remote_12;
+ private static java.lang.reflect.Method $method_test_Remote_Void_13;
+ private static java.lang.reflect.Method $method_test_RuntimeException_14;
+ private static java.lang.reflect.Method $method_test_String_String_15;
+ private static java.lang.reflect.Method $method_test_String_Void_16;
+ private static java.lang.reflect.Method $method_test_UnicastRemoteObject_Void_17;
+ private static java.lang.reflect.Method $method_test_Void_Array_18;
+ private static java.lang.reflect.Method $method_test_Void_Int_19;
+ private static java.lang.reflect.Method $method_test_Void_IntArray_20;
+ private static java.lang.reflect.Method $method_test_Void_Remote_21;
+ private static java.lang.reflect.Method $method_test_Void_RemoteArray_22;
+ private static java.lang.reflect.Method $method_test_Void_String_23;
+
+ static {
+ try {
+ $method_test_Array_Void_0 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Array_Void", new java.lang.Class[] {java.lang.String[].class});
+ $method_test_BooleanStringRemote_Void_1 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_BooleanStringRemote_Void", new java.lang.Class[] {boolean.class, java.lang.String.class, java.rmi.Remote.class});
+ $method_test_Error_2 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Error", new java.lang.Class[] {});
+ $method_test_Exception_3 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Exception", new java.lang.Class[] {});
+ $method_test_IntArray_Void_4 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_IntArray_Void", new java.lang.Class[] {int[].class});
+ $method_test_Int_Void_5 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Int_Void", new java.lang.Class[] {int.class});
+ $method_test_Long_Long_6 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Long_Long", new java.lang.Class[] {long.class});
+ $method_test_Proxy_Void_7 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Proxy_Void", new java.lang.Class[] {java.lang.Object.class});
+ $method_test_RemoteArray_Void_8 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_RemoteArray_Void", new java.lang.Class[] {java.rmi.Remote[].class});
+ $method_test_RemoteException_9 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_RemoteException", new java.lang.Class[] {});
+ $method_test_RemoteRemote_Remote_10 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_RemoteRemote_Remote", new java.lang.Class[] {java.rmi.Remote.class, java.rmi.Remote.class});
+ $method_test_RemoteString_Void_11 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_RemoteString_Void", new java.lang.Class[] {java.rmi.Remote.class, java.lang.String.class});
+ $method_test_Remote_Remote_12 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Remote_Remote", new java.lang.Class[] {java.rmi.Remote.class});
+ $method_test_Remote_Void_13 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Remote_Void", new java.lang.Class[] {java.rmi.Remote.class});
+ $method_test_RuntimeException_14 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_RuntimeException", new java.lang.Class[] {});
+ $method_test_String_String_15 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_String_String", new java.lang.Class[] {java.lang.String.class});
+ $method_test_String_Void_16 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_String_Void", new java.lang.Class[] {java.lang.String.class});
+ $method_test_UnicastRemoteObject_Void_17 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_UnicastRemoteObject_Void", new java.lang.Class[] {java.rmi.Remote.class});
+ $method_test_Void_Array_18 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_Array", new java.lang.Class[] {});
+ $method_test_Void_Int_19 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_Int", new java.lang.Class[] {});
+ $method_test_Void_IntArray_20 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_IntArray", new java.lang.Class[] {});
+ $method_test_Void_Remote_21 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_Remote", new java.lang.Class[] {});
+ $method_test_Void_RemoteArray_22 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_RemoteArray", new java.lang.Class[] {});
+ $method_test_Void_String_23 = org.apache.harmony.rmi.test.MyRemoteInterface.class.getMethod("test_Void_String", new java.lang.Class[] {});
+ } catch (java.lang.NoSuchMethodException e) {
+ throw new java.lang.NoSuchMethodError(
+ "Stub class initialization failed: org.apache.harmony.rmi.test.MyRemoteObject_Stub");
+ }
+ }
+
+ public MyRemoteObject_Stub(java.rmi.server.RemoteRef ref) {
+ super(ref);
+ }
+
+ // Implementation of test_Array_Void(String[])
+ public void test_Array_Void(java.lang.String[] $param_arrayOf_String_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_Array_Void_0, new java.lang.Object[] {$param_arrayOf_String_1}, -2243646371196886499L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_BooleanStringRemote_Void(boolean, String, Remote)
+ public void test_BooleanStringRemote_Void(boolean $param_boolean_1, java.lang.String $param_String_2, java.rmi.Remote $param_Remote_3)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_BooleanStringRemote_Void_1, new java.lang.Object[] {new java.lang.Boolean($param_boolean_1), $param_String_2, $param_Remote_3}, 7275758542885426298L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Error()
+ public void test_Error()
+ throws java.rmi.RemoteException, org.apache.harmony.rmi.test.MyException {
+ try {
+ ref.invoke(this, $method_test_Error_2, null, 4293752454580169568L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (org.apache.harmony.rmi.test.MyException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Exception()
+ public void test_Exception()
+ throws java.rmi.RemoteException, org.apache.harmony.rmi.test.MyException {
+ try {
+ ref.invoke(this, $method_test_Exception_3, null, -3748746352694661558L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (org.apache.harmony.rmi.test.MyException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_IntArray_Void(int[])
+ public void test_IntArray_Void(int[] $param_arrayOf_int_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_IntArray_Void_4, new java.lang.Object[] {$param_arrayOf_int_1}, 7755952240160380354L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Int_Void(int)
+ public void test_Int_Void(int $param_int_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_Int_Void_5, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, 5910792822519007408L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Long_Long(long)
+ public long test_Long_Long(long $param_long_1)
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Long_Long_6, new java.lang.Object[] {new java.lang.Long($param_long_1)}, -3247234805189459325L);
+ return ((java.lang.Long) $result).longValue();
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Proxy_Void(Object)
+ public void test_Proxy_Void(java.lang.Object $param_Object_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_Proxy_Void_7, new java.lang.Object[] {$param_Object_1}, 1862985695118685397L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_RemoteArray_Void(Remote[])
+ public void test_RemoteArray_Void(java.rmi.Remote[] $param_arrayOf_Remote_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_RemoteArray_Void_8, new java.lang.Object[] {$param_arrayOf_Remote_1}, -1903079572015069111L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_RemoteException()
+ public void test_RemoteException()
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_RemoteException_9, null, -4280707563916630440L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_RemoteRemote_Remote(Remote, Remote)
+ public java.rmi.Remote test_RemoteRemote_Remote(java.rmi.Remote $param_Remote_1, java.rmi.Remote $param_Remote_2)
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_RemoteRemote_Remote_10, new java.lang.Object[] {$param_Remote_1, $param_Remote_2}, 5877054312994691713L);
+ return ((java.rmi.Remote) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_RemoteString_Void(Remote, String)
+ public void test_RemoteString_Void(java.rmi.Remote $param_Remote_1, java.lang.String $param_String_2)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_RemoteString_Void_11, new java.lang.Object[] {$param_Remote_1, $param_String_2}, 8074777281465601732L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Remote_Remote(Remote)
+ public java.rmi.Remote test_Remote_Remote(java.rmi.Remote $param_Remote_1)
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Remote_Remote_12, new java.lang.Object[] {$param_Remote_1}, -4114253240958026174L);
+ return ((java.rmi.Remote) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Remote_Void(Remote)
+ public void test_Remote_Void(java.rmi.Remote $param_Remote_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_Remote_Void_13, new java.lang.Object[] {$param_Remote_1}, 1361325135665590515L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_RuntimeException()
+ public void test_RuntimeException()
+ throws java.rmi.RemoteException, org.apache.harmony.rmi.test.MyException {
+ try {
+ ref.invoke(this, $method_test_RuntimeException_14, null, -127135464990399242L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (org.apache.harmony.rmi.test.MyException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_String_String(String)
+ public java.lang.String test_String_String(java.lang.String $param_String_1)
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_String_String_15, new java.lang.Object[] {$param_String_1}, -3452752672819966636L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_String_Void(String)
+ public void test_String_Void(java.lang.String $param_String_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_String_Void_16, new java.lang.Object[] {$param_String_1}, 3320885435564229415L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_UnicastRemoteObject_Void(Remote)
+ public void test_UnicastRemoteObject_Void(java.rmi.Remote $param_Remote_1)
+ throws java.rmi.RemoteException {
+ try {
+ ref.invoke(this, $method_test_UnicastRemoteObject_Void_17, new java.lang.Object[] {$param_Remote_1}, 144033458432082551L);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_Array()
+ public java.lang.String[] test_Void_Array()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_Array_18, null, -5057311836623655794L);
+ return ((java.lang.String[]) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_Int()
+ public int test_Void_Int()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_Int_19, null, 1875101440413673248L);
+ return ((java.lang.Integer) $result).intValue();
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_IntArray()
+ public int[] test_Void_IntArray()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_IntArray_20, null, 6041902044718675347L);
+ return ((int[]) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_Remote()
+ public java.rmi.Remote test_Void_Remote()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_Remote_21, null, -1711397921290492632L);
+ return ((java.rmi.Remote) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_RemoteArray()
+ public java.rmi.Remote[] test_Void_RemoteArray()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_RemoteArray_22, null, 4456231954737882310L);
+ return ((java.rmi.Remote[]) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+
+ // Implementation of test_Void_String()
+ public java.lang.String test_Void_String()
+ throws java.rmi.RemoteException {
+ try {
+ java.lang.Object $result = ref.invoke(this, $method_test_Void_String_23, null, -5382831137617544633L);
+ return ((java.lang.String) $result);
+ } catch (java.lang.RuntimeException e) {
+ throw e;
+ } catch (java.rmi.RemoteException e) {
+ throw e;
+ } catch (java.lang.Exception e) {
+ throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+ }
+ }
+}