com.multisoftgroup.jerry.server.thread
Class AbstractServerThread
java.lang.Object
com.multisoftgroup.jerry.server.thread.AbstractServerThread
- All Implemented Interfaces:
- Runnable
public abstract class AbstractServerThread
- extends Object
- implements Runnable
AbstractServerThread
protected AbstractServerThread(String threadName)
run
public final void run()
- Specified by:
run in interface Runnable
isRunning
public final boolean isRunning()
start
public final boolean start(ThreadPoolExecutor executor,
long timeoutMS)
throws StartServerExeption
- Throws:
StartServerExeption
start
public final boolean start(ThreadPoolExecutor executor)
throws StartServerExeption
- Throws:
StartServerExeption
start
public final boolean start()
throws StartServerExeption
- Throws:
StartServerExeption
stop
public final boolean stop()
throws StopServerException
- Throws:
StopServerException
getThreadName
protected String getThreadName()
runInnerLoop
protected abstract void runInnerLoop()
throws Exception
- Called with each pass through the thread's main loop.
- Throws:
Exception - If the method throws an exception, the thread will
be stopped, and the exception passed to the
stoppable thread's error handler. The
notifyStopping() method will still be called
(assuming the error handler does not abort the
application).
notifyStarting
protected abstract void notifyStarting()
notifyStopped
protected abstract void notifyStopped()
toString
public String toString()
- Overrides:
toString in class Object