|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.GenericService SK.gnome.dwarf.GenericServer SK.gnome.dwarf.thread.ThreadServer SK.gnome.dwarf.thread.MultiThreadServer SK.gnome.dwarf.mail.smtp.QueueManager
Provides mail queue management.
This service must be added to SMTPServer
to provide mail queue handling.
If the server should provide remote deliveries, a SK.gnome.dwarf.utils.dns.DNSService must be added to this service.
A SK.gnome.dwarf.utils.cache.Cache implementation may be added to this service to provide an effective caching of client SMTP connections when performing remote deliveries.
Field Summary | |
static java.lang.String |
NODE_ALL
Short name for all nodes. |
static java.lang.String |
NODE_LOCAL
Short name for local domain nodes. |
static java.lang.String |
NODE_PROCESS
Name for the special processing node. |
static java.lang.String |
NODE_REMOTE
Short name for remote domain nodes. |
Fields inherited from class SK.gnome.dwarf.thread.MultiThreadServer |
counter |
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 | |
QueueManager(java.lang.String name)
Creates a new QueueManager. |
Method Summary | |
void |
addService(SK.gnome.dwarf.Service service)
|
protected void |
finish()
|
void |
init(SK.gnome.dwarf.Server parent)
|
boolean |
isLocalHost(java.lang.String domain)
Whether the given domain is served by this server. |
void |
printMessage(SMTPMessage message,
boolean details,
java.io.PrintWriter out)
Prints out the information about the given message. |
void |
runQueue(java.lang.String node,
boolean forceDelivery)
Process the given node. |
void |
setDateFormat(java.lang.String format)
Sets the date/time format used to print out the mail queue information. |
void |
setInterval(int interval)
Sets the queue processing interval. |
void |
start()
|
Methods inherited from class SK.gnome.dwarf.thread.MultiThreadServer |
dequeue, enableThread, enqueue, finish, getHandlerTimeout, loop, report, setHandlerClass, setHandlerTimeout, setMaxHandlers, setMinHandlers, setQueueSize, setSingleRequest, wakeUpHandlers |
Methods inherited from class SK.gnome.dwarf.thread.ThreadServer |
run, setDaemon, shutdown, stop |
Methods inherited from class SK.gnome.dwarf.GenericServer |
addService, getAuthenticator, getLogger, getParameters, getService, getServices, getServices, removeService |
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 |
Field Detail |
public static final java.lang.String NODE_ALL
Value: "#all"
public static final java.lang.String NODE_LOCAL
Value: "#local"
public static final java.lang.String NODE_REMOTE
Value: "#remote"
public static final java.lang.String NODE_PROCESS
Value: "#process"
Constructor Detail |
public QueueManager(java.lang.String name)
name
- the service nameMethod Detail |
public void setInterval(int interval)
interval
- the interval in minutespublic void setDateFormat(java.lang.String format)
format
- the date formatpublic void addService(SK.gnome.dwarf.Service service) throws SK.gnome.dwarf.ServiceException
SK.gnome.dwarf.ServiceException
public void init(SK.gnome.dwarf.Server parent) throws SK.gnome.dwarf.ServiceException
SK.gnome.dwarf.ServiceException
public void start() throws SK.gnome.dwarf.ServiceException
SK.gnome.dwarf.ServiceException
public void printMessage(SMTPMessage message, boolean details, java.io.PrintWriter out) throws MailException
message
- the messagedetails
- true to print details, false otherwiseout
- the output stream
MailException
- if an error occuredpublic void runQueue(java.lang.String node, boolean forceDelivery)
The given node will be processed. If the forceDelivery parameter is true,
the messages will be dequeued regardless of the time they were enqueued for. If the
node parameter starts with the "@" character, it will force to process
all nodes whose names end with this string without the "@" character. Furthermore,
one of the NODE_ALL
, NODE_LOCAL
or NODE_REMOTE
short names may
be used as the node parameter, too.
node
- the node nameforceDelivery
- true to force the processing, false otherwisepublic boolean isLocalHost(java.lang.String domain)
domain
- the domain name
protected void finish()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |