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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user