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 [6/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/javasrc...

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Skel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Skel.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Skel.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Skel.java Thu May 18 13:01:22 2006
@@ -0,0 +1,462 @@
+/*
+ * RMI skeleton class
+ * for class org.apache.harmony.rmi.activation.Rmid
+ * Compatible with stub protocol version 1.1/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 Rmid_Skel implements java.rmi.server.Skeleton {
+
+    private static final long interfaceHash = 8470858815147946311L;
+
+    private static final java.rmi.server.Operation[] operations = {
+        new java.rmi.server.Operation("java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID, boolean)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationInstantiator, long)"),
+        new java.rmi.server.Operation("void activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID)"),
+        new java.rmi.server.Operation("void inactiveGroup(java.rmi.activation.ActivationGroupID, long)"),
+        new java.rmi.server.Operation("void inactiveObject(java.rmi.activation.ActivationID)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)"),
+        new java.rmi.server.Operation("void shutdown()"),
+        new java.rmi.server.Operation("void unregisterGroup(java.rmi.activation.ActivationGroupID)"),
+        new java.rmi.server.Operation("void unregisterObject(java.rmi.activation.ActivationID)")
+    };
+
+    public java.rmi.server.Operation[] getOperations() {
+        return (java.rmi.server.Operation[]) operations.clone();
+    }
+
+    public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) throws java.lang.Exception {
+        if (opnum < 0) {
+            if (hash == -8767355154875805558L) {
+                opnum = 0;
+            } else if (hash == -4575843150759415294L) {
+                opnum = 1;
+            } else if (hash == 2543984342209939736L) {
+                opnum = 2;
+            } else if (hash == 4830055440982622087L) {
+                opnum = 3;
+            } else if (hash == -8701843806548736528L) {
+                opnum = 4;
+            } else if (hash == -399287892768650944L) {
+                opnum = 5;
+            } else if (hash == -4165404120701281807L) {
+                opnum = 6;
+            } else if (hash == 6921515268192657754L) {
+                opnum = 7;
+            } else if (hash == -3006759798994351347L) {
+                opnum = 8;
+            } else if (hash == 7128043237057180796L) {
+                opnum = 9;
+            } else if (hash == 1213918527826541191L) {
+                opnum = 10;
+            } else if (hash == -7207851917985848402L) {
+                opnum = 11;
+            } else if (hash == 3768097077835970701L) {
+                opnum = 12;
+            } else if (hash == -6843850585331411084L) {
+                opnum = 13;
+            } else {
+                throw new java.rmi.UnmarshalException("Invalid method hash: " + hash);
+            }
+        } else {
+            if (hash != interfaceHash) {
+                throw new java.rmi.server.SkeletonMismatchException(
+                        "Interface hash mismatch, expected: " + interfaceHash + ", received: " + hash);
+            }
+        }
+
+        org.apache.harmony.rmi.activation.Rmid server = (org.apache.harmony.rmi.activation.Rmid) obj;
+
+        switch (opnum) {
+
+        case 0: {    // activate(ActivationID, boolean)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+            boolean $param_boolean_2;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+                $param_boolean_2 = in.readBoolean();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.MarshalledObject $result = server.activate($param_ActivationID_1, $param_boolean_2);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 1: {    // activeGroup(ActivationGroupID, ActivationInstantiator, long)
+
+            java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1;
+            java.rmi.activation.ActivationInstantiator $param_ActivationInstantiator_2;
+            long $param_long_3;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupID_1 = (java.rmi.activation.ActivationGroupID) in.readObject();
+                $param_ActivationInstantiator_2 = (java.rmi.activation.ActivationInstantiator) in.readObject();
+                $param_long_3 = in.readLong();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationMonitor $result = server.activeGroup($param_ActivationGroupID_1, $param_ActivationInstantiator_2, $param_long_3);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 2: {    // activeObject(ActivationID, MarshalledObject)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+            java.rmi.MarshalledObject $param_MarshalledObject_2;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+                $param_MarshalledObject_2 = (java.rmi.MarshalledObject) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            server.activeObject($param_ActivationID_1, $param_MarshalledObject_2);
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 3: {    // getActivationDesc(ActivationID)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationDesc $result = server.getActivationDesc($param_ActivationID_1);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 4: {    // getActivationGroupDesc(ActivationGroupID)
+
+            java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupID_1 = (java.rmi.activation.ActivationGroupID) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationGroupDesc $result = server.getActivationGroupDesc($param_ActivationGroupID_1);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 5: {    // inactiveGroup(ActivationGroupID, long)
+
+            java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1;
+            long $param_long_2;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupID_1 = (java.rmi.activation.ActivationGroupID) in.readObject();
+                $param_long_2 = in.readLong();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            server.inactiveGroup($param_ActivationGroupID_1, $param_long_2);
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 6: {    // inactiveObject(ActivationID)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            server.inactiveObject($param_ActivationID_1);
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 7: {    // registerGroup(ActivationGroupDesc)
+
+            java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupDesc_1 = (java.rmi.activation.ActivationGroupDesc) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationGroupID $result = server.registerGroup($param_ActivationGroupDesc_1);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 8: {    // registerObject(ActivationDesc)
+
+            java.rmi.activation.ActivationDesc $param_ActivationDesc_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationDesc_1 = (java.rmi.activation.ActivationDesc) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationID $result = server.registerObject($param_ActivationDesc_1);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 9: {    // setActivationDesc(ActivationID, ActivationDesc)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+            java.rmi.activation.ActivationDesc $param_ActivationDesc_2;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+                $param_ActivationDesc_2 = (java.rmi.activation.ActivationDesc) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationDesc $result = server.setActivationDesc($param_ActivationID_1, $param_ActivationDesc_2);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 10: {    // setActivationGroupDesc(ActivationGroupID, ActivationGroupDesc)
+
+            java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1;
+            java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_2;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupID_1 = (java.rmi.activation.ActivationGroupID) in.readObject();
+                $param_ActivationGroupDesc_2 = (java.rmi.activation.ActivationGroupDesc) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            java.rmi.activation.ActivationGroupDesc $result = server.setActivationGroupDesc($param_ActivationGroupID_1, $param_ActivationGroupDesc_2);
+
+            try {
+                java.io.ObjectOutput out = call.getResultStream(true);
+                out.writeObject($result);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 11: {    // shutdown()
+
+            call.releaseInputStream();
+
+            server.shutdown();
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 12: {    // unregisterGroup(ActivationGroupID)
+
+            java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationGroupID_1 = (java.rmi.activation.ActivationGroupID) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            server.unregisterGroup($param_ActivationGroupID_1);
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        case 13: {    // unregisterObject(ActivationID)
+
+            java.rmi.activation.ActivationID $param_ActivationID_1;
+
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $param_ActivationID_1 = (java.rmi.activation.ActivationID) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("Error unmarshalling arguments", e);
+            } finally {
+                call.releaseInputStream();
+            }
+
+            server.unregisterObject($param_ActivationID_1);
+
+            try {
+                call.getResultStream(true);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("Error marshalling return", e);
+            }
+
+            break;
+        }
+
+        default:
+            throw new java.rmi.UnmarshalException("Invalid method number: " + opnum);
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Skel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Stub.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Stub.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Stub.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Stub.java Thu May 18 13:01:22 2006
@@ -0,0 +1,631 @@
+/*
+ * RMI stub class
+ * for class org.apache.harmony.rmi.activation.Rmid
+ * Compatible with stub protocol version 1.1/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 Rmid_Stub extends java.rmi.server.RemoteStub
+        implements java.rmi.activation.ActivationSystem, java.rmi.activation.ActivationMonitor, java.rmi.activation.Activator, java.rmi.Remote {
+
+    private static final long serialVersionUID = 2;
+
+    private static final long interfaceHash = 8470858815147946311L;
+
+    private static boolean useNewInvoke;
+
+    private static final java.rmi.server.Operation[] operations = {
+        new java.rmi.server.Operation("java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID, boolean)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationInstantiator, long)"),
+        new java.rmi.server.Operation("void activeObject(java.rmi.activation.ActivationID, java.rmi.MarshalledObject)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID)"),
+        new java.rmi.server.Operation("void inactiveGroup(java.rmi.activation.ActivationGroupID, long)"),
+        new java.rmi.server.Operation("void inactiveObject(java.rmi.activation.ActivationID)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)"),
+        new java.rmi.server.Operation("void shutdown()"),
+        new java.rmi.server.Operation("void unregisterGroup(java.rmi.activation.ActivationGroupID)"),
+        new java.rmi.server.Operation("void unregisterObject(java.rmi.activation.ActivationID)")
+    };
+
+    private static java.lang.reflect.Method $method_activate_0;
+    private static java.lang.reflect.Method $method_activeGroup_1;
+    private static java.lang.reflect.Method $method_activeObject_2;
+    private static java.lang.reflect.Method $method_getActivationDesc_3;
+    private static java.lang.reflect.Method $method_getActivationGroupDesc_4;
+    private static java.lang.reflect.Method $method_inactiveGroup_5;
+    private static java.lang.reflect.Method $method_inactiveObject_6;
+    private static java.lang.reflect.Method $method_registerGroup_7;
+    private static java.lang.reflect.Method $method_registerObject_8;
+    private static java.lang.reflect.Method $method_setActivationDesc_9;
+    private static java.lang.reflect.Method $method_setActivationGroupDesc_10;
+    private static java.lang.reflect.Method $method_shutdown_11;
+    private static java.lang.reflect.Method $method_unregisterGroup_12;
+    private static java.lang.reflect.Method $method_unregisterObject_13;
+
+    static {
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] {java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class});
+
+            $method_activate_0 = java.rmi.activation.Activator.class.getMethod("activate", new java.lang.Class[] {java.rmi.activation.ActivationID.class, boolean.class});
+            $method_activeGroup_1 = java.rmi.activation.ActivationSystem.class.getMethod("activeGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationInstantiator.class, long.class});
+            $method_activeObject_2 = java.rmi.activation.ActivationMonitor.class.getMethod("activeObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.MarshalledObject.class});
+            $method_getActivationDesc_3 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
+            $method_getActivationGroupDesc_4 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class});
+            $method_inactiveGroup_5 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, long.class});
+            $method_inactiveObject_6 = java.rmi.activation.ActivationMonitor.class.getMethod("inactiveObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
+            $method_registerGroup_7 = java.rmi.activation.ActivationSystem.class.getMethod("registerGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupDesc.class});
+            $method_registerObject_8 = java.rmi.activation.ActivationSystem.class.getMethod("registerObject", new java.lang.Class[] {java.rmi.activation.ActivationDesc.class});
+            $method_setActivationDesc_9 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationDesc", new java.lang.Class[] {java.rmi.activation.ActivationID.class, java.rmi.activation.ActivationDesc.class});
+            $method_setActivationGroupDesc_10 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationGroupDesc", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationGroupDesc.class});
+            $method_shutdown_11 = java.rmi.activation.ActivationSystem.class.getMethod("shutdown", new java.lang.Class[] {});
+            $method_unregisterGroup_12 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterGroup", new java.lang.Class[] {java.rmi.activation.ActivationGroupID.class});
+            $method_unregisterObject_13 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterObject", new java.lang.Class[] {java.rmi.activation.ActivationID.class});
+
+            useNewInvoke = true;
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
+    }
+
+    public Rmid_Stub() {
+        super();
+    }
+
+    public Rmid_Stub(java.rmi.server.RemoteRef ref) {
+        super(ref);
+    }
+
+    // Implementation of activate(ActivationID, boolean)
+    public java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID $param_ActivationID_1, boolean $param_boolean_2)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_activate_0, new java.lang.Object[] {$param_ActivationID_1, new java.lang.Boolean($param_boolean_2)}, -8767355154875805558L);
+                return ((java.rmi.MarshalledObject) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                    out.writeBoolean($param_boolean_2);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.MarshalledObject $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.MarshalledObject) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of activeGroup(ActivationGroupID, ActivationInstantiator, long)
+    public java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1, java.rmi.activation.ActivationInstantiator $param_ActivationInstantiator_2, long $param_long_3)
+            throws java.rmi.activation.UnknownGroupException, java.rmi.activation.ActivationException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_activeGroup_1, new java.lang.Object[] {$param_ActivationGroupID_1, $param_ActivationInstantiator_2, new java.lang.Long($param_long_3)}, -4575843150759415294L);
+                return ((java.rmi.activation.ActivationMonitor) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupID_1);
+                    out.writeObject($param_ActivationInstantiator_2);
+                    out.writeLong($param_long_3);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationMonitor $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationMonitor) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of activeObject(ActivationID, MarshalledObject)
+    public void activeObject(java.rmi.activation.ActivationID $param_ActivationID_1, java.rmi.MarshalledObject $param_MarshalledObject_2)
+            throws java.rmi.activation.UnknownObjectException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_activeObject_2, new java.lang.Object[] {$param_ActivationID_1, $param_MarshalledObject_2}, 2543984342209939736L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                    out.writeObject($param_MarshalledObject_2);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.UnknownObjectException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of getActivationDesc(ActivationID)
+    public java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID $param_ActivationID_1)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_getActivationDesc_3, new java.lang.Object[] {$param_ActivationID_1}, 4830055440982622087L);
+                return ((java.rmi.activation.ActivationDesc) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationDesc $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationDesc) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of getActivationGroupDesc(ActivationGroupID)
+    public java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_getActivationGroupDesc_4, new java.lang.Object[] {$param_ActivationGroupID_1}, -8701843806548736528L);
+                return ((java.rmi.activation.ActivationGroupDesc) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupID_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationGroupDesc $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationGroupDesc) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of inactiveGroup(ActivationGroupID, long)
+    public void inactiveGroup(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1, long $param_long_2)
+            throws java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_inactiveGroup_5, new java.lang.Object[] {$param_ActivationGroupID_1, new java.lang.Long($param_long_2)}, -399287892768650944L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 5, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupID_1);
+                    out.writeLong($param_long_2);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.UnknownGroupException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of inactiveObject(ActivationID)
+    public void inactiveObject(java.rmi.activation.ActivationID $param_ActivationID_1)
+            throws java.rmi.activation.UnknownObjectException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_inactiveObject_6, new java.lang.Object[] {$param_ActivationID_1}, -4165404120701281807L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 6, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.UnknownObjectException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of registerGroup(ActivationGroupDesc)
+    public java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_1)
+            throws java.rmi.activation.ActivationException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_registerGroup_7, new java.lang.Object[] {$param_ActivationGroupDesc_1}, 6921515268192657754L);
+                return ((java.rmi.activation.ActivationGroupID) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 7, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupDesc_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationGroupID $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationGroupID) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of registerObject(ActivationDesc)
+    public java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc $param_ActivationDesc_1)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_registerObject_8, new java.lang.Object[] {$param_ActivationDesc_1}, -3006759798994351347L);
+                return ((java.rmi.activation.ActivationID) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 8, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationDesc_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationID $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationID) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of setActivationDesc(ActivationID, ActivationDesc)
+    public java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID $param_ActivationID_1, java.rmi.activation.ActivationDesc $param_ActivationDesc_2)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_setActivationDesc_9, new java.lang.Object[] {$param_ActivationID_1, $param_ActivationDesc_2}, 7128043237057180796L);
+                return ((java.rmi.activation.ActivationDesc) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 9, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                    out.writeObject($param_ActivationDesc_2);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationDesc $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationDesc) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of setActivationGroupDesc(ActivationGroupID, ActivationGroupDesc)
+    public java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1, java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_2)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                java.lang.Object $result = ref.invoke(this, $method_setActivationGroupDesc_10, new java.lang.Object[] {$param_ActivationGroupID_1, $param_ActivationGroupDesc_2}, 1213918527826541191L);
+                return ((java.rmi.activation.ActivationGroupDesc) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 10, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupID_1);
+                    out.writeObject($param_ActivationGroupDesc_2);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                java.rmi.activation.ActivationGroupDesc $result;
+
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationGroupDesc) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("Error unmarshalling return value", e);
+                } finally {
+                    ref.done(call);
+                }
+
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of shutdown()
+    public void shutdown()
+            throws java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_shutdown_11, null, -7207851917985848402L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 11, interfaceHash);
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } 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 unregisterGroup(ActivationGroupID)
+    public void unregisterGroup(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_unregisterGroup_12, new java.lang.Object[] {$param_ActivationGroupID_1}, 3768097077835970701L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 12, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationGroupID_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("Undeclared checked exception", e);
+        }
+    }
+
+    // Implementation of unregisterObject(ActivationID)
+    public void unregisterObject(java.rmi.activation.ActivationID $param_ActivationID_1)
+            throws java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException {
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_unregisterObject_13, new java.lang.Object[] {$param_ActivationID_1}, -6843850585331411084L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 13, interfaceHash);
+
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_ActivationID_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("Error marshalling arguments", e);
+                }
+
+                ref.invoke(call);
+
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.activation.ActivationException 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/src/common/javasrc/org/apache/harmony/rmi/activation/Rmid_Stub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/package.html
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/package.html?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/package.html (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/package.html Thu May 18 13:01:22 2006
@@ -0,0 +1,25 @@
+<html>
+<!--
+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 $
+-->
+<body>
+RMI Activation Daemon implementation specific classes.
+</body>
+</html>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/activation/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnection.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnection.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnection.java Thu May 18 13:01:22 2006
@@ -0,0 +1,260 @@
+/*
+ * 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
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.client;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.DataOutputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.rmi.ConnectException;
+import java.rmi.ConnectIOException;
+import java.rmi.RemoteException;
+import java.rmi.server.UID;
+
+import org.apache.harmony.rmi.common.RMILog;
+import org.apache.harmony.rmi.common.RMIUtil;
+import org.apache.harmony.rmi.transport.Endpoint;
+import org.apache.harmony.rmi.transport.RMIProtocolConstants;
+
+
+/**
+ * Connection opened by client side. It acknowledges RMI protocol version,
+ * RMI protocol type etc.
+ *
+ * @author  Mikhail A. Markov
+ * @version $Revision: 1.1.2.2 $
+ */
+public abstract class ClientConnection implements RMIProtocolConstants {
+
+    /** Connected socket. */
+    protected Socket s;
+
+    /** InputStream open from the socket. */
+    protected InputStream in;
+
+    /** OutputStream open from the socket. */
+    protected OutputStream out;
+
+    /** Endpoint this connection connected to. */
+    protected Endpoint ep;
+
+    /* Log for logging tcp connections activity. */
+    private static final RMILog transportLog = RMILog.getTransportLog();
+
+    /* log for logging dgc activity. */
+    private static final RMILog dgcLog = RMILog.getDGCLog();
+
+    /**
+     * Constructs ClientConnection, obtains input/output streams and acknowledge
+     * protocol with server side.
+     *
+     * @param s Connected socket
+     * @param ep server's endpoint
+     *
+     * @throws RemoteException if any I/O error occured during connection
+     *         creation
+     */
+    public ClientConnection(Socket s, Endpoint ep) throws RemoteException {
+        this.s = s;
+        this.ep = ep;
+
+        try {
+            out = new BufferedOutputStream(s.getOutputStream());
+            in = new BufferedInputStream(s.getInputStream());
+        } catch (IOException ioe) {
+            throw new ConnectException(
+                    "Unable to establish connection to server", ioe);
+        }
+        serverProtocolAck();
+    }
+
+    /**
+     * Opens a connection to the given Endpoint and writes DGC ack there.
+     *
+     * @param uid UID to be send
+     */
+    public void sendDGCAck(UID uid) {
+        ClientConnection conn = null;
+
+        try {
+            conn = ClientConnectionManager.getConnection(ep);
+            DataOutputStream dout = new DataOutputStream(out);
+            dout.writeByte(RMIProtocolConstants.DGCACK_MSG);
+            uid.write(dout);
+            dout.flush();
+            conn.releaseOutputStream();
+            conn.done();
+        } catch (IOException ioe) {
+            if (conn != null) {
+                conn.close();
+            }
+        }
+
+        if (dgcLog.isLoggable(RMILog.VERBOSE)) {
+            dgcLog.log(RMILog.VERBOSE, "Sent DGC ack to " + ep + " for " + uid);
+        }
+    }
+
+    /**
+     * Acknowledge protocol with server side.
+     *
+     * @return acknowledged protocol number
+     *
+     * @throws RemoteException if any I/O exception occured during protocol
+     *         acknowledgement
+     */
+    protected abstract int serverProtocolAck() throws RemoteException;
+
+    /**
+     * Writes RMI protocol header and RMI protocol vertion to the open
+     * OutputStream.
+     *
+     * @param dout DataOutputStream to write header to
+     *
+     * @throws RemoteException if any I/O error occured while writing header
+     */
+    protected void writeHeader(DataOutputStream dout) throws RemoteException {
+        try {
+            dout.writeInt(RMI_HEADER);
+            dout.writeShort(PROTOCOL_VER);
+        } catch (IOException ioe) {
+            throw new ConnectIOException(
+                    "Unable to write RMI protocol header", ioe);
+        }
+
+        if (transportLog.isLoggable(RMILog.VERBOSE)) {
+            transportLog.log(RMILog.VERBOSE, "Using protocol version "
+                    + PROTOCOL_VER);
+        }
+    }
+
+    /**
+     * Closes this connection (i.e. closes opened Socket) and remove this
+     * Connection from the list of active connections in ConnectionManager.
+     */
+    public void close() {
+        close(true);
+    }
+
+    /**
+     * Closes this connection (i.e. closes opened Socket) and if remove
+     * parameter is true then remove this Connection from the list of active
+     * connections in ConnectionManager.
+     *
+     * @param remove if true then remove this Connection from the list of active
+     *        connections in ConnectionManager
+     */
+    public void close(boolean remove) {
+        try {
+            s.close();
+        } catch (Exception ex) {
+        }
+
+        if (remove) {
+            ClientConnectionManager.removeConnection(this);
+        }
+    }
+
+    /**
+     * Returns open input stream.
+     *
+     * @return open input stream
+     */
+    public InputStream getInputStream() {
+        return in;
+    }
+
+    /**
+     * Returns open output stream.
+     *
+     * @return open output stream
+     */
+    public OutputStream getOutputStream() {
+        return out;
+    }
+
+    /**
+     * Signals to the connection that remote call is done.
+     */
+    public abstract void done();
+
+    /**
+     * By default flushes output stream of this connection.
+     *
+     * @throws IOException if any I/O error occured
+     */
+    public void releaseOutputStream() throws IOException {
+        out.flush();
+    }
+
+    /**
+     * If this connection is reusable and available then reuse it.
+     *
+     * @return true if this connection was successfully prepared for reusing
+     */
+    public abstract boolean reuse();
+
+    /**
+     * Returns true if this connection is reusable and has no active
+     * remote calls.
+     *
+     * @return true if this connection is reusable and has no active
+     *         remote calls
+     */
+    public abstract boolean isAvailable();
+
+    /**
+     * True if this connection could be reused for another remote call.
+     *
+     * @return true if this connection could be reused for another remote call
+     */
+    public abstract boolean isReusable();
+
+    /**
+     * If this connection is available returns time when it could be closed
+     * (if it'll be still in available state).
+     *
+     * @return returns time when the connection could be closed
+     */
+    public abstract long getExpiration();
+
+    /**
+     * Returns endpoint this connection connected to.
+     *
+     * @return endpoint this connection connected to
+     */
+    public Endpoint getEndpoint() {
+        return ep;
+    }
+
+    /**
+     * Returns string representation of this connection.
+     *
+     * @return string representation of this connection
+     */
+    public String toString() {
+        return RMIUtil.getShortName(getClass()) + ": endpoint:" + ep;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnectionManager.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnectionManager.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnectionManager.java Thu May 18 13:01:22 2006
@@ -0,0 +1,213 @@
+/*
+ * 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
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.client;
+
+import java.net.Socket;
+import java.rmi.RemoteException;
+import java.security.AccessController;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.harmony.rmi.common.CreateThreadAction;
+import org.apache.harmony.rmi.common.GetLongPropAction;
+import org.apache.harmony.rmi.common.RMILog;
+import org.apache.harmony.rmi.common.RMIProperties;
+import org.apache.harmony.rmi.transport.Endpoint;
+import org.apache.harmony.rmi.transport.proxy.HttpConnection;
+import org.apache.harmony.rmi.transport.proxy.HttpOutboundSocket;
+import org.apache.harmony.rmi.transport.tcp.TcpConnection;
+
+
+/**
+ * Manager managing connections from the client side: it holds the list of
+ * opened connections so the client could reuse them.
+ *
+ * @author  Mikhail A. Markov
+ * @version $Revision: 1.1.2.2 $
+ */
+public final class ClientConnectionManager {
+
+    // List of active connections
+    private static Hashtable connsTable = new Hashtable();
+
+    /**
+     * Period during which the connection could be reused
+     * (and after which it's closed).
+     * Default value is 15000 ms.
+     */
+    public static long connTimeout = ((Long) AccessController.doPrivileged(
+            new GetLongPropAction(
+                    RMIProperties.CONNECTIONTIMEOUT_PROP, 15000))).longValue();
+
+    /** Log for logging tcp connections activity. */
+    public static final RMILog tcpTransportLog = RMILog.getTcpTransportLog();
+
+    // Starts thread managing expired connections.
+    static {
+        ConnectionsCollector coll = new ConnectionsCollector();
+        ((Thread) AccessController.doPrivileged(new CreateThreadAction(
+                coll, "ConnectionsCollector", true))).start();
+    }
+
+    /**
+     * Returns 1-st available connection. If there is no available connections
+     * a new one is created.
+     *
+     * @param ep Endpoint to connect to
+     *
+     * @return opened connection
+     *
+     * @throws RemoteException if any error occured while obtaining connection
+     */
+    public static ClientConnection getConnection(Endpoint ep)
+            throws RemoteException {
+        ClientConnection conn = null;
+
+        synchronized (connsTable) {
+            Set conns = (Set) connsTable.get(ep);
+
+            if (conns != null && !conns.isEmpty()) {
+                for (Iterator iter = conns.iterator(); iter.hasNext();) {
+                    conn = (ClientConnection) iter.next();
+
+                    if (conn.isReusable() && conn.reuse()) {
+                        return conn;
+                    }
+                }
+            }
+        }
+        Socket s = ep.createSocket();
+
+        if (s instanceof HttpOutboundSocket) {
+            conn = new HttpConnection(s, ep);
+        } else {
+            conn = new TcpConnection(s, ep);
+        }
+
+        synchronized (connsTable) {
+            Set conns = (Set) connsTable.get(ep);
+
+            if (conns == null) {
+                conns = Collections.synchronizedSet(new HashSet());
+            }
+            conns.add(conn);
+            connsTable.put(ep, conns);
+        }
+        return conn;
+    }
+
+    /**
+     * Removes connection from the list of connections.
+     *
+     * @param conn connection to be removed
+     */
+    public static void removeConnection(ClientConnection conn) {
+        Endpoint ep = conn.getEndpoint();
+
+        synchronized (connsTable) {
+            Set conns = (Set) connsTable.get(ep);
+
+            if (conns == null) {
+                return;
+            }
+            conns.remove(conn);
+
+            if (conns.size() == 0) {
+                connsTable.remove(ep);
+            }
+        }
+    }
+
+    /*
+     * Class checking reusable available connections if they are already
+     * expired - and removing them.
+     */
+    private static class ConnectionsCollector implements Runnable {
+
+        /**
+         * Checks reusable available connections if they are already expired and
+         * removes them.
+         */
+        public void run() {
+            long wakeUpTime;
+
+            while (true) {
+                wakeUpTime = Long.MAX_VALUE;
+
+                synchronized (connsTable) {
+                    for (Enumeration eps = connsTable.keys();
+                            eps.hasMoreElements();) {
+                        Endpoint ep = (Endpoint) eps.nextElement();
+                        Set conns = (Set) connsTable.get(ep);
+
+                        if (conns.isEmpty()) {
+                            connsTable.remove(ep);
+                            continue;
+                        }
+
+                        for (Iterator iter = conns.iterator();
+                                iter.hasNext();) {
+                            ClientConnection conn =
+                                    (ClientConnection) iter.next();
+
+                            if (conn.isReusable() && conn.isAvailable()) {
+                                long expirTime = conn.getExpiration();
+                                long curTime = System.currentTimeMillis();
+
+                                if (expirTime <= curTime) {
+                                    // connection is expired
+                                    conn.close(false);
+                                    iter.remove();
+
+                                    if (tcpTransportLog.isLoggable(
+                                            RMILog.VERBOSE)) {
+                                        tcpTransportLog.log(RMILog.VERBOSE,
+                                            conn.toString()
+                                            + " connection timeout is expired");
+                                    }
+                                    continue;
+                                }
+                                wakeUpTime = Math.min(wakeUpTime, expirTime);
+                            }
+                        }
+                    }
+                }
+                long sleepTime;
+
+                if (wakeUpTime == Long.MAX_VALUE) {
+                    sleepTime = connTimeout;
+                } else {
+                    sleepTime = wakeUpTime - System.currentTimeMillis();
+                }
+
+                try {
+                    Thread.sleep(sleepTime);
+                } catch (InterruptedException ie) {
+                }
+            }
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientConnectionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientRemoteCall.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientRemoteCall.java?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientRemoteCall.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientRemoteCall.java Thu May 18 13:01:22 2006
@@ -0,0 +1,269 @@
+/*
+ * 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
+ * @version $Revision: 1.1.2.2 $
+ */
+package org.apache.harmony.rmi.client;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.StreamCorruptedException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.lang.reflect.Method;
+import java.rmi.RemoteException;
+import java.rmi.UnmarshalException;
+import java.rmi.UnexpectedException;
+import java.rmi.server.RemoteCall;
+import java.rmi.server.UID;
+
+import org.apache.harmony.rmi.common.RMILog;
+import org.apache.harmony.rmi.remoteref.UnicastRef;
+import org.apache.harmony.rmi.transport.RMIObjectInputStream;
+import org.apache.harmony.rmi.transport.RMIObjectOutputStream;
+import org.apache.harmony.rmi.transport.RMIProtocolConstants;
+
+
+/**
+ * RemoteCall implementation used by UnicastRef on client's side.
+ *
+ * @author  Mikhail A. Markov
+ * @version $Revision: 1.1.2.2 $
+ */
+public class ClientRemoteCall implements RemoteCall, RMIProtocolConstants {
+
+    // Connection to remote server.
+    private ClientConnection conn;
+
+    // InputStream for reading objects.
+    private RMIObjectInputStream oin = null;
+
+    // OutputStream for sending objects.
+    private RMIObjectOutputStream oout = null;
+
+    // true if this remote call was closed
+    private boolean isClosed = false;
+
+    // UID received from server
+    private UID uid;
+
+    // Method this remote call was created for.
+    private Method m = null;
+
+    /**
+     * Constructs ClientRemoteCall from existing connection.
+     *
+     * @param conn opened ClientConnection
+     */
+    public ClientRemoteCall(ClientConnection conn) {
+        this.conn = conn;
+    }
+
+    /**
+     * Constructs ObjectInputStream (if it was not created yet) and returns
+     * this created stream.
+     *
+     * @return ObjectInputStream to read objects from
+     *
+     * @throws IOException if an I/O error occured during stream construction
+     */
+    public ObjectInput getInputStream() throws IOException {
+        if (oin == null) {
+            oin = new RMIObjectInputStream(conn.getInputStream(), true);
+        }
+        return oin;
+    }
+
+    /**
+     * Constructs ObjectOutputStream (if it was not created yet) and returns
+     * this created stream.
+     *
+     * @return ObjectOutputStream to write objects to
+     *
+     * @throws IOException if an I/O error occured during stream construction
+     */
+
+    public ObjectOutput getOutputStream() throws IOException {
+        if (oout == null) {
+            oout = new RMIObjectOutputStream(conn.getOutputStream());
+        }
+        return oout;
+    }
+
+    /**
+     * @see RemoteCall.getResultStream(boolean)
+     */
+    public ObjectOutput getResultStream(boolean success)
+            throws IOException, StreamCorruptedException {
+        return getOutputStream();
+    }
+
+    /**
+     * @see RemoteCall.releaseInputStream()
+     */
+    public void releaseInputStream() throws IOException {
+    }
+
+    /**
+     * @see RemoteCall.releaseOutputStream()
+     */
+    public void releaseOutputStream() throws IOException {
+        getOutputStream().flush();
+        conn.releaseOutputStream();
+    }
+
+    /**
+     * @see RemoteCall.done()
+     */
+    public void done() throws IOException {
+        if (!isClosed) {
+            if (oin.isRemoteCallStream() && oin.isDGCAckNeeded()) {
+                // we need to make a DGC ack call
+                conn.sendDGCAck(uid == null ? (uid = new UID()) : uid);
+            }
+            conn.done();
+        }
+    }
+
+    /**
+     * Closes connection/this remote call.
+     *
+     */
+    public void close() {
+        conn.close();
+        isClosed = true;
+    }
+
+    /**
+     * @see RemoteCall.executeCall()
+     */
+    public void executeCall() throws Exception {
+        if (isClosed) {
+            throw new RemoteException("Remote call is already closed.");
+        }
+        byte data;
+
+        try {
+            // read input
+            if ((data = (new DataInputStream(conn.getInputStream())).readByte())
+                    != CALL_OK) {
+                throw new UnmarshalException(
+                        "Unknown call status response: " + data);
+            }
+
+            // read return value id
+            getInputStream();
+            data = oin.readByte();
+        } catch (UnmarshalException re) {
+            throw re;
+        } catch (IOException ioe) {
+            throw new UnmarshalException("Unable to read call return header: ",
+                    ioe);
+        }
+
+        if (data != RETURN_VAL && data != RETURN_EX) {
+            throw new UnmarshalException(
+                    "Unknown call result response: " + data);
+        }
+        uid = UID.read(oin);
+
+        if (data == RETURN_EX) {
+            getExceptionFromServer();
+        }
+    }
+
+    /**
+     * Sets the method for this RemoteCall to the given value.
+     * This value will be used later for throwing UnexpectedException.
+     *
+     * @param m Method this call was created for
+     */
+    public void setMethod(Method m) {
+        this.m = m;
+    }
+
+    /**
+     * Returns string representation of this RemoteCall.
+     *
+     * @return string representation of this RemoteCall
+     */
+    public String toString() {
+        return "ClientRemoteCall: " + conn;
+    }
+
+    /*
+     * Reads exception thrown by server from the opened ObjectInputStream,
+     * processes it and throws appropriate exception.
+     *
+     * @throws Exception exception depending on one thrown by the server side
+     */
+    private void getExceptionFromServer() throws Exception {
+        Object obj = null;
+
+        try {
+            obj = oin.readObject();
+        } catch (IOException ioe) {
+            throw new UnmarshalException("IOException occured while "
+                    + "unmarshalling returned exception", ioe);
+        } catch (ClassNotFoundException cnfe) {
+            throw new UnmarshalException("ClassNotFoundException occured "
+                    + "while unmarshalling returned exception", cnfe);
+        }
+
+        if (obj instanceof Exception) {
+            Exception resEx = (Exception) obj;
+
+            if (!(resEx instanceof RuntimeException) && m != null) {
+                boolean ok = false;
+                Class[] declaredExs = m.getExceptionTypes();
+
+                for (int i = 0; i < declaredExs.length; ++i) {
+                    if (declaredExs[i].isAssignableFrom(resEx.getClass())) {
+                        ok = true;
+                        break;
+                    }
+                }
+
+                if (!ok) {
+                    resEx = new UnexpectedException(
+                            "Remote method threw unexpected exception", resEx);
+                }
+            }
+
+            // Add our stacktrace to the stacktrace of exception received
+            StackTraceElement[] origST = resEx.getStackTrace();
+            StackTraceElement[] curST = (new Exception()).getStackTrace();
+            StackTraceElement[] resST =
+                    new StackTraceElement[origST.length + curST.length];
+            System.arraycopy(origST, 0, resST, 0, origST.length);
+            System.arraycopy(curST, 0, resST, origST.length, curST.length);
+            resEx.setStackTrace(resST);
+
+            // logs exception from server
+            if (UnicastRef.clientCallsLog.isLoggable(RMILog.BRIEF)) {
+                UnicastRef.clientCallsLog.log(RMILog.BRIEF,
+                        "Outbound remote call to " + conn +
+                        " received exception: ", resEx);
+            }
+            throw resEx;
+        } else {
+            throw new UnexpectedException("Not Exception type thrown: " + obj);
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/ClientRemoteCall.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/package.html
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/package.html?rev=407625&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/package.html (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/package.html Thu May 18 13:01:22 2006
@@ -0,0 +1,25 @@
+<html>
+<!--
+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:  Vasily Zakharov
+Version: $Revision: 1.1.2.1 $
+-->
+<body>
+RMI client side implementation classes.
+</body>
+</html>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi3/src/common/javasrc/org/apache/harmony/rmi/client/package.html
------------------------------------------------------------------------------
    svn:eol-style = native