uk.ac.soton.itinnovation.grid.pbac2.pep
Class AxisDynamicPEP<T>

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.pbac2.pep.DynamicPEP<T>
      extended by uk.ac.soton.itinnovation.grid.pbac2.pep.AxisDynamicPEP<T>
All Implemented Interfaces:
InvocationHandler

public final class AxisDynamicPEP<T>
extends DynamicPEP<T>

This class creates a proxy object that wraps an object with a PEP. It also sets values in the Axis MessageContext when doing an invocation.


Field Summary
 
Fields inherited from class uk.ac.soton.itinnovation.grid.pbac2.pep.DynamicPEP
original, resource, subject
 
Method Summary
static
<T> T
dynamicPEP(Class<T> iface)
          Create a proxy for 'iface', where all public methods are PEP-wrapped.
static
<T> T
dynamicPEP(Class<T> iface, T impl, String resource, SubjectDescription subject)
          Create a proxy for 'iface', where all public methods are PEP-wrapped.
static void ensureMessageContext()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class uk.ac.soton.itinnovation.grid.pbac2.pep.DynamicPEP
dynamicPEP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

dynamicPEP

public static <T> T dynamicPEP(Class<T> iface)
Create a proxy for 'iface', where all public methods are PEP-wrapped.

Parameters:
iface - the interface of the service to test (see ImplementationFactory)
Returns:
an implementation of the interface that checks each access with the PDP

dynamicPEP

public static <T> T dynamicPEP(Class<T> iface,
                               T impl,
                               String resource,
                               SubjectDescription subject)
Create a proxy for 'iface', where all public methods are PEP-wrapped. Note: use of null for resource or subject is deprecated.

Parameters:
iface - the interface of the object to wrap
impl - an implementation of iface, or null to get one using the ImplementationFactory
resource - the PBAC resource being protected, or null to use ProcessContextHelper.getProcessContext()
subject - the user accessing the resource, or null to use AuthenticatedContextHelper.getCurrentUser()
Returns:
an implementation of the interface that checks each access with the PDP

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Overrides:
invoke in class DynamicPEP<T>
Throws:
Throwable

ensureMessageContext

public static void ensureMessageContext()


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.