Forgot to commit the RegistrationService implementation on Saturday

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6275 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Charlie Groves
2010-11-16 22:53:45 +00:00
parent 147b94b5de
commit 890cc0bdc1
@@ -0,0 +1,19 @@
package com.threerings.presents.server;
import com.threerings.presents.client.InvocationReceiver.Registration;
import com.threerings.presents.data.ClientObject;
/**
* Adds receiver registrations for a client. Must be added to an invocation dispatcher to be used.
*/
public class RegistrationManager implements RegistrationProvider
{
public void registerReceiver (ClientObject caller, Registration reg)
{
if (caller.receivers.containsKey(reg.getKey())) {
caller.updateReceivers(reg);
} else {
caller.addToReceivers(reg);
}
}
}