90 * MidiDevice device = ...;
91 * if ( ! (device instanceof Sequencer) && ! (device instanceof Synthesizer)) {
92 * // we're now sure that device represents a MIDI port
93 * // ...
94 * }
95 * </pre>
96 *
97 * <p>
98 * A <code>MidiDevice</code> includes a <code>{@link MidiDevice.Info}</code> object
99 * to provide manufacturer information and so on.
100 *
101 * @see Synthesizer
102 * @see Sequencer
103 * @see Receiver
104 * @see Transmitter
105 *
106 * @author Kara Kytle
107 * @author Florian Bomers
108 */
109
110 public interface MidiDevice {
111
112
113 /**
114 * Obtains information about the device, including its Java class and
115 * <code>Strings</code> containing its name, vendor, and description.
116 *
117 * @return device info
118 */
119 public Info getDeviceInfo();
120
121
122 /**
123 * Opens the device, indicating that it should now acquire any
124 * system resources it requires and become operational.
125 *
126 * <p>An application opening a device explicitly with this call
127 * has to close the device by calling {@link #close}. This is
128 * necessary to release system resources and allow applications to
129 * exit cleanly.
130 *
|
90 * MidiDevice device = ...;
91 * if ( ! (device instanceof Sequencer) && ! (device instanceof Synthesizer)) {
92 * // we're now sure that device represents a MIDI port
93 * // ...
94 * }
95 * </pre>
96 *
97 * <p>
98 * A <code>MidiDevice</code> includes a <code>{@link MidiDevice.Info}</code> object
99 * to provide manufacturer information and so on.
100 *
101 * @see Synthesizer
102 * @see Sequencer
103 * @see Receiver
104 * @see Transmitter
105 *
106 * @author Kara Kytle
107 * @author Florian Bomers
108 */
109
110 public interface MidiDevice extends AutoCloseable {
111
112
113 /**
114 * Obtains information about the device, including its Java class and
115 * <code>Strings</code> containing its name, vendor, and description.
116 *
117 * @return device info
118 */
119 public Info getDeviceInfo();
120
121
122 /**
123 * Opens the device, indicating that it should now acquire any
124 * system resources it requires and become operational.
125 *
126 * <p>An application opening a device explicitly with this call
127 * has to close the device by calling {@link #close}. This is
128 * necessary to release system resources and allow applications to
129 * exit cleanly.
130 *
|