Broke out speak handler creation so that we can customize it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5812 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -261,8 +261,7 @@ public class PlaceManager
|
|||||||
// we usually want to create and register a speaker service instance that clients can use
|
// we usually want to create and register a speaker service instance that clients can use
|
||||||
// to speak in this place
|
// to speak in this place
|
||||||
if (shouldCreateSpeakService()) {
|
if (shouldCreateSpeakService()) {
|
||||||
plobj.setSpeakService(
|
plobj.setSpeakService(addDispatcher(new SpeakDispatcher(createSpeakHandler(plobj))));
|
||||||
addDispatcher(new SpeakDispatcher(new SpeakHandler(plobj, this))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we'll need to hear about place object events
|
// we'll need to hear about place object events
|
||||||
@@ -726,6 +725,15 @@ public class PlaceManager
|
|||||||
buf.append(", config=").append(_config);
|
buf.append(", config=").append(_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the speak handler for this place. Derived classes can customize the speak handler if
|
||||||
|
* they so desire.
|
||||||
|
*/
|
||||||
|
protected SpeakHandler createSpeakHandler (PlaceObject plobj)
|
||||||
|
{
|
||||||
|
return new SpeakHandler(plobj, this);
|
||||||
|
}
|
||||||
|
|
||||||
/** Listens for occupant updates. */
|
/** Listens for occupant updates. */
|
||||||
protected SetAdapter<OccupantInfo> _bodyUpdater =
|
protected SetAdapter<OccupantInfo> _bodyUpdater =
|
||||||
new NamedSetAdapter<OccupantInfo>(PlaceObject.OCCUPANT_INFO) {
|
new NamedSetAdapter<OccupantInfo>(PlaceObject.OCCUPANT_INFO) {
|
||||||
|
|||||||
Reference in New Issue
Block a user