diff --git a/src/as/com/threerings/bureau/data/AgentObject.as b/src/as/com/threerings/bureau/data/AgentObject.as
index f2f2c3e0b..831dd1b1e 100644
--- a/src/as/com/threerings/bureau/data/AgentObject.as
+++ b/src/as/com/threerings/bureau/data/AgentObject.as
@@ -38,6 +38,9 @@ public class AgentObject extends DObject
/** The field name of the className field. */
public static const CLASS_NAME :String = "className";
+
+ /** The field name of the clientOid field. */
+ public static const CLIENT_OID :String = "clientOid";
// AUTO-GENERATED: FIELDS END
/** The id of the bureau the agent is running in. This is normally a unique id corresponding
@@ -57,71 +60,91 @@ public class AgentObject extends DObject
* used depends on the type of bureau and will be resolve in the bureau client. */
public var className :String;
+ /** The id of the client running this agent (only set after the agent is assigned to a
+ * bureau and is running). */
+ public var clientOid :int;
+
// AUTO-GENERATED: METHODS START
- /**
- * Requests that the bureauId 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 setBureauId (value :String) :void
- {
- var ovalue :String = this.bureauId;
- requestAttributeChange(
- BUREAU_ID, value, ovalue);
- this.bureauId = value;
- }
+// /**
+// * Requests that the bureauId 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 setBureauId (value :String) :void
+// {
+// var ovalue :String = this.bureauId;
+// requestAttributeChange(
+// BUREAU_ID, value, ovalue);
+// this.bureauId = value;
+// }
- /**
- * Requests that the bureauType 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 setBureauType (value :String) :void
- {
- var ovalue :String = this.bureauType;
- requestAttributeChange(
- BUREAU_TYPE, value, ovalue);
- this.bureauType = value;
- }
+// /**
+// * Requests that the bureauType 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 setBureauType (value :String) :void
+// {
+// var ovalue :String = this.bureauType;
+// requestAttributeChange(
+// BUREAU_TYPE, value, ovalue);
+// this.bureauType = value;
+// }
- /**
- * 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 setCode (value :String) :void
- {
- var ovalue :String = this.code;
- requestAttributeChange(
- CODE, value, ovalue);
- this.code = value;
- }
+// /**
+// * 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 setCode (value :String) :void
+// {
+// var ovalue :String = this.code;
+// requestAttributeChange(
+// 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
+// /**
+// * 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;
+// }
+
+// /**
+// * Requests that the clientOid 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 setClientOid (value :int) :void
+// {
+// var ovalue :int = this.clientOid;
+// requestAttributeChange(
+// CLIENT_OID, Integer.valueOf(value), Integer.valueOf(ovalue));
+// this.clientOid = value;
+// }
+// // AUTO-GENERATED: METHODS END
// from interface Streamable
override public function readObject (ins :ObjectInputStream) :void
@@ -131,6 +154,7 @@ public class AgentObject extends DObject
bureauType = ins.readField(String) as String;
code = ins.readField(String) as String;
className = ins.readField(String) as String;
+ clientOid = ins.readInt();
}
}
}
diff --git a/src/java/com/threerings/bureau/data/AgentObject.java b/src/java/com/threerings/bureau/data/AgentObject.java
index c157fb318..83aa704e3 100644
--- a/src/java/com/threerings/bureau/data/AgentObject.java
+++ b/src/java/com/threerings/bureau/data/AgentObject.java
@@ -37,6 +37,9 @@ public class AgentObject extends DObject
/** The field name of the className field. */
public static final String CLASS_NAME = "className";
+
+ /** The field name of the clientOid field. */
+ public static final String CLIENT_OID = "clientOid";
// AUTO-GENERATED: FIELDS END
/** The id of the bureau the agent is running in. This is normally a unique id corresponding
@@ -56,6 +59,10 @@ public class AgentObject extends DObject
* used depends on the type of bureau and will be resolve in the bureau client. */
public String className;
+ /** The id of the client running this agent (only set after the agent is assigned to a
+ * bureau and run). */
+ public int clientOid;
+
// AUTO-GENERATED: METHODS START
/**
* Requests that the bureauId field be set to the
@@ -120,5 +127,21 @@ public class AgentObject extends DObject
CLASS_NAME, value, ovalue);
this.className = value;
}
+
+ /**
+ * Requests that the clientOid 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 setClientOid (int value)
+ {
+ int ovalue = this.clientOid;
+ requestAttributeChange(
+ CLIENT_OID, Integer.valueOf(value), Integer.valueOf(ovalue));
+ this.clientOid = value;
+ }
// AUTO-GENERATED: METHODS END
}
diff --git a/src/java/com/threerings/bureau/server/BureauRegistry.java b/src/java/com/threerings/bureau/server/BureauRegistry.java
index 62f0386b2..076a348a1 100644
--- a/src/java/com/threerings/bureau/server/BureauRegistry.java
+++ b/src/java/com/threerings/bureau/server/BureauRegistry.java
@@ -320,6 +320,7 @@ public class BureauRegistry
switch (found.state) {
case Bureau.STARTED:
found.bureau.agentStates.put(found.agent, Bureau.RUNNING);
+ found.agent.setClientOid(client.getOid());
break;
case Bureau.STILL_BORN: