SK.gnome.dwarf.mail.smtp.proc.agent
Class FileListServer

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.GenericServer
          extended bySK.gnome.dwarf.thread.ThreadServer
              extended bySK.gnome.dwarf.mail.smtp.proc.MailAgent
                  extended bySK.gnome.dwarf.mail.smtp.proc.agent.ListServer
                      extended bySK.gnome.dwarf.mail.smtp.proc.agent.FileListServer
All Implemented Interfaces:
Preprocessing, SK.gnome.dwarf.Reportable, java.lang.Runnable, SK.gnome.dwarf.Server, SK.gnome.dwarf.Service

public class FileListServer
extends ListServer

Provides file-based listserver implementation.

The serialized form of list subscribers is saved to a local file by this implementation, and updated in regular intervals.


Nested Class Summary
 
Nested classes inherited from class SK.gnome.dwarf.mail.smtp.proc.agent.ListServer
ListServer.Command, ListServer.Subscriber
 
Field Summary
 
Fields inherited from class SK.gnome.dwarf.mail.smtp.proc.MailAgent
context, required
 
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
FileListServer(java.lang.String name)
           
 
Method Summary
protected  void addSubscriber(ListServer.Subscriber subscriber)
           
protected  boolean enableThread()
           
protected  ListServer.Subscriber getSubscriber(java.lang.String address)
           
protected  java.util.Collection getSubscribers()
           
 void init(SK.gnome.dwarf.Server parent)
          Initializes the service.
protected  void loop()
           
protected  void removeSubscriber(ListServer.Subscriber subscriber)
           
 void setFile(java.io.File file)
           
 void shutdown()
           
protected  void updateSubscriber(ListServer.Subscriber subscriber)
           
 
Methods inherited from class SK.gnome.dwarf.mail.smtp.proc.agent.ListServer
init, preprocess, setAllowLocalPosting, setDescription, setDomain, setHelpURL, setMaintainers, setName, setNotifyRejected, setOpen, setPassword, setProtectList, setReplyToSender, setSubscribeURL, setUnsubscribeURL
 
Methods inherited from class SK.gnome.dwarf.mail.smtp.proc.MailAgent
destroy, filter, isRequired, postprocess, setRequired, storeMessage
 
Methods inherited from class SK.gnome.dwarf.thread.ThreadServer
finish, run, setDaemon, 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
 

Constructor Detail

FileListServer

public FileListServer(java.lang.String name)
Method Detail

setFile

public void setFile(java.io.File file)

init

public void init(SK.gnome.dwarf.Server parent)
          throws SK.gnome.dwarf.ServiceException
Description copied from class: MailAgent
Initializes the service.

Specified by:
init in interface SK.gnome.dwarf.Service
Overrides:
init in class ListServer
Throws:
SK.gnome.dwarf.ServiceException

shutdown

public void shutdown()

enableThread

protected boolean enableThread()

loop

protected void loop()

addSubscriber

protected void addSubscriber(ListServer.Subscriber subscriber)
                      throws MailException
Specified by:
addSubscriber in class ListServer
Throws:
MailException

updateSubscriber

protected void updateSubscriber(ListServer.Subscriber subscriber)
                         throws MailException
Specified by:
updateSubscriber in class ListServer
Throws:
MailException

removeSubscriber

protected void removeSubscriber(ListServer.Subscriber subscriber)
                         throws MailException
Specified by:
removeSubscriber in class ListServer
Throws:
MailException

getSubscriber

protected ListServer.Subscriber getSubscriber(java.lang.String address)
                                       throws MailException
Specified by:
getSubscriber in class ListServer
Throws:
MailException

getSubscribers

protected java.util.Collection getSubscribers()
                                       throws MailException
Specified by:
getSubscribers in class ListServer
Throws:
MailException


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.