|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.nodes.loader.ScriptThreadPool
A local singleton that manages all of the threads used to load script content.
The singleton loads a number of threads that must use a common map and queue instance for all users. To organise and queue inputs to this class we must first fetch the instance that is running and then query it for the map and queue. Once you have access to these, you are free to use them directly to add or remove items from the general pool.
The number of threads can be controlled at startup of the application by setting a system property. If the property defines a value less than or equal to zero it is ignored and the default number of threads are loaded - 5.
Properties
The following properties are used by this class
org.web3d.vrml.nodes.loader.threads The number of
concurrent threads to be started to do loading.
| Method Summary | |
java.util.Map |
getProgressMap()
Get the working map of in-progess loading. |
static ScriptThreadPool |
getScriptThreadPool()
Fetch the singleton instance of this class. |
static java.lang.ThreadGroup |
getThreadGroup()
Get the thread group that these objects belong to. |
ContentLoadQueue |
getWaitingList()
Get the working queue of items yet to be processed. |
protected void |
restartThreads()
Insure all threads are running. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. |
static void |
setThreadGroup(java.lang.ThreadGroup tg)
Set the global thread group that we want these content handlers to run under. |
void |
shutdown()
Force a shutdown of the entire thread pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ScriptThreadPool getScriptThreadPool()
public static void setThreadGroup(java.lang.ThreadGroup tg)
throws java.lang.IllegalStateException
tg - The thread group to use
java.lang.IllegalStateException - Too late or it has been set alreadypublic static java.lang.ThreadGroup getThreadGroup()
public void setErrorReporter(ErrorReporter reporter)
reporter - The instance to use or nullpublic ContentLoadQueue getWaitingList()
public java.util.Map getProgressMap()
public void shutdown()
protected void restartThreads()
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||