com.ericdaugherty.mail.server.services.general
Interface ConnectionProcessor

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
Pop3Processor, SMTPProcessor, SMTPProcessorAmavis

public interface ConnectionProcessor
extends java.lang.Runnable

Defines the interface for all classes that will handle a connection. This interface is used by ServiceListener to interact with the Connection Processors.

Author:
Eric Daugherty

Method Summary
 java.lang.String read()
           
 void setSocket(java.net.ServerSocket serverSocket)
          Sets the socket used to communicate with the client.
 void setUpdatingServerSocket(boolean value)
           
 void shutdown()
          Notifies the service to stop processing connections.
 void write(java.lang.String message, int errorIncrement)
           
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setSocket

void setSocket(java.net.ServerSocket serverSocket)
Sets the socket used to communicate with the client.


shutdown

void shutdown()
Notifies the service to stop processing connections.


setUpdatingServerSocket

void setUpdatingServerSocket(boolean value)

read

java.lang.String read()
                      throws java.net.SocketException,
                             java.net.SocketTimeoutException,
                             java.io.IOException
Throws:
java.net.SocketException
java.net.SocketTimeoutException
java.io.IOException

write

void write(java.lang.String message,
           int errorIncrement)
           throws TooManyErrorsException,
                  java.io.IOException
Throws:
TooManyErrorsException
java.io.IOException