Package org.xj3d.core.loading
Interface LoadRequestHandler
- All Known Implementing Classes:
WorldLoadHandler
public interface LoadRequestHandler
The handler that the content loading thread pool will call to load
a specific request.
Request handlers provide the implementation of the content type that will perform content-specific loading. For example, script loading will be different to texture loading, thus require different implementations of this interface.
Implementation Requirements
As this class is being dumped into the middle of an explicitly multithreaded environment, then the implementation must be able to handle that. Either a new instance can be created for each load requested, or a single shared instance can be used but must be re-entrant.
- Version:
- $Revision: 1.1 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification to abort loading the current resource.void
processLoadRequest
(org.j3d.util.ErrorReporter reporter, String[] url, Vector<LoadDetails> loadList) Process this load request now.void
shutdown()
Notification to shut down the load process entirely for this thread.
-
Method Details
-
processLoadRequest
void processLoadRequest(org.j3d.util.ErrorReporter reporter, String[] url, Vector<LoadDetails> loadList) Process this load request now.- Parameters:
reporter
- The errorReporter to send all messages tourl
- The list of URLs to loadloadList
- The list of LoadDetails objects to sent the fulfilled requests to
-
abortCurrentFile
void abortCurrentFile()Notification to abort loading the current resource. If there is one loading, it will terminate the procedure immediately and start fetching the next available URI. This will only work if we are currently processing a file. If we are not processing a file then this is ignored. -
shutdown
void shutdown()Notification to shut down the load process entirely for this thread. It probably means we are about to close down the whole system. If we are held in the queue, blocked waiting for input, the caller should callBlockingQueue.purge()
on the queue after calling this method. That will force the block to exit and this thread to end.
-