com.ericdaugherty.mail.server.services.smtp
Class SMTPProcessor
java.lang.Object
com.ericdaugherty.mail.server.services.smtp.MIMEConstants
com.ericdaugherty.mail.server.services.smtp.MIMEProcessor
com.ericdaugherty.mail.server.services.smtp.SMTPProcessor
- All Implemented Interfaces:
- ConnectionProcessor, java.lang.Runnable
- Direct Known Subclasses:
- SMTPProcessorAmavis
public class SMTPProcessor
- extends MIMEProcessor
- implements ConnectionProcessor
Handles an incoming SMTP connection. See rfc821/2821/5321 for details.
- Author:
- Eric Daugherty, Andreas Kyrmegalos (2.x branch)
Fields inherited from class com.ericdaugherty.mail.server.services.smtp.MIMEConstants |
MIME_MULTIPART, MIME_OTHER, MIME_TEXT, MIME_UNDEFINED, MIME8BIT, MIMEAAUTOCONVERT, MIMEBASE64ENCODING, MIMEBOUNDARY, MIMECONTENT_TRANSFER_ENCODING, MIMECONTENT_TYPE, MIMEMULTIPART, MIMERFC822, MIMETEXT, MIMEVERSION |
Method Summary |
java.lang.String |
read()
Reads a line from the input stream and returns it. |
void |
run()
Entrypoint for the Thread, this method handles the interaction with
the client socket. |
void |
setSocket(java.net.ServerSocket serverSocket)
Sets the socket used to communicate with the client. |
void |
setUpdatingServerSocket(boolean value)
|
void |
setupVerifyIP()
|
void |
setUseAmavisSMTPDirectory()
|
void |
shutdown()
Notifies this thread to stop processing and exit. |
void |
write(java.lang.String message,
int errorIncrement)
Writes the specified output message to the client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useAmavisSMTPDirectory
protected boolean useAmavisSMTPDirectory
verifyIP
protected VerifyIP verifyIP
SMTPProcessor
public SMTPProcessor()
setSocket
public void setSocket(java.net.ServerSocket serverSocket)
- Sets the socket used to communicate with the client.
- Specified by:
setSocket
in interface ConnectionProcessor
setUpdatingServerSocket
public void setUpdatingServerSocket(boolean value)
- Specified by:
setUpdatingServerSocket
in interface ConnectionProcessor
setUseAmavisSMTPDirectory
public void setUseAmavisSMTPDirectory()
setupVerifyIP
public void setupVerifyIP()
run
public void run()
- Entrypoint for the Thread, this method handles the interaction with
the client socket.
- Specified by:
run
in interface java.lang.Runnable
shutdown
public void shutdown()
- Notifies this thread to stop processing and exit.
- Specified by:
shutdown
in interface ConnectionProcessor
read
public java.lang.String read()
throws java.net.SocketException,
java.net.SocketTimeoutException,
java.io.IOException
- Reads a line from the input stream and returns it.
- Specified by:
read
in interface ConnectionProcessor
- Throws:
java.net.SocketException
java.net.SocketTimeoutException
java.io.IOException
write
public void write(java.lang.String message,
int errorIncrement)
throws TooManyErrorsException,
java.io.IOException
- Writes the specified output message to the client.
- Specified by:
write
in interface ConnectionProcessor
- Throws:
TooManyErrorsException
java.io.IOException