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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user