Interface Specification for ContentProviderAPI


[Contents] [Prev] [Next]
Table of Contents

Overview

ContentProviderAPI is a service interface which can be provided to the ContentRegistrar interface. It is used to allow KPs to provide Web content through a properly configured Web server.

Objects

This interface defines the following object types:

Environment
This is an alias for the Mapping.StringMap objects.

ContentProvider
The object provided by KPs which provide Web content.

ContentProvider Objects

GetContent (url : String, env : Environment, fp : FileAPI.File)
Method called by the bridge between the Web server and the KOE. The url is the portion of the requested URL including the registered name of the content provider. For example, if the bridge between the Web server and the KOE is http://www.foo.org/cgi-bin/koe, the content provider is registered as 'frob', and a request arrives for http://www.foo.org/cgi-bin/koe/frob/nitz, the url parameter takes the value '/frob/nitz'. env represents the environment of the CGI script that implements the bridge, with some variables removed to protect the security of the server (and which are non-sensical if the Web server and the KOS are running on different hosts, which is entirely possible). fp is a read/write file interface. It allows the implementation of the GetContent() method to read form data and write the results of the request back to the server. Data passed in and out should match the forms expected from CGI programs.

Table of Contents

[Contents] [Prev] [Next]
Copyright © 1998 by the Corporation for National Research Initiatives.