// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.

public final class BidServerImpl_Stub_Stub
    extends java.rmi.server.RemoteStub
    implements BidServer, java.rmi.Remote
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("boolean accept(int, java.lang.String)"),
	new java.rmi.server.Operation("boolean bid(int, java.lang.String, int)"),
	new java.rmi.server.Operation("boolean offer(int, java.lang.String, int)"),
	new java.rmi.server.Operation("int register(BidClient)"),
	new java.rmi.server.Operation("void unregister(int)")
    };
    
    private static final long interfaceHash = -4718661478613852445L;
    
    private static final long serialVersionUID = 2;
    
    private static boolean useNewInvoke;
    private static java.lang.reflect.Method $method_accept_0;
    private static java.lang.reflect.Method $method_bid_1;
    private static java.lang.reflect.Method $method_offer_2;
    private static java.lang.reflect.Method $method_register_3;
    private static java.lang.reflect.Method $method_unregister_4;
    
    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_accept_0 = BidServer.class.getMethod("accept", new java.lang.Class[] {int.class, java.lang.String.class});
	    $method_bid_1 = BidServer.class.getMethod("bid", new java.lang.Class[] {int.class, java.lang.String.class, int.class});
	    $method_offer_2 = BidServer.class.getMethod("offer", new java.lang.Class[] {int.class, java.lang.String.class, int.class});
	    $method_register_3 = BidServer.class.getMethod("register", new java.lang.Class[] {BidClient.class});
	    $method_unregister_4 = BidServer.class.getMethod("unregister", new java.lang.Class[] {int.class});
	} catch (java.lang.NoSuchMethodException e) {
	    useNewInvoke = false;
	}
    }
    
    // constructors
    public BidServerImpl_Stub_Stub() {
	super();
    }
    public BidServerImpl_Stub_Stub(java.rmi.server.RemoteRef ref) {
	super(ref);
    }
    
    // methods from remote interfaces
    
    // implementation of accept(int, String)
    public boolean accept(int $param_int_1, java.lang.String $param_String_2)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_accept_0, new java.lang.Object[] {new java.lang.Integer($param_int_1), $param_String_2}, -8540295264324486397L);
		return ((java.lang.Boolean) $result).booleanValue();
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeInt($param_int_1);
		    out.writeObject($param_String_2);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		boolean $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = in.readBoolean();
		} 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 bid(int, String, int)
    public boolean bid(int $param_int_1, java.lang.String $param_String_2, int $param_int_3)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_bid_1, new java.lang.Object[] {new java.lang.Integer($param_int_1), $param_String_2, new java.lang.Integer($param_int_3)}, -3372451130548036620L);
		return ((java.lang.Boolean) $result).booleanValue();
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeInt($param_int_1);
		    out.writeObject($param_String_2);
		    out.writeInt($param_int_3);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		boolean $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = in.readBoolean();
		} 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 offer(int, String, int)
    public boolean offer(int $param_int_1, java.lang.String $param_String_2, int $param_int_3)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_offer_2, new java.lang.Object[] {new java.lang.Integer($param_int_1), $param_String_2, new java.lang.Integer($param_int_3)}, -8889668094122809140L);
		return ((java.lang.Boolean) $result).booleanValue();
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeInt($param_int_1);
		    out.writeObject($param_String_2);
		    out.writeInt($param_int_3);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		boolean $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = in.readBoolean();
		} 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 register(BidClient)
    public int register(BidClient $param_BidClient_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_register_3, new java.lang.Object[] {$param_BidClient_1}, -3741745366941742161L);
		return ((java.lang.Integer) $result).intValue();
	    } 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_BidClient_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		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 unregister(int)
    public void unregister(int $param_int_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_unregister_4, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, -4059302252893404197L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, 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);
	}
    }
}
