org.jdesktop.wonderland.server.security
Interface Resource


public interface Resource

A resource that may have protected access.

Author:
jkaplan

Nested Class Summary
static class Resource.Result
          the result of a resource access query
 
Method Summary
 java.lang.String getId()
          Get the unique identifier for this resource
 Resource.Result request(WonderlandIdentity identity, Action action)
          Determine if the given identity can access the given action for this resource.
 boolean request(WonderlandIdentity identity, Action action, com.sun.sgs.kernel.ComponentRegistry registry)
          Determune if the given identity can access the given action for this resource.
 

Method Detail

getId

java.lang.String getId()
Get the unique identifier for this resource

Returns:
a unique identifier for the resource. The identifier should be unique across all resources in the server.

request

Resource.Result request(WonderlandIdentity identity,
                        Action action)
Determine if the given identity can access the given action for this resource. This method must be called within a transaction.

Parameters:
identity - the identity requesting access
action - the action
Returns:
the result of processing, either grant, deny or schedule

request

boolean request(WonderlandIdentity identity,
                Action action,
                com.sun.sgs.kernel.ComponentRegistry registry)
Determune if the given identity can access the given action for this resource. This method is never called in a transaction. It should block until a result can be determined.

Parameters:
identity - the identity requesting access
action - the action
registry - the component registry used by this service
Returns:
true if access is granted, or false if not


Open Wonderland - http://openwonderland.org