SK.gnome.dwarf.mail.smtp
Class SMTPHost
java.lang.Object
SK.gnome.dwarf.GenericService
SK.gnome.dwarf.GenericServer
SK.gnome.dwarf.mail.MailHost
SK.gnome.dwarf.mail.smtp.SMTPHost
- All Implemented Interfaces:
- SK.gnome.dwarf.Reportable, SK.gnome.dwarf.Server, SK.gnome.dwarf.Service
- Direct Known Subclasses:
- FileSMTPHost
- public abstract class SMTPHost
- extends MailHost
Provides an abstract SMTP host.
SMTPHost may refer to a single host name or an internet domain. It represents
the domain part of a RFC 822 e-mail address for which the server will be able to accept and
deliver messages to local accounts.
It also provides an abstract address-aliasing mechanism, therefore the subclasses
must implement the expandAlias(String)
and reload()
methods.
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 |
SMTPHost(java.lang.String name)
Creates a new SMTPHost. |
Method Summary |
abstract java.lang.String[] |
expandAlias(java.lang.String user)
Expands the given alias name to a list of addresses.
|
void |
init(SK.gnome.dwarf.Server parent)
Initializes the service.
|
abstract void |
reload()
Reloads the alias database.
|
Methods inherited from class SK.gnome.dwarf.GenericServer |
addService, getAuthenticator, getLogger, getParameters, getService, getServices, getServices, removeService, report, shutdown, start, stop |
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 |
SMTPHost
public SMTPHost(java.lang.String name)
- Creates a new SMTPHost.
- Parameters:
name
- the service name
init
public void init(SK.gnome.dwarf.Server parent)
throws SK.gnome.dwarf.ServiceException
- Initializes the service.
If the parent server is not an instance of the SMTPServer
class,
the IllegalServiceClassException
is thrown.
- Specified by:
init
in interface SK.gnome.dwarf.Service
- Overrides:
init
in class MailHost
- Throws:
SK.gnome.dwarf.ServiceException
expandAlias
public abstract java.lang.String[] expandAlias(java.lang.String user)
- Expands the given alias name to a list of addresses.
If the user argument is an alias, it is expanded to an array of addresses
and returned back. The argument value is always a simple local name without the '@'
character and a domain part after it. The returned addresses may or need not contain the
domain part. It they do not contain it, the original domain of user's address
will be appended to them automatically.
- Parameters:
user
- the user identiciation
- Returns:
- the array of RFC 822 addresses
reload
public abstract void reload()
throws MailException
- Reloads the alias database.
It reloads the database of aliases to reflect the changes made by the outside world.
- Throws:
MailException
- if an error occured
Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.