SK.gnome.dwarf.mail.smtp.proc.agent
Class AutoReply
java.lang.Object
SK.gnome.dwarf.GenericService
SK.gnome.dwarf.GenericServer
SK.gnome.dwarf.thread.ThreadServer
SK.gnome.dwarf.mail.smtp.proc.MailAgent
SK.gnome.dwarf.mail.smtp.proc.agent.AutoReply
- All Implemented Interfaces:
- Postprocessing, SK.gnome.dwarf.Reportable, java.lang.Runnable, SK.gnome.dwarf.Server, SK.gnome.dwarf.Service
- public class AutoReply
- extends MailAgent
- implements Postprocessing
Provides automatic reply agent.
This agent tries to get a UserStore
for the given recipient. If it exists, its
getAutoReply(String) method is called and an eventual reply text is read from the
returned input stream. The text is then sent to the message's sender as an automatic reply
message.
TODO: 8bit to 7bit automatic conversion
Fields inherited from class SK.gnome.dwarf.thread.ThreadServer |
daemon, thread |
Fields inherited from class SK.gnome.dwarf.GenericService |
initParameters, parent |
Fields inherited from interface SK.gnome.dwarf.Service |
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED |
Constructor Summary |
AutoReply(java.lang.String name)
|
Methods inherited from class SK.gnome.dwarf.thread.ThreadServer |
enableThread, finish, loop, run, setDaemon, shutdown, start, stop |
Methods inherited from class SK.gnome.dwarf.GenericServer |
addService, addService, getAuthenticator, getLogger, getParameters, getService, getServices, getServices, removeService, report |
Methods inherited from class SK.gnome.dwarf.GenericService |
getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getName, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface SK.gnome.dwarf.Service |
getFullName, getName, getState, log, log, login, logout |
AutoReply
public AutoReply(java.lang.String name)
setDelay
public void setDelay(int delay)
setEncoding
public void setEncoding(java.lang.String encoding)
postprocess
protected void postprocess(MailAgentMessage message,
java.util.Collection recipients)
throws java.io.IOException,
MailException
- Description copied from class:
MailAgent
- Processes the message.
This method is called on the agent several times for each message, as it is successively
delivered to the particular recipients. In order to let this happen, the agent must implement
the Postprocessing
interface.
The recipients argument is a collection of Recipient
objects representing the message recipients, as returned after processing by the mail filter
chain. This collection is always non-empty, and contains only those recipients, for which the
actual delivery process succeded (or failed).
- Overrides:
postprocess
in class MailAgent
- Parameters:
message
- the queued messagerecipients
- collection of recipients
- Throws:
MailException
- if an error occured
java.io.IOException
- if an I/O error occured
Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.