Factored out code for events that all shared a name; removed

hand-serialization code for fields which are now handled automatically.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2078 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-12-20 23:29:04 +00:00
parent 70a79f48e9
commit ee9049fe3e
17 changed files with 85 additions and 539 deletions
@@ -1,16 +1,10 @@
//
// $Id: InvocationResponseEvent.java,v 1.1 2002/08/14 19:07:55 mdb Exp $
// $Id: InvocationResponseEvent.java,v 1.2 2002/12/20 23:29:04 mdb Exp $
package com.threerings.presents.dobj;
import java.io.IOException;
import com.samskivert.util.StringUtil;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamable;
/**
* Used to dispatch an invocation response from the server to the client.
*
@@ -80,30 +74,6 @@ public class InvocationResponseEvent extends DEvent
return true;
}
/**
* Writes our custom streamable fields.
*/
public void writeObject (ObjectOutputStream out)
throws IOException
{
super.writeObject(out);
out.writeShort(_requestId);
out.writeByte(_methodId);
out.writeObject(_args);
}
/**
* Reads our custom streamable fields.
*/
public void readObject (ObjectInputStream in)
throws IOException, ClassNotFoundException
{
super.readObject(in);
_requestId = in.readShort();
_methodId = in.readByte();
_args = (Object[])in.readObject();
}
// documentation inherited
protected void notifyListener (Object listener)
{