Added a mechanism for pluggable event access control.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1135 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-03-20 03:19:51 +00:00
parent 59aeb61fe3
commit aa195bed83
3 changed files with 75 additions and 12 deletions
@@ -0,0 +1,25 @@
//
// $Id: AccessController.java,v 1.1 2002/03/20 03:19:51 mdb Exp $
package com.threerings.presents.dobj;
/**
* Used to validate distributed object subscription requests and event
* dispatches.
*
* @see DObject#setAccessController
*/
public interface AccessController
{
/**
* Should return true if the supplied subscriber is allowed to
* subscribe to the specified object.
*/
public boolean allowSubscribe (DObject object, Subscriber subscriber);
/**
* Should return true if the supplied event is legal for dispatch on
* the specified distributed object.
*/
public boolean allowDispatch (DObject object, DEvent event);
}