![]() |
Pluglet Developers GuidePluglet OverviewBasicsThis section defines what Pluglets are , provides a broad overview of how Pluglets work from a Pluglet developer perspective, and briefly describes the three interfaces that a developer must implement. Pluglet DefinitionA Pluglet is a Mozilla Plugin written in Java using the Pluglet API. Using the Java Native Interface (JNI), the Pluglet API mimics the new C++ Plugin API of Mozilla. For more information about Mozilla Plugins, see http://www.mozilla.org/docs/plugin.html. (If you are new to Plugins, you may want to refer to the old Netscape Plug-in Guide at http://developer.netscape.com/docs/manuals/communicator/plugin/index.htm). It is a good resource for understanding Plugin fundamentals.) How Pluglets WorkFirst, a Pluglet developer implements the three interfaces listed below and writes related manifest files. A manifest file contains a list of supported MIME types. (For more information on MIME types and manifest files, see MIME types above.) When a MIME type is first encountered by the Mozilla browser,
it checks to see that there is a native Plugin for it. If there is not, it looks
for a Pluglet that handles the MIME type. It does this through
Types of InterfacesThese interfaces are described in general in the sections below, and in detail
in the API index. Note that when Pluglet is built and
the implementations of these interfaces are compiled, they are placed in a When If a Pluglet is found that can handle the MIME type, the browser creates an
instance of Once an instance of Note that for a Pluglet bundle there will be only a single instance of
Pluglets, like Plugins, can be invoked in various ways. They may be embedded
in an HTML page via an When a Pluglet is embedded in a page with an Other interfaces that the Pluglet developer should know about, and that have
been implemented to make Pluglets work, are the following: For a general description of each, read the overview for each in the API index. To create a Pluglet, the developer must implement the following three interfaces. The browser typically passes the MIME type to the When the browser is done with the Once an instance of The If the Pluglet involves a data stream, when the data stream is ready the browser
calls The browser uses the The
STREAM_TYPE_NORMAL - STREAM_TYPE_SEEK - STREAM_TYPE_AS_FILE or- STREAM_TYPE_AS_FILE_ONLY onStartBinding() is used for notification that a URL has started
to load.
onDataAvailable() is used for notification that data is available
on the input stream.
onFileAvailable() is used for notification that a local file name
is available and for passing the file name.
onStopBinding() is used for notification that a URL has stopped
binding, and it passes status information about the success or failure of the
load.
Blackwood Release 0.9/Netscape PR3 Last modified 2/05/2001
|
|