Xj3D VRML/X3D Code API

org.web3d.vrml.nodes.loader
Interface ExternalLoadManager

All Known Implementing Classes:
AbstractLoadManager

public interface ExternalLoadManager

An abstract definition of managers for loading files that are external to the currently loading file eg Textures, inlines and protos.

The loader is given a scene and told to start loading the contents. During this time items progress from pending to loading to loaded. The load manager is cancelable so that a particular scene can be interrupted part way through loading. The manager is designed to load multiple scenes in parallel or to have parallel instances of this manager loading data.

Version:
$Revision: 1.16 $
Author:
Justin Couch

Method Summary
 void clear()
          Force clearing all state from this manager now.
 void queueExternProtoLoad(VRMLExternProtoDeclare proto)
          Queue for loading a single externproto implementation.
 void queueNodesLoad(NodeArray nodes)
          Queue an arbitrary collection of nodes for loading.
 void queueSceneLoad(BasicScene scene)
          Start loading the contents of the given scene.
 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.
 void shutdown()
          Notification that the manager needs to shut down all the currently running threads.
 void stopSceneLoad(BasicScene scene)
          Stop the named scene from loading.
 

Method Detail

setErrorReporter

public 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. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Parameters:
reporter - The instance to use or null

queueExternProtoLoad

public void queueExternProtoLoad(VRMLExternProtoDeclare proto)
Queue for loading a single externproto implementation. Used as a way of getting externprotos in to load from the scripting APIs and their createProto or createVRMLFromString methods that have queued up content to load but have no other way of pushing it into the system.

Parameters:
proto - The proto declaration that needs to be queued up

queueSceneLoad

public void queueSceneLoad(BasicScene scene)
Start loading the contents of the given scene. If there are other scenes already loading, this is placed in the queue behind them. If the scene does not contain any external nodes or is null then it is not queued for loading. This is not a recursive call through all the contained scenes. The caller is responsible for making sure all sub-scenes are loaded as required.

Parameters:
scene - The scene to load content for

queueNodesLoad

public void queueNodesLoad(NodeArray nodes)
Queue an arbitrary collection of nodes for loading.

Parameters:
nodes - Array of nodes to add

stopSceneLoad

public void stopSceneLoad(BasicScene scene)
Stop the named scene from loading. If there are any loads in progress this action forces them to stop. If this is not a known scene then the request is ignored.

Parameters:
scene - The scene to stop loading

clear

public void clear()
Force clearing all state from this manager now. This is used to indicate that a new world is about to be loaded and everything should be cleaned out now.


shutdown

public void shutdown()
Notification that the manager needs to shut down all the currently running threads. Normally called when the application is exiting, so it is not expected that the manager needs to act sanely after this method has been called.


Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium