Finished wiring up oid list tracking; made shutdown() work on the cher
server; added an easy mechanism to write test modules and invoke them on the server. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@192 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TestObject.dobj,v 1.2 2001/07/19 05:56:20 mdb Exp $
|
||||
// $Id: TestObject.dobj,v 1.3 2001/08/08 00:28:49 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.server.test;
|
||||
|
||||
@@ -12,12 +12,12 @@ import com.threerings.cocktail.cher.dobj.*;
|
||||
public class TestObject extends DObject
|
||||
{
|
||||
public static final String FOO = "foo";
|
||||
public static final String BAR = "bar";
|
||||
public static final String LIST = "list";
|
||||
|
||||
public int foo;
|
||||
|
||||
public static final String BAR = "bar";
|
||||
|
||||
public String bar;
|
||||
public OidList list = new OidList();
|
||||
|
||||
public void setFoo (int foo)
|
||||
{
|
||||
@@ -29,8 +29,29 @@ public class TestObject extends DObject
|
||||
requestAttributeChange(BAR, bar);
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
/**
|
||||
* Requests that the specified oid be added to the
|
||||
* <code>list</code> oid list.
|
||||
*/
|
||||
public void addToList (int oid)
|
||||
{
|
||||
return "[foo=" + foo + ", bar=" + bar + "]";
|
||||
requestOidAdd(LIST, oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that the specified oid be removed from the
|
||||
* <code>list</code> oid list.
|
||||
*/
|
||||
public void removeFromList (int oid)
|
||||
{
|
||||
requestOidRemove(LIST, oid);
|
||||
}
|
||||
|
||||
protected void toString (StringBuffer buf)
|
||||
{
|
||||
super.toString(buf);
|
||||
buf.append(", foo=").append(foo);
|
||||
buf.append(", bar=").append(bar);
|
||||
buf.append(", list=").append(list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user