org.eclipse.net4j.util.lifecycle
Class Worker
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.lifecycle.Worker
- All Implemented Interfaces:
- INotifier, INotifier.Introspection, ILifecycle, ILifecycle.Introspection
- Direct Known Subclasses:
- Cache, CacheMonitor, QueueWorker
public abstract class Worker
- extends Lifecycle
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, deferredDeactivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, isDeferredDeactivation, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
Worker
public Worker()
isDaemon
public boolean isDaemon()
setDaemon
public void setDaemon(boolean daemon)
getActivationTimeout
public long getActivationTimeout()
setActivationTimeout
public void setActivationTimeout(long activationTimeout)
getDeactivationTimeout
public long getDeactivationTimeout()
setDeactivationTimeout
public void setDeactivationTimeout(long deactivationTimeout)
doActivate
protected void doActivate()
throws java.lang.Exception
- Overrides:
doActivate
in class Lifecycle
- Throws:
java.lang.Exception
doDeactivate
protected void doDeactivate()
throws java.lang.Exception
- Overrides:
doDeactivate
in class Lifecycle
- Throws:
java.lang.Exception
getThreadName
protected java.lang.String getThreadName()
work
protected abstract void work(Worker.WorkContext context)
throws java.lang.Exception
- Throws:
java.lang.Exception