Class ImapServer
java.lang.Object
java.lang.Thread
com.icegreen.greenmail.server.AbstractServer
com.icegreen.greenmail.imap.ImapServer
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class AbstractServer
bindTo, CLIENT_SOCKET_SO_TIMEOUT, log, managers, serverSocket, setupModifier and TypeFieldDescriptionprotected final InetAddressprotected static final intprotected final org.slf4j.Loggerprotected final Managersprotected ServerSocketprotected ServerSetupFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ProtocolHandlercreateProtocolHandler(Socket clientSocket) Create a new, specific protocol handler such as for IMAP.org.eclipse.angus.mail.imap.IMAPStoreCreates a new JavaMail store.Methods inherited from class AbstractServer
closeServerSocket, createSession, createSession, createSession, getBindTo, getPort, getProtocol, getServerSetup, handleClientSocket, initServerSocket, isRunning, keepOn, openServerSocket, quit, run, setClientSocketTimeout, setRunning, startService, stopService, stopService, toString, waitTillRunningModifier and TypeMethodDescriptionprotected voidCloses the server socket.Creates a session configured for given server (IMAP, SMTP, ...).createSession(Properties properties) Creates a session configured for given server (IMAP, SMTP, ...).createSession(Properties properties, boolean debug) Creates a session configured for given server (IMAP, SMTP, ...).intgetPort()protected voidhandleClientSocket(Socket clientSocket) protected voidbooleanChecks if service is up and running.protected final booleankeepOn()protected ServerSocketprotected voidquit()Quits server by closing server socket and closing client socket handlers.voidrun()voidsetClientSocketTimeout(int clientSocketTimeout) protected voidsetRunning(boolean r) voidStarts the service in the background as a new thread.final voidStops the service (without timeout).final voidstopService(long millis) Stops the service.toString()booleanwaitTillRunning(long timeoutInMs) Waits till service is up or timeout was reached.Methods inherited from class Thread
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, yield
-
Constructor Details
-
ImapServer
-
-
Method Details
-
createProtocolHandler
Description copied from class:AbstractServerCreate a new, specific protocol handler such as for IMAP.- Specified by:
createProtocolHandlerin classAbstractServer- Parameters:
clientSocket- the client socket to use.- Returns:
- the new protocol handler.
-
createStore
Description copied from class:AbstractServerCreates a new JavaMail store.- Overrides:
createStorein classAbstractServer- Returns:
- a new store.
- Throws:
NoSuchProviderException
-