Inject the ChatProvider as well.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5159 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-06-08 10:10:41 +00:00
parent 3404d14e7b
commit a531fd2196
2 changed files with 15 additions and 21 deletions
@@ -23,6 +23,8 @@ package com.threerings.crowd.chat.server;
import java.util.Iterator;
import com.google.inject.Inject;
import com.samskivert.util.StringUtil;
import com.threerings.util.MessageBundle;
import com.threerings.util.Name;
@@ -80,6 +82,15 @@ public class ChatProvider
public void forwardBroadcast (Name from, String bundle, String msg, boolean attention);
}
/**
* Creates and registers this chat provider.
*/
@Inject public ChatProvider (InvocationManager invmgr)
{
// register a chat provider with the invocation manager
invmgr.registerDispatcher(new ChatDispatcher(this), CrowdCodes.CROWD_GROUP);
}
/**
* Set an object to which all broadcasts should be sent, rather than iterating over the place
* objects and sending to each of them.
@@ -112,15 +123,6 @@ public class ChatProvider
_chatForwarder = forwarder;
}
/**
* Initializes the chat services and registers a chat provider with the invocation manager.
*/
public void init (InvocationManager invmgr, DObjectManager omgr)
{
// register a chat provider with the invocation manager
invmgr.registerDispatcher(new ChatDispatcher(this), CrowdCodes.CROWD_GROUP);
}
/**
* Processes a request from a client to deliver a tell message to another client.
*/