diff --git a/src/java/com/threerings/crowd/server/PlaceManager.java b/src/java/com/threerings/crowd/server/PlaceManager.java
index 99ac48863..1aae96dbb 100644
--- a/src/java/com/threerings/crowd/server/PlaceManager.java
+++ b/src/java/com/threerings/crowd/server/PlaceManager.java
@@ -96,6 +96,14 @@ public class PlaceManager
public void handleEvent (MessageEvent event, PlaceManager pmgr);
}
+ /**
+ * Used to call methods on this place manager's delegates.
+ */
+ public static interface DelegateOp
+ {
+ public void apply (PlaceManagerDelegate delegate);
+ }
+
/**
* Returns a reference to our place configuration object.
*/
@@ -178,22 +186,6 @@ public class PlaceManager
didInit();
}
- /**
- * Called after this place manager has been initialized with its configuration information but
- * before it has been started up with its place object reference. Derived classes can override
- * this function and perform any basic initialization that they desire. They should of course
- * be sure to call super.didInit().
- */
- protected void didInit ()
- {
- // initialize our delegates
- applyToDelegates(new DelegateOp() {
- public void apply (PlaceManagerDelegate delegate) {
- delegate.didInit(_config);
- }
- });
- }
-
/**
* Adds the supplied delegate to the list for this manager.
*/
@@ -205,6 +197,19 @@ public class PlaceManager
_delegates.add(delegate);
}
+ /**
+ * Applies the supplied operation to this manager's registered delegates.
+ */
+ public void applyToDelegates (DelegateOp op)
+ {
+ if (_delegates != null) {
+ int dcount = _delegates.size();
+ for (int i = 0; i < dcount; i++) {
+ op.apply(_delegates.get(i));
+ }
+ }
+ }
+
/**
* Provides an opportunity for place managers to ratify the creation of a place based on
* whatever criterion they may require (based on information available to the manager at this
@@ -437,6 +442,22 @@ public class PlaceManager
return PlaceObject.class;
}
+ /**
+ * Called after this place manager has been initialized with its configuration information but
+ * before it has been started up with its place object reference. Derived classes can override
+ * this function and perform any basic initialization that they desire. They should of course
+ * be sure to call super.didInit().
+ */
+ protected void didInit ()
+ {
+ // initialize our delegates
+ applyToDelegates(new DelegateOp() {
+ public void apply (PlaceManagerDelegate delegate) {
+ delegate.didInit(_config);
+ }
+ });
+ }
+
/**
* Called if the permissions check failed, to give place managers a chance to do any cleanup
* that might be necessary due to their early initialization or permissions checking code.
@@ -648,27 +669,6 @@ public class PlaceManager
buf.append(", config=").append(_config);
}
- /**
- * Used to call methods in delegates.
- */
- protected static interface DelegateOp
- {
- public void apply (PlaceManagerDelegate delegate);
- }
-
- /**
- * Applies the supplied operation to the registered delegates.
- */
- protected void applyToDelegates (DelegateOp op)
- {
- if (_delegates != null) {
- int dcount = _delegates.size();
- for (int i = 0; i < dcount; i++) {
- op.apply(_delegates.get(i));
- }
- }
- }
-
/** Listens for occupant updates. */
protected SetAdapter _bodyUpdater = new SetAdapter() {
public void entryUpdated (EntryUpdatedEvent event) {