org.jdesktop.wonderland.client.cell
Interface AssetPreloader

All Known Implementing Classes:
ModelCell, ModelCellComponent

public interface AssetPreloader

A cell that implements AssetPreloader provides a list of assets to download before the cell is loaded. This speeds up cell loading since assets can be downloaded in parallel.

Author:
Jonathan Kaplan

Method Summary
 java.util.List<java.net.URL> assetLoaded(java.net.URL url, java.io.InputStream loaded)
          Called whenever an asset is finished loading.
 java.util.List<java.net.URL> getAssets()
          Provide an initial list of assets to load
 

Method Detail

getAssets

java.util.List<java.net.URL> getAssets()
Provide an initial list of assets to load

Returns:
a list of the assets for this cell, or an empty list if no assets are available.

assetLoaded

java.util.List<java.net.URL> assetLoaded(java.net.URL url,
                                         java.io.InputStream loaded)
Called whenever an asset is finished loading. This method returns an additional list of assets to load based on the contents of the newly added file.

Parameters:
loaded - the InputStream from the loaded URL
Returns:
a list of additional URLs to load, or null if there are no more URLs that need loading


Open Wonderland - http://openwonderland.org