|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--javatools.smtp.SmtpProcessor
A class which can process a single incoming email message. You need to inherit this class and implement one or both of the process() methods, the accountExists method and the canRelay method.
Field Summary | |
(package private) java.lang.String |
cr
|
(package private) int |
maxThreads
|
(package private) java.net.Socket |
socket
|
(package private) int |
timeout
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SmtpProcessor(java.net.Socket socket,
java.lang.ThreadGroup group)
|
Method Summary | |
abstract java.lang.String |
cannotAccept(AcceptRequest ar)
|
java.net.Socket |
getSocket()
|
void |
print(java.io.PrintWriter out,
java.lang.String msg)
|
void |
process(EmailPath sender,
EmailPath recipient,
byte[] data)
Processes and email message with one recipient. |
void |
process(StoreRequest sr)
Processes an email message with possibly multiple recipients. |
void |
run()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.net.Socket socket
int timeout
int maxThreads
java.lang.String cr
Constructor Detail |
public SmtpProcessor(java.net.Socket socket, java.lang.ThreadGroup group)
Method Detail |
public java.net.Socket getSocket()
public void print(java.io.PrintWriter out, java.lang.String msg)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void process(EmailPath sender, EmailPath recipient, byte[] data) throws SmtpException
sender
- Description of Parameterrecipient
- Description of Parameterdata
- Description of Parameter
SmtpException
- Description of Exceptionpublic void process(StoreRequest sr) throws SmtpException
sr
- Description of Parameter
SmtpException
- Description of Exceptionpublic abstract java.lang.String cannotAccept(AcceptRequest ar) throws SmtpException
SmtpException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |