edu.ucsb.adl.middleware
Interface ReferenceServiceGatekeeper

All Known Implementing Classes:
BasicPasswordGatekeeper, CombinationGatekeeper, ConstantGatekeeper, IPAddressGatekeeper

public interface ReferenceServiceGatekeeper

The interface between the ADL reference service and the gatekeeper that controls access to the service. The ADL reference service creates the gatekeeper by dynamically loading the gatekeeper class and calling the following class method:

public static ReferenceServiceGatekeeper createGatekeeper (
    ExtendedProperties propertyList, String argument)
Gatekeeper startup parameters can be obtained from propertyList. argument is an additional, gatekeeper-specific startup parameter.

Version:
$Header: /export/home/gjanee/middleware/edu/ucsb/adl/middleware/RCS/ReferenceServiceGatekeeper.java,v 1.3 2004/09/21 18:22:27 gjanee Exp $

$Log: ReferenceServiceGatekeeper.java,v $ Revision 1.3 2004/09/21 18:22:27 gjanee
Minor documentation change.

Revision 1.2 2001/09/05 04:00:23 gjanee
Changed the type of the baseUrl argument of method referenceServiceAllowed from URL to String to support the rmi pseudo-protocol.

Revision 1.1 2001/09/04 17:20:56 gjanee
Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
 void destroy()
          Frees any resources held by the gatekeeper.
 boolean referenceServiceAllowed(javax.servlet.ServletRequest request, java.lang.String baseUrl, java.lang.String collection)
          Returns true if the request is authorized, that is, if the client is allowed to reference the specified remote collection.
 

Method Detail

referenceServiceAllowed

public boolean referenceServiceAllowed(javax.servlet.ServletRequest request,
                                       java.lang.String baseUrl,
                                       java.lang.String collection)
                                throws MiddlewareException
Returns true if the request is authorized, that is, if the client is allowed to reference the specified remote collection. This method must be multithread-safe.

Parameters:
request - The full request.
baseUrl - The remote middleware server's base URL, e.g., "rmi://host.com/edu/ucsb/adl/middleware/" or "http://host.com/servlet/".
collection - The remote collection name, e.g., "adl_catalog".
Returns:
true if the request is authorized.
Throws:
BadRequestException - If any of the arguments is invalid.
InternalErrorException - If the authorization cannot otherwise be determined.
MiddlewareException
See Also:
ReferenceService

destroy

public void destroy()
Frees any resources held by the gatekeeper.