89d073b13c
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@12 542714f4-19e9-0310-aa3c-eee0fc999fb1
56 lines
1.1 KiB
Java
56 lines
1.1 KiB
Java
//
|
|
// $Id: FetchRequest.java,v 1.2 2001/05/30 23:58:31 mdb Exp $
|
|
|
|
package com.threerings.cocktail.cher.net;
|
|
|
|
import java.io.IOException;
|
|
import java.io.DataInputStream;
|
|
import java.io.DataOutputStream;
|
|
|
|
public class FetchRequest extends UpstreamMessage
|
|
{
|
|
/** The code for an object fetch request. */
|
|
public static final short TYPE = TYPE_BASE + 2;
|
|
|
|
/**
|
|
* Zero argument constructor used when unserializing an instance.
|
|
*/
|
|
public FetchRequest ()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructs a fetch request for the distributed object with the
|
|
* specified object id.
|
|
*/
|
|
public FetchRequest (int oid)
|
|
{
|
|
_oid = oid;
|
|
}
|
|
|
|
public short getType ()
|
|
{
|
|
return TYPE;
|
|
}
|
|
|
|
public void writeTo (DataOutputStream out)
|
|
throws IOException
|
|
{
|
|
super.writeTo(out);
|
|
out.writeInt(_oid);
|
|
}
|
|
|
|
public void readFrom (DataInputStream in)
|
|
throws IOException
|
|
{
|
|
super.readFrom(in);
|
|
_oid = in.readInt();
|
|
}
|
|
|
|
/**
|
|
* The object id of the distributed object which we are fetching.
|
|
*/
|
|
protected int _oid;
|
|
}
|