From c8763c245a021f371d3641287bdf71d065fe2d58 Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Tue, 27 May 2008 22:33:15 +0000 Subject: [PATCH] Added serverClass field to bureau agent objects. Also renamed redundant "agentCode" to just "code" git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5136 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/bureau/data/AgentObject.as | 42 +++++++++++++++---- .../threerings/bureau/data/AgentObject.java | 39 +++++++++++++---- 2 files changed, 64 insertions(+), 17 deletions(-) diff --git a/src/as/com/threerings/bureau/data/AgentObject.as b/src/as/com/threerings/bureau/data/AgentObject.as index 4dde436b3..f2f2c3e0b 100644 --- a/src/as/com/threerings/bureau/data/AgentObject.as +++ b/src/as/com/threerings/bureau/data/AgentObject.as @@ -33,8 +33,11 @@ public class AgentObject extends DObject /** The field name of the bureauType field. */ public static const BUREAU_TYPE :String = "bureauType"; - /** The field name of the agentCode field. */ - public static const AGENT_CODE :String = "agentCode"; + /** The field name of the code field. */ + public static const CODE :String = "code"; + + /** The field name of the className field. */ + public static const CLASS_NAME :String = "className"; // AUTO-GENERATED: FIELDS END /** The id of the bureau the agent is running in. This is normally a unique id corresponding @@ -48,7 +51,11 @@ public class AgentObject extends DObject /** The location of the code for the agent. This could be a URL to an action script file or * some other description that the bureau can use to load and execute the agent's code. */ - public var agentCode :String; + public var code :String; + + /** The main class within the code to use when launching an agent. Whther this value is + * used depends on the type of bureau and will be resolve in the bureau client. */ + public var className :String; // AUTO-GENERATED: METHODS START /** @@ -84,19 +91,35 @@ public class AgentObject extends DObject } /** - * Requests that the agentCode field be set to the + * Requests that the code field be set to the * specified value. The local value will be updated immediately and an * event will be propagated through the system to notify all listeners * that the attribute did change. Proxied copies of this object (on * clients) will apply the value change when they received the * attribute changed notification. */ - public function setAgentCode (value :String) :void + public function setCode (value :String) :void { - var ovalue :String = this.agentCode; + var ovalue :String = this.code; requestAttributeChange( - AGENT_CODE, value, ovalue); - this.agentCode = value; + CODE, value, ovalue); + this.code = value; + } + + /** + * Requests that the className field be set to the + * specified value. The local value will be updated immediately and an + * event will be propagated through the system to notify all listeners + * that the attribute did change. Proxied copies of this object (on + * clients) will apply the value change when they received the + * attribute changed notification. + */ + public function setClassName (value :String) :void + { + var ovalue :String = this.className; + requestAttributeChange( + CLASS_NAME, value, ovalue); + this.className = value; } // AUTO-GENERATED: METHODS END @@ -106,7 +129,8 @@ public class AgentObject extends DObject super.readObject(ins); bureauId = ins.readField(String) as String; bureauType = ins.readField(String) as String; - agentCode = ins.readField(String) as String; + code = ins.readField(String) as String; + className = ins.readField(String) as String; } } } diff --git a/src/java/com/threerings/bureau/data/AgentObject.java b/src/java/com/threerings/bureau/data/AgentObject.java index 3d8d77d68..c157fb318 100644 --- a/src/java/com/threerings/bureau/data/AgentObject.java +++ b/src/java/com/threerings/bureau/data/AgentObject.java @@ -32,8 +32,11 @@ public class AgentObject extends DObject /** The field name of the bureauType field. */ public static final String BUREAU_TYPE = "bureauType"; - /** The field name of the agentCode field. */ - public static final String AGENT_CODE = "agentCode"; + /** The field name of the code field. */ + public static final String CODE = "code"; + + /** The field name of the className field. */ + public static final String CLASS_NAME = "className"; // AUTO-GENERATED: FIELDS END /** The id of the bureau the agent is running in. This is normally a unique id corresponding @@ -47,7 +50,11 @@ public class AgentObject extends DObject /** The location of the code for the agent. This could be a URL to an action script file or * some other description that the bureau can use to load and execute the agent's code. */ - public String agentCode; + public String code; + + /** The main class within the code to use when launching an agent. Whther this value is + * used depends on the type of bureau and will be resolve in the bureau client. */ + public String className; // AUTO-GENERATED: METHODS START /** @@ -83,19 +90,35 @@ public class AgentObject extends DObject } /** - * Requests that the agentCode field be set to the + * Requests that the code field be set to the * specified value. The local value will be updated immediately and an * event will be propagated through the system to notify all listeners * that the attribute did change. Proxied copies of this object (on * clients) will apply the value change when they received the * attribute changed notification. */ - public void setAgentCode (String value) + public void setCode (String value) { - String ovalue = this.agentCode; + String ovalue = this.code; requestAttributeChange( - AGENT_CODE, value, ovalue); - this.agentCode = value; + CODE, value, ovalue); + this.code = value; + } + + /** + * Requests that the className field be set to the + * specified value. The local value will be updated immediately and an + * event will be propagated through the system to notify all listeners + * that the attribute did change. Proxied copies of this object (on + * clients) will apply the value change when they received the + * attribute changed notification. + */ + public void setClassName (String value) + { + String ovalue = this.className; + requestAttributeChange( + CLASS_NAME, value, ovalue); + this.className = value; } // AUTO-GENERATED: METHODS END }