javax.sound.midi.spi
Class MidiDeviceProvider

java.lang.Object
  extended by javax.sound.midi.spi.MidiDeviceProvider

public abstract class MidiDeviceProvider
extends Object

The abstract base class for all MidiDeviceProvider types.

Since:
1.3

Constructor Summary
MidiDeviceProvider()
           
 
Method Summary
abstract  MidiDevice getDevice(MidiDevice.Info info)
          Get the MidiDevice for the MIDI device described by info
abstract  MidiDevice.Info[] getDeviceInfo()
          Get the list descriptors for all MIDI devices supported by this provider.
 boolean isDeviceSupported(MidiDevice.Info info)
          Returns true if this provider supports a specific MIDI device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiDeviceProvider

public MidiDeviceProvider()
Method Detail

isDeviceSupported

public boolean isDeviceSupported(MidiDevice.Info info)
Returns true if this provider supports a specific MIDI device.

Parameters:
info - the MIDI device descriptor
Returns:
true if this provider supports info

getDeviceInfo

public abstract MidiDevice.Info[] getDeviceInfo()
Get the list descriptors for all MIDI devices supported by this provider.

Returns:
an array of descriptors for all supported MIDI devices.

getDevice

public abstract MidiDevice getDevice(MidiDevice.Info info)
                              throws IllegalArgumentException
Get the MidiDevice for the MIDI device described by info

Parameters:
info - the descriptor for the MIDI device we want
Returns:
the MidiDevice we're looking for
Throws:
IllegalArgumentException - is this provider doesn't support info