Package com.icegreen.greenmail.util
Class Service
java.lang.Object
java.lang.Thread
com.icegreen.greenmail.util.Service
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AbstractServer
A class that facilitate service implementation
- Since:
- 2005
- Version:
- $id: $
- Author:
- Wael Chatila
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
protected final boolean
keepOn()
abstract void
quit()
abstract void
run()
void
startService
(Object obj) final void
stopService
(Object obj) final void
stopService
(Object obj, long millis) final void
stopService
(Object obj, Long millis) Stops the service.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
Service
public Service()
-
-
Method Details
-
run
public abstract void run() -
quit
public abstract void quit() -
init
-
destroy
-
keepOn
protected final boolean keepOn() -
startService
-
stopService
Stops the service. If a timeout is given and the service has still not gracefully been stopped after timeout ms the service is stopped by force.- Parameters:
obj
-millis
- value in ms
-
stopService
-
stopService
-