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

package dant.test.rmi;

public final class CodebaseTestImpl_Skel
    implements java.rmi.server.Skeleton
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("void doSomething()"),
	new java.rmi.server.Operation("void doSomething(java.lang.String)")
    };
    
    private static final long interfaceHash = 1853430110301379584L;
    
    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 == 1228327250915409028L) {
		opnum = 0;
	    } else if (hash == 3082155412933025001L) {
		opnum = 1;
	    } else {
		throw new java.rmi.UnmarshalException("invalid method hash");
	    }
	} else {
	    if (hash != interfaceHash)
		throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
	}
	
	dant.test.rmi.CodebaseTestImpl server = (dant.test.rmi.CodebaseTestImpl) obj;
	switch (opnum) {
	case 0: // doSomething()
	{
	    throw new java.rmi.RemoteException ("Bad method call");
	}
	    
	case 1: // doSomething(String)
	{
	    java.lang.String $param_String_1;
	    try {
		java.io.ObjectInput in = call.getInputStream();
		$param_String_1 = (java.lang.String) 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.doSomething($param_String_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");
	}
    }
}
