public abstract class BaseServer extends SafeThread
| Modifier and Type | Class and Description |
|---|---|
class |
BaseServer.SocketRequestHandler |
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static String |
ENCODING |
static long |
LONG_END |
static long |
LONG_ERROR |
static long |
LONG_OK |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
BaseServer(String name,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract BaseServer.SocketRequestHandler |
createSocketRequestHandler(Socket socket) |
void |
doTerminate() |
List<BaseServer.SocketRequestHandler> |
getRunningRequestHandlers() |
int |
getTotalNumberOfConnections() |
protected void |
runInt() |
interrupt, isFinished, isTerminateRequested, run, terminate, terminateAndWaitForFinish, waitForFinish, waitForFinish, wasStartedactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final String ENCODING
public static final long LONG_ERROR
public static final long LONG_OK
public static final long LONG_END
public BaseServer(String name, int port)
protected abstract BaseServer.SocketRequestHandler createSocketRequestHandler(Socket socket) throws IOException
IOExceptionprotected void runInt()
throws Exception
runInt in class SafeThreadExceptionpublic void doTerminate()
doTerminate in class SafeThreadpublic int getTotalNumberOfConnections()
public List<BaseServer.SocketRequestHandler> getRunningRequestHandlers()
Copyright © 2015. All rights reserved.