gr.teicrete.mta.midi.eobody.parse
Class EobodyEventFactory

java.lang.Object
  extended by gr.teicrete.mta.midi.eobody.parse.EobodyEventFactory
All Implemented Interfaces:
javax.sound.midi.Receiver

public class EobodyEventFactory
extends java.lang.Object
implements javax.sound.midi.Receiver

A class that implements the Receiver interface, to manipulate MIDI messages and to generate EobodyEvents to notify all EobodyEventListeners

Author:
zavi

Constructor Summary
EobodyEventFactory()
           
 
Method Summary
 void addEobodyEventListener(EobodyEventListener eobEvtListener)
          Method to add an EobodyEventListener to the list
 void clearListenerList()
          Method to remove all the EobodyEventListeners from the listener list
 void close()
          This method is called to close the EobodyDecoder
 void fireEobodyEvent(javax.sound.midi.MidiMessage message)
          This method notifies all the registered EobodyEventListeners
 void removeEobodyEventListener(EobodyEventListener eobEvtListener)
          Method to remove an EobodyEventListener from the list
 void send(javax.sound.midi.MidiMessage message, long lTimeStamp)
          This method is called when a MIDI message is received
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EobodyEventFactory

public EobodyEventFactory()
Method Detail

close

public void close()
This method is called to close the EobodyDecoder

Specified by:
close in interface javax.sound.midi.Receiver

send

public void send(javax.sound.midi.MidiMessage message,
                 long lTimeStamp)
This method is called when a MIDI message is received

Specified by:
send in interface javax.sound.midi.Receiver
Parameters:
message - The MIDI message
lTimeStamp - The TimeStamp of the message. Usually -1

addEobodyEventListener

public void addEobodyEventListener(EobodyEventListener eobEvtListener)
Method to add an EobodyEventListener to the list

Parameters:
eobEvtListener - The listener to be added

removeEobodyEventListener

public void removeEobodyEventListener(EobodyEventListener eobEvtListener)
Method to remove an EobodyEventListener from the list

Parameters:
eobEvtListener - The listener to be removed

clearListenerList

public void clearListenerList()
Method to remove all the EobodyEventListeners from the listener list


fireEobodyEvent

public void fireEobodyEvent(javax.sound.midi.MidiMessage message)
This method notifies all the registered EobodyEventListeners

Parameters:
message - The MidiMessage that will generate the EobodyEvent