PlaceManagerDelegate no longer takes its target manager in its constructor but

rather is configured with it when added to the manager as a delegate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4868 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-11-10 04:41:01 +00:00
parent baa664bd11
commit abeeef4d10
2 changed files with 12 additions and 13 deletions
@@ -194,6 +194,7 @@ public class PlaceManager
if (_delegates == null) {
_delegates = new ArrayList<PlaceManagerDelegate>();
}
delegate.setPlaceManager(this);
_delegates.add(delegate);
}
@@ -26,24 +26,22 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.crowd.data.PlaceObject;
/**
* Provides an extensible mechanism for encapsulating delegated
* functionality that works with the place services.
* Provides an extensible mechanism for encapsulating delegated functionality that works with the
* place services.
*
* <p> Thanks to Java's lack of multiple inheritance, it will likely
* become necessary to factor certain services that might be used by a
* variety of {@link PlaceManager} derived classes into delegate classes
* because they do not fit into the single inheritance hierarchy that
* makes sense for a particular application. To facilitate this process,
* this delegate class is provided which the standard place manager can be
* made to call out to for all of the standard methods.
* <p> Thanks to Java's lack of multiple inheritance, it will likely become necessary to factor
* certain services that might be used by a variety of {@link PlaceManager} derived classes into
* delegate classes because they do not fit into the single inheritance hierarchy that makes sense
* for a particular application. To facilitate this process, this delegate class is provided which
* the standard place manager can be made to call out to for all of the standard methods.
*/
public class PlaceManagerDelegate
{
/**
* Provides the delegate with a reference to the manager for which it
* is delegating.
* Called by the place manager when this delegate is registered with it. This will happen
* before any calls to {@link #didInit}, etc.
*/
public PlaceManagerDelegate (PlaceManager plmgr)
public void setPlaceManager (PlaceManager plmgr)
{
_plmgr = plmgr;
}
@@ -98,7 +96,7 @@ public class PlaceManagerDelegate
}
/**
* Invokes {PlaceManager#where}.
* Invokes {@link PlaceManager#where}.
*/
public String where ()
{