Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml
Class PDP  view PDP download PDP.java

java.lang.Object
  extended bycom.sun.xacml.PDP

public class PDP
extends java.lang.Object

This is the core class for the XACML engine, providing the starting point for request evaluation. To build an XACML policy engine, you start by instantiating this object.

Since:
1.0

Field Summary
private  com.sun.xacml.finder.AttributeFinder attributeFinder
           
private static java.util.logging.Logger logger
           
private  com.sun.xacml.finder.PolicyFinder policyFinder
           
private  com.sun.xacml.finder.ResourceFinder resourceFinder
           
 
Constructor Summary
PDP(PDPConfig config)
          Constructs a new PDP object with the given configuration information.
 
Method Summary
 com.sun.xacml.ctx.ResponseCtx evaluate(EvaluationCtx context)
          Uses the given EvaluationCtx against the available policies to determine a response.
 java.io.OutputStream evaluate(java.io.InputStream input)
          Deprecated. As of 1.2 this method should not be used. Instead, you should do your own stream handling, and then use one of the other evaluate methods. The problem with this method is that it often doesn't handle stream termination correctly (eg, with sockets).
 com.sun.xacml.ctx.ResponseCtx evaluate(com.sun.xacml.ctx.RequestCtx request)
          Attempts to evaluate the request against the policies known to this PDP.
private  com.sun.xacml.ctx.Result evaluateContext(EvaluationCtx context)
          A private helper routine that resolves a policy for the given context, and then tries to evaluate based on the policy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeFinder

private com.sun.xacml.finder.AttributeFinder attributeFinder

policyFinder

private com.sun.xacml.finder.PolicyFinder policyFinder

resourceFinder

private com.sun.xacml.finder.ResourceFinder resourceFinder

logger

private static final java.util.logging.Logger logger
Constructor Detail

PDP

public PDP(PDPConfig config)
Constructs a new PDP object with the given configuration information.

Method Detail

evaluate

public com.sun.xacml.ctx.ResponseCtx evaluate(com.sun.xacml.ctx.RequestCtx request)
Attempts to evaluate the request against the policies known to this PDP. This is really the core method of the entire XACML specification, and for most people will provide what you want. If you need any special handling, you should look at the version of this method that takes an EvaluationCtx.

Note that if the request is somehow invalid (it was missing a required attribute, it was using an unsupported scope, etc), then the result will be a decision of INDETERMINATE.


evaluate

public com.sun.xacml.ctx.ResponseCtx evaluate(EvaluationCtx context)
Uses the given EvaluationCtx against the available policies to determine a response. If you are starting with a standard XACML Request, then you should use the version of this method that takes a RequestCtx. This method should be used only if you have a real need to directly construct an evaluation context (or if you need to use an EvaluationCtx implementation other than BasicEvaluationCtx).


evaluateContext

private com.sun.xacml.ctx.Result evaluateContext(EvaluationCtx context)
A private helper routine that resolves a policy for the given context, and then tries to evaluate based on the policy


evaluate

public java.io.OutputStream evaluate(java.io.InputStream input)
Deprecated. As of 1.2 this method should not be used. Instead, you should do your own stream handling, and then use one of the other evaluate methods. The problem with this method is that it often doesn't handle stream termination correctly (eg, with sockets).

A utility method that wraps the functionality of the other evaluate method with input and output streams. This is useful if you've got a PDP that is taking inputs from some stream and is returning responses through the same stream system. If the Request is invalid, then this will always return a decision of INDETERMINATE.