org.xith3d.resources
Class SoundResourceRequest

java.lang.Object
  extended by org.xith3d.resources.SoundResourceRequest
All Implemented Interfaces:
org.jagatoo.datatypes.NamedObject, ResourceRequest

public class SoundResourceRequest
extends java.lang.Object
implements ResourceRequest

This is a ResourceRequest for a Sound resource to be loaded with ExtensionSoundLoader.


Constructor Summary
SoundResourceRequest(java.lang.String name, java.lang.String bagName)
          Creates a new TextureResourceRequest.
SoundResourceRequest(java.lang.String name, java.lang.String bagName, SoundLoader loader)
          Creates a new TextureResourceRequest.
 
Method Summary
 java.lang.String getBagName()
          
 java.lang.String getName()
          
 SoundLoader getSoundLoader()
           
 java.lang.Object loadResource(ResourceLocator resLoc, ResourceBag resBag)
          Loads the resource and stores it into the ResourceBag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundResourceRequest

public SoundResourceRequest(java.lang.String name,
                            java.lang.String bagName,
                            SoundLoader loader)
Creates a new TextureResourceRequest.

Parameters:
name - the name of the Texture resource to use for loading
bagName - the name, that the Texture resource will carry in the ResourceBag
loader - the SoundLoader to use for loading this Sound resource

SoundResourceRequest

public SoundResourceRequest(java.lang.String name,
                            java.lang.String bagName)
Creates a new TextureResourceRequest.

Parameters:
name - the name of the Texture resource to use for loading
bagName - the name, that the Texture resource will carry in the ResourceBag
Method Detail

getName

public final java.lang.String getName()

Specified by:
getName in interface org.jagatoo.datatypes.NamedObject
Specified by:
getName in interface ResourceRequest
Returns:
the name of the requested resource

getBagName

public final java.lang.String getBagName()

Specified by:
getBagName in interface ResourceRequest
Returns:
the name of the requested resource, that it will carry in the ResourceBag

getSoundLoader

public final SoundLoader getSoundLoader()
Returns:
the TextureStreamLocator used to load this Texture resource (or null)

loadResource

public java.lang.Object loadResource(ResourceLocator resLoc,
                                     ResourceBag resBag)
                              throws java.io.IOException
Loads the resource and stores it into the ResourceBag.

Specified by:
loadResource in interface ResourceRequest
Parameters:
resLoc - the ResourceLocator to load resources from
resBag - the ResourceBag to store the loaded resource to
Returns:
the loaded resource.
Throws:
java.io.IOException