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