Project JXTA

net.jxta.access
Interface AccessService

All Superinterfaces:
Module, Service

public interface AccessService
extends Service

The Access Service is used by JXTA Applications and Services to determine if specific operations are permitted for a particular identity.

Each Access Service implementation provides a mechanism for determining if, for a given operation and identity, the operation is permitted.


Nested Class Summary
static class AccessService.AccessResult
          The result of an access check.
 
Field Summary
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Method Summary
 AccessService.AccessResult doAccessCheck(PrivilegedOperation op, Credential cred)
          Determine if a priviledged operation is permitted for a given identitiy.
 PrivilegedOperation newPrivilegedOperation(Element source)
          Read a priviledged operation from a portion of a structured document.
 PrivilegedOperation newPrivilegedOperation(Object subject, Credential offerer)
          Create a new priviledged operation with the specified subject.
 
Methods inherited from interface net.jxta.service.Service
getImplAdvertisement, getInterface
 
Methods inherited from interface net.jxta.platform.Module
init, startApp, stopApp
 

Method Detail

doAccessCheck

public AccessService.AccessResult doAccessCheck(PrivilegedOperation op,
                                                Credential cred)
Determine if a priviledged operation is permitted for a given identitiy.

Parameters:
op - the operation which is being requested.
cred - the identity which is requesting.
Returns:
the result of the access check.

newPrivilegedOperation

public PrivilegedOperation newPrivilegedOperation(Object subject,
                                                  Credential offerer)
Create a new priviledged operation with the specified subject. Each operation is also associated with an identity, the offerer. Generally the priviledged operation is cryptographically signed by the offerer.

Parameters:
subject - The subject of the operation. This usually identifies what operation is being requested.
offerer - The identity which is offering the operation.
Returns:
The priviledged operation object
See Also:
Credential

newPrivilegedOperation

public PrivilegedOperation newPrivilegedOperation(Element source)
Read a priviledged operation from a portion of a structured document.

Parameters:
source - The root of the document portion containing the serialized representation of the priviledged operation.
Returns:
The priviledged operation object.

JXTA J2SE