javax.sound.midi
Interface Receiver


public interface Receiver

This interface describes the methods required by objects receiving MIDI messages.

Since:
1.3

Method Summary
 void close()
          Close this receiver, possibly freeing system resources.
 void send(MidiMessage message, long timeStamp)
          Send a MIDI message and timestamp.
 

Method Detail

send

void send(MidiMessage message,
          long timeStamp)
          throws IllegalStateException
Send a MIDI message and timestamp. Some receivers don't support timestamps, in which case timeStamp should be -1.

Parameters:
message - the MIDI message to send
timeStamp - time timestamp for this message in microseconds (or -1)
Throws:
IllegalStateException - if the receiver is closed

close

void close()
Close this receiver, possibly freeing system resources.