javazoom.jl.player
Class FactoryRegistry

java.lang.Object
  extended by javazoom.jl.player.AudioDeviceFactory
      extended by javazoom.jl.player.FactoryRegistry

public class FactoryRegistry
extends AudioDeviceFactory

The FactoryRegistry class 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
protected  java.util.Hashtable factories
           
 
Constructor Summary
FactoryRegistry()
           
 
Method Summary
 void addFactory(AudioDeviceFactory factory)
          Registers an AudioDeviceFactory instance with this registry.
 AudioDevice createAudioDevice()
          Creates a new AudioDevice.
protected  AudioDeviceFactory[] getFactoriesPriority()
           
protected  void registerDefaultFactories()
           
 void removeFactory(AudioDeviceFactory factory)
           
 void removeFactoryType(java.lang.Class cls)
           
static FactoryRegistry systemRegistry()
           
 
Methods inherited from class javazoom.jl.player.AudioDeviceFactory
instantiate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factories

protected java.util.Hashtable factories
Constructor Detail

FactoryRegistry

public FactoryRegistry()
Method Detail

systemRegistry

public static FactoryRegistry systemRegistry()

addFactory

public void addFactory(AudioDeviceFactory factory)
Registers an AudioDeviceFactory instance 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: AudioDeviceFactory
Creates a new AudioDevice.

Specified by:
createAudioDevice in class AudioDeviceFactory
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()


JavaZOOM 1999-2008