You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mailet-api@james.apache.org by rd...@apache.org on 2008/08/31 18:31:44 UTC

svn commit: r690722 - /james/mailet/api/trunk/src/site/xdoc/index.xml

Author: rdonkin
Date: Sun Aug 31 09:31:44 2008
New Revision: 690722

URL: http://svn.apache.org/viewvc?rev=690722&view=rev
Log:
Added content to site

Modified:
    james/mailet/api/trunk/src/site/xdoc/index.xml

Modified: james/mailet/api/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/james/mailet/api/trunk/src/site/xdoc/index.xml?rev=690722&r1=690721&r2=690722&view=diff
==============================================================================
--- james/mailet/api/trunk/src/site/xdoc/index.xml (original)
+++ james/mailet/api/trunk/src/site/xdoc/index.xml Sun Aug 31 09:31:44 2008
@@ -36,11 +36,61 @@
 welcomed on the <a href='mail-lists.html'>mailing lists</a>.
 </p>
 </section>
-<section name="Getting Started">
-<p>Until these pages are fleshed out, the best way to understand the API is to read the 
-<a href='apidocs/index.html'>Javadocs</a> 
-and look at the <a href='xref/index.html'>source code</a>. 
+<section name="Quick Start">
+<subsection name='What Is A Mailet?'>
+<p>
+A mailet is a mail processing component. Though there are some differences, a servlet as a HTTP processing 
+component is a useful analogy.
+</p><p>
+Mailets implement 
+<a href='/apidocs/org/apache/mailet/Mailet.html'>
+Mailet</a>.
+Mailets execute within a mailet container.
+<a href='http://james.apache.org/server'>JAMES server</a> is a well known mailet container.
+Assembly and configuration of mailets and mail processors is the responsibility of the particular 
+container.
+</p>
+<subsection name='Mailet Basic Lifecycle'>
+<p>
+Mailets have a simple lifecycle managed by the mailet container:
+</p>
+<ol>
+<li><strong><code>init(<a href='apidocs/org/apache/mailet/MailetConfig.html'>MailetConfig</a> config)</code></strong> passes 
+environmental information. Any setup necessary should be performed now.</li>
+<li>During processing, <strong><code>service(<a href='apidocs/org/apache/mailet/Mail.html'>Mail</a> mail)</code></strong> is called
+repeatedly. Note that this method may be called concurrently.</li>
+<li><strong><code>destroy()</code></strong> is called when the mailet is taken
+out of service.</li>
+</ol>
+</subsection>
+<subsection name='Configuration'>
+<p>
+<a href='apidocs/org/apache/mailet/MailetConfig.html'>MailetConfig</a> gives access to simple parameterization.
+<code>getInitParameter</code> allows configuration parameters to be passed from the mailet container.
+How these parameters are set by the user of the mailet is the responsibility of the container.
+More sophisticated configuration and assembly (for example, allowing access to services) is also the 
+responsibility of the container.
+</p>
+</subsection>
+<subsection name='Communication With The Container'>
+<p>
+<a href='apidocs/org/apache/mailet/MailetConfig.html'>MailetConfig</a> allows communication with the container
+by calling getMailetContext(). See <a href='apidocs/org/apache/mailet/MailetContext.html'>MailetContext</a> 
+for more details.
 </p>
+</subsection>
+<subsection name='Basic Toolkit'>
+<p>
+The <a href='http://james.apache.org/mailet/base'>Basic Mailet Toolkit</a> collects lightweight frameworks
+and utilities likely to be useful for general mailet developers.
+</p>
+</subsection>
+</subsection>
+<subsection name='Examples'>
+<p>
+See <a href='http://james.apache.org/mailet/standard'>Standard mailets</a>.
+</p>
+</subsection>
 <subsection name='Building the Mailet API'>
 <p>
 The build uses <a href='http://ant.apache.org'>Ant</a>. <code>ant -projecthelp</code>