Dear Wiki user,

You have subscribed to a wiki page or wiki category on "James Wiki" for change 
notification.

The following page has been changed by AndrewCOliver:
http://wiki.apache.org/james/ProposedMailetSpec

The comment on the change is:
first start

New page:
= Mailet Proposal Specification =

== Introduction ==

This draft specification is for the proposed inter-container mailet 
specification.  It is a work in progress.  The specification describes the 
contract between Mailets and Mailet containers.

== Definitions ==
 
 1. Mailet - a Java object which is annotated with 
@org.apache.mailet.annotations.Mailet and complies with the "MailetContract" 
specified below.
 1. Service - a service provided by the mailet container that may be injected 
into the mailet.
 1. Specification Service - a service whose contract is defined in this 
specification
 1. User-provided Service - a service whose contract is not specified in this 
specification
 1. Mailet Attribute - an injected value.  

== Non-technical Goals ==

 1. Create a "marketplace" for mailets similar to that which exists for Java 
Portlets

== Technical Goals ==

 1. Create a set of annotations and interfaces for use by mailet authors and 
container implementors
 1. Create a set of contracts by which compliant containers and mailets can 
maintain compatibility

== Design Principles ==

 1. JavaAnnotations are favored over interfaces for mailets
 1. JavaInterfaces are favored over annotations for Specification Services.
 1. Injection is preferred over "pull" APIs
 1. Underlying structures for Mail objects should be masked for compatibility
 1. Deployment and packaging should be seperate from configuration

== Mailet User Contract ==

 1. Mailets must use JavaBeans method naming conventions
 1. Mailets must expose an interface and a class
 1. Mailet classes may expose 1 or more public constructors which may only take 
JavaPrimitive type parameters or none at all.
 1. Mailet interfaces must define 1 service method which returns a Mail object 
and takes a Mail object (NOTE: revise this)
 1. Mailet classes may implement their interface
 1. Mailet classes must implement all attributes, and the service method 
defined in their associated interface
 1. Mailet interfaces must be annotated with org.apache.mailet.annotation.Mailet
 1. Attributes must be annotated with org.apache.mailet.annotation.Attribute
 1. Constructors must be annotated with org.apache.mailet.annotation.Constructor
 1. The service method must be annotated with 
org.apache.mailet.annotation.Service

Reply via email to