PEP Extensions
Examples
Types
For network security reasons,
it may be usefull to categorize extensions according to their purpose and
allowed actions.
-
Stream - extensions that operate on a data stream without
providing their own message body.
-
Encoder - a stream that renders its data for downstream extensions, presenters,
or agents. Most encoders will be occlusive
or ordered. The output from one will affect downstream encoders. Non-occlusive
encoders depend on the medium being transmitted, for example in HTML, one
could have a tag encoder and a text language translater that could be run
in either order as they would opperate on seperate parts of the body.
-
Extender - a stream that enhances the data stream given read access to system
resources. An example would be an extension that performed server-side includes
or executed some embedded code.
-
Resource - extensions that provide a message body or perform a terminal action
on the transmitted body. The client should allow only one of these.
-
Presenter - display data for browser.
-
Moderator - Orders other extensions. May be an encoders, like EscapeBody/SumBody
or a more complicated extension that produces a cohesive product from a
combination resource extensions, for example, a mix and match from generator.
These may be coded eiather by
-
assuming the roles of the moderated extensions
-
hiding the headers from the moderated extensions and generating the calls
to the extensions on its own, see
EncoderDispatcher.
Reasons
There are different reasons an extension may be called to
map itself into a message or supply
meta information about itself. The most
common of these are likely to be:
-
Always - an extension that is always called. These must determine for themselves
whether to ap themselves.
-
URLTree - an extension that is associated with accessing a specific resource
or set of resources. These may lie on the local file system, as on a server,
or in URL space, as with a client.
Other protocols may be invoked for many reasons. For instance, the server
may elect to map a resource because of the state of some system resources.
It is unlikely that the standard
interface will able to support dynamic
loading of these, so they would only be using the
mapping collision advantages
of PEP.
Downloading
PEPExtensions may be downloaded:
-
Directly from the site listed in the URL.
-
From an independent clearinghouse.
-
Directly from agent who requests its use. This creates the most complex security
scenario, but is also the most efficient use of a persistent connection.
Locating the extension
PEP extensions are uniquely identified by the
URI. PEPsample extensions
may be located by inserting "PEPsample" after the last segment of
the URI. For instance, a description of the compressions simulation
http://www.w3.org/PEP/extensions/EscapeBody could be located by
requesting that URL. The PEPsample implementations of that extension are
located in the directory
http://www.w3.org/PEP/extensions/EscapeBody/PEPsample/. The PEPAgent
downloads the classes for its role, for example, the PEPClient will download
the class http://www.w3.org/PEP/extensions/EscapeBody/Client.class.
Associated classes
Most extensions will have at least an instance class in addition to seperate
classes for the client, proxy, and server. during downloading, the
URLClassLoader calls
java.lang.ClassLoader.resolveClass. This insures that any other
classes associated with the extension will be downloaded too. These classes
may be located anywhere underneath the extensions directory. For instance,
http://www.w3.org/PEP/extensions/EscapeBody/Client.class may make
a reference to
http://www.w3.org/PEP/extensions/Escape/EscapeStream.class.
Eric Prud'hommeaux,
eric@w3.org,
@(#) $Id: Overview.html,v 1.2 1997/08/03 00:39:03 eric Exp $