com.icegreen.greenmail
Class AbstractServer

java.lang.Object
  extended by java.lang.Thread
      extended by com.icegreen.greenmail.util.Service
          extended by com.icegreen.greenmail.AbstractServer
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
ImapServer, Pop3Server, SmtpServer

public abstract class AbstractServer
extends Service

Since:
Feb 2, 2006
Version:
$Id: $
Author:
Wael Chatila

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  InetAddress bindTo
           
protected  Vector handlers
           
protected  Managers managers
           
protected  ServerSocket serverSocket
           
protected  ServerSetup setup
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected AbstractServer(ServerSetup setup, Managers managers)
           
 
Method Summary
 String getBindTo()
           
 int getPort()
           
 String getProtocol()
           
 ServerSetup getServerSetup()
           
protected  ServerSocket openServerSocket()
           
 String toString()
           
 
Methods inherited from class com.icegreen.greenmail.util.Service
destroy, init, isRunning, keepOn, quit, run, setRunning, startService, stopService, stopService, stopService, wait_for_running
 
Methods inherited from class java.lang.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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bindTo

protected final InetAddress bindTo

serverSocket

protected ServerSocket serverSocket

handlers

protected Vector handlers

managers

protected Managers managers

setup

protected ServerSetup setup
Constructor Detail

AbstractServer

protected AbstractServer(ServerSetup setup,
                         Managers managers)
Method Detail

openServerSocket

protected ServerSocket openServerSocket()
                                 throws IOException
Throws:
IOException

getBindTo

public String getBindTo()

getPort

public int getPort()

getProtocol

public String getProtocol()

getServerSetup

public ServerSetup getServerSetup()

toString

public String toString()
Overrides:
toString in class Thread