net.sf.asyncobjects.vats
Class SingleThreadRunner
java.lang.Object
net.sf.asyncobjects.vats.VatRunner
net.sf.asyncobjects.vats.VatQueueRunner
net.sf.asyncobjects.vats.SingleThreadRunner
- All Implemented Interfaces:
- ThreadBasedRunner, VatFactory
public class SingleThreadRunner
- extends VatQueueRunner
- implements ThreadBasedRunner
This is a single thread runner. This runner is a good way to start event loop
in the thread.
- Author:
- const
Methods inherited from class net.sf.asyncobjects.vats.VatRunner |
cancelledEqueuedVat, getBachingFactor, getState, newVat, newVat, setBachingFactor, setStarted, setStarting, setState, setStopped, setStopping |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleThreadRunner
public SingleThreadRunner(String threadName,
boolean isDaemon)
- A constructor
- Parameters:
threadName
- a thread nameisDaemon
- if true a thread will be a daemon thread
SingleThreadRunner
public SingleThreadRunner()
- A constructor
startInCurrentThread
public void startInCurrentThread()
- Start runner in the current thread.
- Specified by:
startInCurrentThread
in interface ThreadBasedRunner
startInNewThread
public void startInNewThread()
- Start runner in new thread
- Specified by:
startInNewThread
in interface ThreadBasedRunner
stop
public void stop()
- Stop this runner
- Specified by:
stop
in interface ThreadBasedRunner
suspend
public void suspend()
- Description copied from interface:
ThreadBasedRunner
- This method cases the runner to suspend its work.
- Specified by:
suspend
in interface ThreadBasedRunner
- See Also:
ThreadBasedRunner.suspend()
resumeInCurrentThread
public void resumeInCurrentThread()
- Description copied from interface:
ThreadBasedRunner
- This methods resumes the suspended runner in the current thread.
- Specified by:
resumeInCurrentThread
in interface ThreadBasedRunner
- See Also:
ThreadBasedRunner.resumeInCurrentThread()
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.