org.apache.james.transport.mailets.listservcommands
Class ErrorCommand
java.lang.Object
org.apache.james.transport.mailets.listservcommands.BaseCommand
org.apache.james.transport.mailets.listservcommands.ErrorCommand
- All Implemented Interfaces:
- IListServCommand
public class ErrorCommand
- extends BaseCommand
Error handles the error command.
It is configured by:
<command name="error" class="ErrorCommand"/>
It uses the formatted text-based resources for its return mail body:
- header
- error
- admincommands
After formatting the text, the message is delivered with BaseCommand.sendStandardReply(org.apache.mailet.Mail, java.lang.String, java.lang.String, java.lang.String)
- Since:
- 2.2.0
- Version:
- CVS $Revision: 494012 $ $Date: 2007-01-08 10:23:58 +0000 (lun, 08 gen 2007) $
Methods inherited from class org.apache.james.transport.mailets.listservcommands.BaseCommand |
generateMail, getCommandListservManager, getCommandName, getConfiguration, getMailetContext, getStandardProperties, getUsersRepository, initXMLResources, log, log, sendStandardReply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlResources
protected XMLResources[] xmlResources
HEADER
protected static final int HEADER
- See Also:
- Constant Field Values
ERROR
protected static final int ERROR
- See Also:
- Constant Field Values
ADMIN_COMMANDS
protected static final int ADMIN_COMMANDS
- See Also:
- Constant Field Values
ErrorCommand
public ErrorCommand()
init
public void init(ICommandListservManager commandListservManager,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Description copied from class:
BaseCommand
- Perform any required initialization
- Specified by:
init
in interface IListServCommand
- Overrides:
init
in class BaseCommand
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
onCommand
public void onCommand(Mail mail)
throws javax.mail.MessagingException
- Delegate to
onError(org.apache.mailet.Mail, java.lang.String, java.lang.String)
- Parameters:
mail
-
- Throws:
javax.mail.MessagingException
onError
public void onError(Mail mail,
java.lang.String subject,
java.lang.String errorMessage)
throws javax.mail.MessagingException
- An error occurred, send a message with the following text resources:
- Parameters:
subject
- the subject of the message to sendmail
- errorMessage
-
- Throws:
javax.mail.MessagingException
Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.