Removed some code that only needs to be on the server-side.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4360 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-09-07 21:31:34 +00:00
parent 0ed50738a9
commit bd306351ee
8 changed files with 13 additions and 64 deletions
@@ -4,17 +4,10 @@ import com.threerings.presents.client.InvocationService_ConfirmListener;
public class InvocationMarshaller_ConfirmMarshaller
extends InvocationMarshaller_ListenerMarshaller
implements InvocationService_ConfirmListener
{
public static const REQUEST_PROCESSED :int = 1;
// documetnation inherited from interfacc
public function requestProcessed () :void
{
// TODO: server only?
}
// documetnation inherited
// documentation inherited
override public function dispatchResponse (methodId :int, args :Array) :void
{
switch (methodId) {
@@ -8,11 +8,10 @@ import com.threerings.io.Streamable;
import com.threerings.presents.client.InvocationService_InvocationListener;
import com.threerings.presents.dobj.DObjectManager;
import com.threerings.presents.dobj.InvocationResponseEvent;
public class InvocationMarshaller_ListenerMarshaller
implements Streamable, InvocationService_InvocationListener
implements Streamable
{
/** The method id used to dispatch a requestFailed response. */
public static const REQUEST_FAILED_RSPID :int = 0;
@@ -31,18 +30,6 @@ public class InvocationMarshaller_ListenerMarshaller
* This is only valid on the client. */
public var mapStamp :Number;
/** The distributed object manager to use when dispatching proxied
* responses. This is only valid on the server. */
public var omgr :DObjectManager;
// documentation inherited from interface
public function requestFailed (cause :String) :void
{
// omgr.postEvent(new InvocationResponseEvent(
// callerOid, requestId, REQUEST_FAILED_RSPID,
// [ cause ]));
}
/**
* Called to dispatch an invocation response to our target
* listener.
@@ -77,10 +64,9 @@ public class InvocationMarshaller_ListenerMarshaller
}
// documentation inherited from interface Streamable
public function readObject (ins :ObjectInputStream) :void
public final function readObject (ins :ObjectInputStream) :void
{
callerOid = ins.readInt();
requestId = ins.readShort();
throw new Error(); // abstract: not needed
}
}
}
@@ -4,16 +4,9 @@ import com.threerings.presents.client.InvocationService_ResultListener;
public class InvocationMarshaller_ResultMarshaller
extends InvocationMarshaller_ListenerMarshaller
implements InvocationService_ResultListener
{
public static const REQUEST_PROCESSED :int = 1;
// documetnation inherited from interfacc
public function requestProcessed (result :Object) :void
{
// TODO: server only?
}
// documetnation inherited
override public function dispatchResponse (methodId :int, args :Array) :void
{
@@ -7,16 +7,9 @@ import com.threerings.presents.dobj.InvocationResponseEvent;
// TODO: this will be autogenerated
public class TimeBaseMarshaller_GotTimeBaseMarshaller
extends InvocationMarshaller_ListenerMarshaller
implements GotTimeBaseListener
{
public static const GOT_TIME_OID :int = 1;
public function gotTimeOid (arg1 :int) :void
{
// omgr.postEvent(new InvocationResponseEvent(
// callerOid, requestId, GOT_TIME_OID, [ arg1 ]));
}
override public function dispatchResponse (methodId :int, args :Array) :void
{
switch (methodId) {
@@ -3,6 +3,8 @@ package com.threerings.presents.net {
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringUtil;
public class AuthRequest extends UpstreamMessage
{
public function AuthRequest (creds :Credentials, version :String)
@@ -16,8 +18,8 @@ public class AuthRequest extends UpstreamMessage
var hoursFromUTC :int = Math.abs(minsOffset) / 60;
var minsFromUTC :int = Math.abs(minsOffset) % 60;
_zone = "GMT" + ((minsOffset < 0) ? "-" : "+") +
((hoursFromUTC < 10) ? "0" : "") + hoursFromUTC + ":" +
((minsFromUTC < 10) ? "0" : "") + minsFromUTC;
StringUtil.prepad(String(hoursFromUTC), 2, "0") + ":" +
StringUtil.prepad(String(minsFromUTC), 2, "0");
}
// documentation inherited
@@ -30,16 +32,6 @@ public class AuthRequest extends UpstreamMessage
out.writeField(_zone);
}
// documentation inherited
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_creds = (ins.readObject() as Credentials);
_version = (ins.readField(String) as String);
_zone = (ins.readField(String) as String);
}
protected var _creds :Credentials;
protected var _version :String;
protected var _zone :String;
@@ -13,11 +13,9 @@ public /* abstract */ class DownstreamMessage
public var messageId :int = -1;
// documentation inherited from interface Streamable
public function writeObject (out :ObjectOutputStream) :void
public final function writeObject (out :ObjectOutputStream) :void
{
Log.getLog(this).warning(
"This is client code: Downstream messages shouldn't be written");
//out.writeShort(messageId);
throw new Error(); // abstract: not needed
}
// documentation inherited from interface Streamable
@@ -50,11 +50,7 @@ public class ForwardEventRequest extends UpstreamMessage
out.writeObject(_event);
}
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_event = (ins.readObject() as DEvent);
}
/** readObject omitted */
public function toString () :String
{
@@ -31,11 +31,9 @@ public /* abstract */ class UpstreamMessage
}
// documentation inherited from interface Streamable
public function readObject (ins :ObjectInputStream) :void
public final function readObject (ins :ObjectInputStream) :void
{
Log.getLog(this).warning(
"This is client code: Upstream messages shouldn't be read");
//messageId = ins.readShort();
throw new Error(); // abstract: not needed
}
/**