SK.gnome.dwarf.mail.pop
Class POPHandler

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.pop.POPHandler
All Implemented Interfaces:
java.util.EventListener, MailEventListener, SK.gnome.dwarf.Reportable, java.lang.Runnable, SK.gnome.dwarf.Service, SK.gnome.dwarf.Stoppable

public class POPHandler
extends SK.gnome.dwarf.tcpip.TCPHandler
implements SK.gnome.dwarf.Reportable, MailEventListener

This class handles the POP3 connections.

POPHandler must be added to the POPServer 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
POPHandler(java.lang.String name)
          Creates a new POPHandler.
 
Method Summary
protected  void finish()
          Waits for the thread to finish.
protected  void handle(java.net.Socket socket)
          Handles the POP3 connection.
 void handleMailEvent(MailEvent event)
          Handles the mail event.
 void init(SK.gnome.dwarf.Server parent)
          Initializes the service.
 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

POPHandler

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

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

handleMailEvent

public void handleMailEvent(MailEvent event)
Description copied from interface: MailEventListener
Handles the mail event.

Specified by:
handleMailEvent in interface MailEventListener
Parameters:
event - the mail event

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 POP3 connection.

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



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