APIdia Launch Partner
Top Description Constructors Methods
javax.sound.midi.spi

public abstract Class MidiDeviceProvider

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.media.sound.AbstractMidiDeviceProvider, com.sun.media.sound.RealTimeSequencerProvider, com.sun.media.sound.SoftProvider
Imports
java.util.Arrays, javax.sound.midi.MidiDevice

A MidiDeviceProvider is a factory or provider for a particular type of MIDI device. This mechanism allows the implementation to determine how resources are managed in the creation and management of a device.
Author
Kara Kytle

Constructor Summary

AccessConstructor and Description
protected
MidiDeviceProvider()

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public abstract MidiDevice

Returns:

device instance
getDevice
(MidiDevice.Info
an info object that describes the desired device
info
)

Obtains an instance of the device represented by the info object.

public abstract MidiDevice.Info[]

Returns:

set of device info objects
getDeviceInfo
()

Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.

public boolean

Returns:

true if the specified device is supported, otherwise false
isDeviceSupported
(final MidiDevice.Info
an info object that describes the device for which support is queried
info
)

Indicates whether the device provider supports the device represented by the specified device info object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MidiDeviceProviderback to summary
protected MidiDeviceProvider()

Constructor for subclasses to call.

Method Detail

getDeviceback to summary
public abstract MidiDevice getDevice(MidiDevice.Info info)

Obtains an instance of the device represented by the info object.

Parameters
info:MidiDevice.Info

an info object that describes the desired device

Returns:MidiDevice

device instance

Exceptions
IllegalArgumentException:
if the info object specified does not match the info object for a device supported by this MidiDeviceProvider
NullPointerException:
if info is null
getDeviceInfoback to summary
public abstract MidiDevice.Info[] getDeviceInfo()

Obtains the set of info objects representing the device or devices provided by this MidiDeviceProvider.

Returns:MidiDevice.Info[]

set of device info objects

isDeviceSupportedback to summary
public boolean isDeviceSupported(final MidiDevice.Info info)

Indicates whether the device provider supports the device represented by the specified device info object.

Parameters
info:MidiDevice.Info

an info object that describes the device for which support is queried

Returns:boolean

true if the specified device is supported, otherwise false

Exceptions
NullPointerException:
if info is null