Added support for clearing out dispatcher registrations.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1724 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-09-20 04:52:49 +00:00
parent bb0ae9e187
commit 775246906b
2 changed files with 23 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: InvocationMarshaller.java,v 1.1 2002/08/14 19:07:55 mdb Exp $
// $Id: InvocationMarshaller.java,v 1.2 2002/09/20 04:52:49 mdb Exp $
package com.threerings.presents.data;
@@ -107,6 +107,14 @@ public class InvocationMarshaller
_invOid = invOid;
}
/**
* Returns the code assigned to this marshaller.
*/
public int getInvocationCode ()
{
return _invCode;
}
/**
* Called by generated invocation marshaller code; packages up and
* sends the specified invocation service request.
@@ -1,5 +1,5 @@
//
// $Id: InvocationManager.java,v 1.13 2002/09/06 01:49:23 mdb Exp $
// $Id: InvocationManager.java,v 1.14 2002/09/20 04:52:49 mdb Exp $
package com.threerings.presents.server;
@@ -112,6 +112,19 @@ public class InvocationManager
return marsh;
}
/**
* Clears out a dispatcher registration. This should be called to free
* up resources when an invocation service is no longer going to be
* used.
*/
public void clearDispatcher (InvocationMarshaller marsh)
{
if (_dispatchers.remove(marsh.getInvocationCode()) == null) {
Log.warning("Requested to remove unregistered marshaller? " +
"[marsh=" + marsh + "].");
}
}
public void objectAvailable (DObject object)
{
// this must be our invocation object