United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4931387 : RFE: Add methods to MidiDevice to get list of Transmitters and Receivers

Details
Type:
Enhancement
Submit Date:
2003-10-02
Status:
Resolved
Updated Date:
2003-10-24
Project Name:
JDK
Resolved Date:
2003-10-24
Component:
client-libs
OS:
generic
Sub-Component:
javax.sound
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (b26)

Related Reports

Sub Tasks

Description
Name: fb126949			Date: 10/01/2003


the interface javax.sound.midi.MidiDevice provides methods for getting instances of Receiver and of Transmitter. Usually, each call to getReceiver() or getTransmitter() will return a new, open, instance of the respective interface. However, it is impossible to query the MidiDevice instance for the list of open Receivers/Transmitters. This would be very useful in order to be able to close some devices.

In our opinion, such methods are simply missing in the API. It is also inconsistent with the javax.sound.sampled package, where the equivalent interface Mixer provides methods such as getSourceLines() to query all lines open to the Mixer instance.

We propose the following new methods in MidiDevice:

/**
 * Returns all currently active, non-closed transmitters 
 * connected with this MidiDevice. 
 * A transmitter can be removed
 * from the device by closing it.
 * @return an unmodifiable list of the open transmitters
 */
List<Transmitter> getTransmitters();


/** 
 * Returns all currently active, non-closed receivers
 * connected with this MidiDevice. 
 * A receiver can be removed
 * from the device by closing it.
 * @return an unmodifiable list of the open receivers
 */
List<Receiver> getReceivers();

There is no need for separate removeReceiver and removeTransmitter methods, since closing a Receiver/Transmitter will remove it automatically from the list.



======================================================================

                                    

Comments
EVALUATION

###@###.### 2003-10-02
	Important inconsistency. Minor addition of 2 methods. Should be fixed in tiger.
                                     
2003-10-02
PUBLIC COMMENTS

Add methods to MidiDevice to get list of Transmitters and Receivers
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b26
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together