SK.gnome.dwarf.mail.smtp
Class SMTPHandler

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.thread.ThreadService
          extended bySK.gnome.dwarf.thread.Handler
              extended bySK.gnome.dwarf.tcpip.TCPHandler
                  extended bySK.gnome.dwarf.mail.smtp.SMTPHandler
All Implemented Interfaces:
SK.gnome.dwarf.Reportable, java.lang.Runnable, SK.gnome.dwarf.Service, SK.gnome.dwarf.Stoppable

public class SMTPHandler
extends SK.gnome.dwarf.tcpip.TCPHandler
implements SK.gnome.dwarf.Reportable

This class handles the incoming SMTP connections.

SMTPHandler must be added to the SMTPServer object.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.thread.ThreadService
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
SMTPHandler(java.lang.String name)
          Creates a new SMTPHandler.
 
Method Summary
protected  void finish()
          Waits for the thread to finish.
protected  void handle(java.net.Socket socket)
          Handles the SMTP connection.
 void init(SK.gnome.dwarf.Server parent)
          Initializes the service.
 boolean noop(java.util.StringTokenizer args)
           
 java.lang.String report()
          Returns the service report.
 
Methods inherited from class SK.gnome.dwarf.tcpip.TCPHandler
handle
 
Methods inherited from class SK.gnome.dwarf.thread.Handler
enableThread, loop, start
 
Methods inherited from class SK.gnome.dwarf.thread.ThreadService
run, setDaemon, shutdown, stop
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, 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
 

Constructor Detail

SMTPHandler

public SMTPHandler(java.lang.String name)
Creates a new SMTPHandler.

Method Detail

init

public void init(SK.gnome.dwarf.Server parent)
          throws SK.gnome.dwarf.ServiceException
Initializes the service.

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

report

public java.lang.String report()
Returns the service report.

Specified by:
report in interface SK.gnome.dwarf.Reportable

finish

protected void finish()
Waits for the thread to finish.


handle

protected void handle(java.net.Socket socket)
Handles the SMTP connection.

The report() method returns a detailed information about the current handler's activity.


noop

public boolean noop(java.util.StringTokenizer args)
             throws java.io.IOException
Throws:
java.io.IOException


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