// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.

package dant.test.rmi;

public final class Server_Stub
    extends java.rmi.server.RemoteStub
    implements dant.test.rmi.Interface, java.rmi.Remote
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("java.io.Externalizable externalizableNoParam()"),
	new java.rmi.server.Operation("int primitiveNoParam()"),
	new java.rmi.server.Operation("java.io.Serializable serializableNoParam()"),
	new java.rmi.server.Operation("java.lang.String stringNoParam()"),
	new java.rmi.server.Operation("void voidExternalizableParam(java.io.Externalizable)"),
	new java.rmi.server.Operation("void voidMultipleExternalizableParam(java.io.Externalizable, java.io.Externalizable)"),
	new java.rmi.server.Operation("void voidMultiplePrimitiveParam(int, float)"),
	new java.rmi.server.Operation("void voidMultipleSerializableParam(java.io.Serializable, java.io.Serializable)"),
	new java.rmi.server.Operation("void voidMultipleStringParam(java.lang.String, java.lang.String)"),
	new java.rmi.server.Operation("void voidNoParams()"),
	new java.rmi.server.Operation("void voidPrimitiveParam(int)"),
	new java.rmi.server.Operation("void voidSerializableParam(java.io.Serializable)"),
	new java.rmi.server.Operation("void voidStringParam(java.lang.String)")
    };
    
    private static final long interfaceHash = -6833338475940168393L;
    
    private static final long serialVersionUID = 2;
    
    private static boolean useNewInvoke;
    private static java.lang.reflect.Method $method_externalizableNoParam_0;
    private static java.lang.reflect.Method $method_primitiveNoParam_1;
    private static java.lang.reflect.Method $method_serializableNoParam_2;
    private static java.lang.reflect.Method $method_stringNoParam_3;
    private static java.lang.reflect.Method $method_voidExternalizableParam_4;
    private static java.lang.reflect.Method $method_voidMultipleExternalizableParam_5;
    private static java.lang.reflect.Method $method_voidMultiplePrimitiveParam_6;
    private static java.lang.reflect.Method $method_voidMultipleSerializableParam_7;
    private static java.lang.reflect.Method $method_voidMultipleStringParam_8;
    private static java.lang.reflect.Method $method_voidNoParams_9;
    private static java.lang.reflect.Method $method_voidPrimitiveParam_10;
    private static java.lang.reflect.Method $method_voidSerializableParam_11;
    private static java.lang.reflect.Method $method_voidStringParam_12;
    
    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
		});
	    useNewInvoke = true;
	    $method_externalizableNoParam_0 = dant.test.rmi.Interface.class.getMethod("externalizableNoParam", new java.lang.Class[] {});
	    $method_primitiveNoParam_1 = dant.test.rmi.Interface.class.getMethod("primitiveNoParam", new java.lang.Class[] {});
	    $method_serializableNoParam_2 = dant.test.rmi.Interface.class.getMethod("serializableNoParam", new java.lang.Class[] {});
	    $method_stringNoParam_3 = dant.test.rmi.Interface.class.getMethod("stringNoParam", new java.lang.Class[] {});
	    $method_voidExternalizableParam_4 = dant.test.rmi.Interface.class.getMethod("voidExternalizableParam", new java.lang.Class[] {java.io.Externalizable.class});
	    $method_voidMultipleExternalizableParam_5 = dant.test.rmi.Interface.class.getMethod("voidMultipleExternalizableParam", new java.lang.Class[] {java.io.Externalizable.class, java.io.Externalizable.class});
	    $method_voidMultiplePrimitiveParam_6 = dant.test.rmi.Interface.class.getMethod("voidMultiplePrimitiveParam", new java.lang.Class[] {int.class, float.class});
	    $method_voidMultipleSerializableParam_7 = dant.test.rmi.Interface.class.getMethod("voidMultipleSerializableParam", new java.lang.Class[] {java.io.Serializable.class, java.io.Serializable.class});
	    $method_voidMultipleStringParam_8 = dant.test.rmi.Interface.class.getMethod("voidMultipleStringParam", new java.lang.Class[] {java.lang.String.class, java.lang.String.class});
	    $method_voidNoParams_9 = dant.test.rmi.Interface.class.getMethod("voidNoParams", new java.lang.Class[] {});
	    $method_voidPrimitiveParam_10 = dant.test.rmi.Interface.class.getMethod("voidPrimitiveParam", new java.lang.Class[] {int.class});
	    $method_voidSerializableParam_11 = dant.test.rmi.Interface.class.getMethod("voidSerializableParam", new java.lang.Class[] {java.io.Serializable.class});
	    $method_voidStringParam_12 = dant.test.rmi.Interface.class.getMethod("voidStringParam", new java.lang.Class[] {java.lang.String.class});
	} catch (java.lang.NoSuchMethodException e) {
	    useNewInvoke = false;
	}
    }
    
    // constructors
    public Server_Stub() {
	super();
    }
    public Server_Stub(java.rmi.server.RemoteRef ref) {
	super(ref);
    }
    
    // methods from remote interfaces
    
    // implementation of externalizableNoParam()
    public java.io.Externalizable externalizableNoParam()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_externalizableNoParam_0, null, -2650265553860422354L);
		return ((java.io.Externalizable) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
		ref.invoke(call);
		java.io.Externalizable $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (java.io.Externalizable) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $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 primitiveNoParam()
    public int primitiveNoParam()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_primitiveNoParam_1, null, -8951808628026959673L);
		return ((java.lang.Integer) $result).intValue();
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
		ref.invoke(call);
		int $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = in.readInt();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $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 serializableNoParam()
    public java.io.Serializable serializableNoParam()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_serializableNoParam_2, null, -1096604072422095136L);
		return ((java.io.Serializable) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
		ref.invoke(call);
		java.io.Serializable $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (java.io.Serializable) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $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 stringNoParam()
    public java.lang.String stringNoParam()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_stringNoParam_3, null, -8625225237790894865L);
		return ((java.lang.String) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
		ref.invoke(call);
		java.lang.String $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (java.lang.String) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $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 voidExternalizableParam(Externalizable)
    public void voidExternalizableParam(java.io.Externalizable $param_Externalizable_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidExternalizableParam_4, new java.lang.Object[] {$param_Externalizable_1}, 7019569558548687363L);
	    } 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_Externalizable_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidMultipleExternalizableParam(Externalizable, Externalizable)
    public void voidMultipleExternalizableParam(java.io.Externalizable $param_Externalizable_1, java.io.Externalizable $param_Externalizable_2)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidMultipleExternalizableParam_5, new java.lang.Object[] {$param_Externalizable_1, $param_Externalizable_2}, 7295649033622364273L);
	    } 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_Externalizable_1);
		    out.writeObject($param_Externalizable_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidMultiplePrimitiveParam(int, float)
    public void voidMultiplePrimitiveParam(int $param_int_1, float $param_float_2)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidMultiplePrimitiveParam_6, new java.lang.Object[] {new java.lang.Integer($param_int_1), new java.lang.Float($param_float_2)}, -3520114825331557121L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 6, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeInt($param_int_1);
		    out.writeFloat($param_float_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidMultipleSerializableParam(Serializable, Serializable)
    public void voidMultipleSerializableParam(java.io.Serializable $param_Serializable_1, java.io.Serializable $param_Serializable_2)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidMultipleSerializableParam_7, new java.lang.Object[] {$param_Serializable_1, $param_Serializable_2}, 5876764673039311091L);
	    } 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_Serializable_1);
		    out.writeObject($param_Serializable_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidMultipleStringParam(String, String)
    public void voidMultipleStringParam(java.lang.String $param_String_1, java.lang.String $param_String_2)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidMultipleStringParam_8, new java.lang.Object[] {$param_String_1, $param_String_2}, 4981381260284148835L);
	    } 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_String_1);
		    out.writeObject($param_String_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidNoParams()
    public void voidNoParams()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidNoParams_9, null, 6890324490836523717L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 9, 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 voidPrimitiveParam(int)
    public void voidPrimitiveParam(int $param_int_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidPrimitiveParam_10, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, 565554149824463835L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 10, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeInt($param_int_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidSerializableParam(Serializable)
    public void voidSerializableParam(java.io.Serializable $param_Serializable_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidSerializableParam_11, new java.lang.Object[] {$param_Serializable_1}, 3415498872468539031L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 11, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Serializable_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of voidStringParam(String)
    public void voidStringParam(java.lang.String $param_String_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_voidStringParam_12, new java.lang.Object[] {$param_String_1}, 4070055943050418612L);
	    } 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_String_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.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
}
