net.jini.jeri
Class ProxyTrustILFactory

java.lang.Object
  extended by net.jini.jeri.AbstractILFactory
      extended by net.jini.jeri.BasicILFactory
          extended by net.jini.jeri.ProxyTrustILFactory
All Implemented Interfaces:
InvocationLayerFactory
Direct Known Subclasses:
SystemAccessProxyTrustILFactory

public class ProxyTrustILFactory
extends BasicILFactory

Invocation layer factory for remote objects exported to use Jini extensible remote invocation (Jini ERI) that produces proxies that additionally implement the ProxyTrust interface. The remote object being exported must be an instance of ServerProxyTrust, and the ProxyTrust.getProxyVerifier remote method of the proxy is implemented in the invocation dispatcher by invoking the ServerProxyTrust.getProxyVerifier local method of the remote object.

Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
ProxyTrustExporter

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.jini.jeri.InvocationLayerFactory
InvocationLayerFactory.Instances
 
Constructor Summary
ProxyTrustILFactory(MethodConstraints serverConstraints, Class permissionClass)
          Creates a factory with the specified server constraints, permission class, and a null class loader.
ProxyTrustILFactory(MethodConstraints serverConstraints, Class permissionClass, ClassLoader loader)
          Creates a factory with the specified server constraints, permission class, and class loader.
 
Method Summary
protected  Class[] getRemoteInterfaces(Remote impl)
          Returns a new array containing the remote interfaces that should be implemented by the proxy.
 
Methods inherited from class net.jini.jeri.BasicILFactory
createInvocationDispatcher, createInvocationHandler, equals, getExtraProxyInterfaces, getPermissionClass, getServerConstraints, hashCode, toString
 
Methods inherited from class net.jini.jeri.AbstractILFactory
createInstances, getClassLoader, getInvocationDispatcherMethods, getProxyInterfaces
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyTrustILFactory

public ProxyTrustILFactory(MethodConstraints serverConstraints,
                           Class permissionClass)
Creates a factory with the specified server constraints, permission class, and a null class loader. The server constraints, if not null, are used to enforce minimum constraints for remote calls. The permission class, if not null, is used to perform server-side access control on incoming remote calls.

Parameters:
serverConstraints - the server constraints, or null
permissionClass - the permission class, or null
Throws:
IllegalArgumentException - if the permission class is abstract, is not a subclass of Permission, or does not have a public constructor that has either one String parameter or one Method parameter and has no declared exceptions

ProxyTrustILFactory

public ProxyTrustILFactory(MethodConstraints serverConstraints,
                           Class permissionClass,
                           ClassLoader loader)
Creates a factory with the specified server constraints, permission class, and class loader. The server constraints, if not null, are used to enforce minimum constraints for remote calls. The permission class, if not null, is used to perform server-side access control on incoming remote calls. The specified loader is passed to the superclass constructor and used by the createInstances method.

Parameters:
serverConstraints - the server constraints, or null
permissionClass - the permission class, or null
loader - the class loader, or null
Throws:
IllegalArgumentException - if the permission class is abstract, is not a subclass of Permission, or does not have a public constructor that has either one String parameter or one Method parameter and has no declared exceptions
Method Detail

getRemoteInterfaces

protected Class[] getRemoteInterfaces(Remote impl)
                               throws ExportException
Returns a new array containing the remote interfaces that should be implemented by the proxy.

ProxyTrustILFactory implements this method to return an array containing the interfaces obtained by invoking super.getRemoteInterfaces passing impl followed by the ProxyTrust interface.

Overrides:
getRemoteInterfaces in class AbstractILFactory
Parameters:
impl - the remote object
Returns:
the remote interfaces implemented by impl
Throws:
NullPointerException - if impl is null
ExportException - if the remote object is not an instance of ServerProxyTrust or implements any illegal remote interfaces


Copyright 2007, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.