The ChatDirector requires a MessageManager, so let's promote that to a real
CrowdContext service instead of sneaking it into the ChatDirector's constructor. That way other CrowdContext users can make use of the MessageManager as well. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6192 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -157,7 +157,7 @@ public class JabberClient
|
||||
_locdir = new LocationDirector(_ctx);
|
||||
_occdir = new OccupantDirector(_ctx);
|
||||
_msgmgr = new MessageManager(MESSAGE_MANAGER_PREFIX);
|
||||
_chatdir = new ChatDirector(_ctx, _msgmgr, null);
|
||||
_chatdir = new ChatDirector(_ctx, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,6 +206,11 @@ public class JabberClient
|
||||
return _chatdir;
|
||||
}
|
||||
|
||||
public MessageManager getMessageManager ()
|
||||
{
|
||||
return _msgmgr;
|
||||
}
|
||||
|
||||
public void setPlaceView (PlaceView view)
|
||||
{
|
||||
JPanel panel = (JPanel)view;
|
||||
|
||||
@@ -49,7 +49,8 @@ public class TestClient
|
||||
_client = new Client(new UsernamePasswordCreds(new Name(username), "test"), _rqueue);
|
||||
_locdir = new LocationDirector(_ctx);
|
||||
_occdir = new OccupantDirector(_ctx);
|
||||
_chatdir = new ChatDirector(_ctx, new MessageManager("rsrc"), "global");
|
||||
_msgmgr = new MessageManager("rsrc");
|
||||
_chatdir = new ChatDirector(_ctx, "global");
|
||||
|
||||
// we want to know about logon/logoff
|
||||
_client.addClientObserver(this);
|
||||
@@ -157,6 +158,11 @@ public class TestClient
|
||||
return _chatdir;
|
||||
}
|
||||
|
||||
public MessageManager getMessageManager ()
|
||||
{
|
||||
return _msgmgr;
|
||||
}
|
||||
|
||||
public void setPlaceView (PlaceView view)
|
||||
{
|
||||
// nothing to do because we don't create views
|
||||
@@ -173,6 +179,7 @@ public class TestClient
|
||||
|
||||
protected LocationDirector _locdir;
|
||||
protected OccupantDirector _occdir;
|
||||
protected MessageManager _msgmgr;
|
||||
protected ChatDirector _chatdir;
|
||||
|
||||
protected BasicRunQueue _rqueue = new BasicRunQueue();
|
||||
|
||||
Reference in New Issue
Block a user