Package javazoom.jl.player
Class FactoryRegistry
- java.lang.Object
-
- javazoom.jl.player.AudioDeviceFactory
-
- javazoom.jl.player.FactoryRegistry
-
public class FactoryRegistry extends AudioDeviceFactory
TheFactoryRegistryclass stores the factories for all the audio device implementations available in the system.Instances of this class are thread-safe.
- Since:
- 0.0.8
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Hashtablefactories
-
Constructor Summary
Constructors Constructor Description FactoryRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFactory(AudioDeviceFactory factory)Registers anAudioDeviceFactoryinstance with this registry.AudioDevicecreateAudioDevice()Creates a newAudioDevice.protected AudioDeviceFactory[]getFactoriesPriority()protected voidregisterDefaultFactories()voidremoveFactory(AudioDeviceFactory factory)voidremoveFactoryType(java.lang.Class cls)static FactoryRegistrysystemRegistry()-
Methods inherited from class javazoom.jl.player.AudioDeviceFactory
instantiate
-
-
-
-
Method Detail
-
systemRegistry
public static FactoryRegistry systemRegistry()
-
addFactory
public void addFactory(AudioDeviceFactory factory)
Registers anAudioDeviceFactoryinstance with this registry.
-
removeFactoryType
public void removeFactoryType(java.lang.Class cls)
-
removeFactory
public void removeFactory(AudioDeviceFactory factory)
-
createAudioDevice
public AudioDevice createAudioDevice() throws JavaLayerException
Description copied from class:AudioDeviceFactoryCreates a newAudioDevice.- Specified by:
createAudioDevicein classAudioDeviceFactory- Returns:
- a new instance of a specific class of
AudioDevice. - Throws:
JavaLayerException- if an instance of AudioDevice could not be created.
-
getFactoriesPriority
protected AudioDeviceFactory[] getFactoriesPriority()
-
registerDefaultFactories
protected void registerDefaultFactories()
-
-