public final class ServerThread extends Thread
Each new thread will be set to Thread.NORM_PRIORITY
even if the calling thread has a higher priority.
Do not extend from ServerThread, always use it together with a class that implements the Runnable interface.
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ServerThread(ClientConnectionData clientConnectionData,
Runnable runnable,
String name)
Creates a new client-related thread instance for a class implementing the
Runnable interface. |
ServerThread(Runnable runnable,
String name)
Creates a new server-related thread instance for a class implementing the
Runnable interface. |
Modifier and Type | Method and Description |
---|---|
static ServerThread |
createSystemThread(Runnable runnable,
String name)
Creates a system thread without "ClientConnectionData".
|
ClientConnectionData |
getClientConnectionData()
Gets the client connection data.
|
static long |
getNextID()
Gets the ID for the new instance of the thread.
|
static long |
getRunningThreadCount()
Gets the count of started threads.
|
long |
getServerThreadID()
Gets the ID of this thread.
|
String |
getServerThreadName()
Gets the name of this thread.
|
static Enumeration<ServerThread> |
getServerThreads()
Gets an enumeration of all running threads.
|
static ClientConnectionData |
locateClientConnectionData(ClientConnectionData ccd,
boolean doLocateCCD)
Locates the ClientConnectionData from the current
input depending on the flag and if not found, gets
it from the current thread or the thread group.
|
void |
run()
Overrides the
Thread.run method in order to provide event
support. |
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, yield
public ServerThread(Runnable runnable, String name)
Runnable
interface.
The name
parameter is the name of the thread that appears in the
trace and event output. Please use a maximum of 8 characters.
public ServerThread(ClientConnectionData clientConnectionData, Runnable runnable, String name)
Runnable
interface.
The name
parameter is the name of the thread that appears in the
trace and event output. Please use a maximum of 8 characters.
public static final long getNextID()
public static final ServerThread createSystemThread(Runnable runnable, String name)
public static final long getRunningThreadCount()
public static final Enumeration<ServerThread> getServerThreads()
public static final ClientConnectionData locateClientConnectionData(ClientConnectionData ccd, boolean doLocateCCD)
public final long getServerThreadID()
public final String getServerThreadName()
public final void run()
Thread.run
method in order to provide event
support. This method cannot be overridden in turn.public final ClientConnectionData getClientConnectionData()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.