public final class ServerThread extends Thread
Session thread for each connection which will handle the connection.
On shutdown it terminates not only this thread, but the session threads too.Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ServerThread(SMTPServer server,
ServerSocket serverSocket,
ProxyHandler proxyHandler) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfConnections() |
boolean |
hasTooManyConnections() |
void |
run()
This method is called by this thread when it starts up.
|
void |
sessionEnded(Session session)
Registers that the specified
Session thread ended. |
void |
shutdown()
Closes the server socket and all client sockets.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic ServerThread(SMTPServer server, ServerSocket serverSocket, ProxyHandler proxyHandler)
public void run()
shutdown().public void shutdown()
public boolean hasTooManyConnections()
public int getNumberOfConnections()
Copyright © 2006–2024. All rights reserved.