FileDocCategorySizeDatePackage
Counter.javaAPI DocApache James 2.3.12027Fri Jan 12 12:56:30 GMT 2007org.apache.james.transport.mailets.debug

Counter

public class Counter extends org.apache.mailet.GenericMailet
A simple in memory counter. Designed to count messages sent to this recipient for debugging purposes.

Fields Summary
int
counter
The number of mails processed by this mailet
Constructors Summary
Methods Summary
public java.lang.StringgetMailetInfo()
Return a string describing this mailet.

return
a string describing this mailet

        return "Counter Mailet";
    
public voidservice(org.apache.mailet.Mail mail)
Count processed mails, marking each mail as completed after counting.

param
mail the mail to process


                         
        
        counter++;
        log(counter + "");
        mail.setState(Mail.GHOST);