gr.teicrete.mta.synthesizer
Class SynthEngine

java.lang.Object
  extended by gr.teicrete.mta.synthesizer.SynthEngine

public class SynthEngine
extends java.lang.Object

This class represents some common properties and methods that are generic to the functionality of the SensorSynthesizer

Author:
zavi

Constructor Summary
SynthEngine()
           
 
Method Summary
static void addSynthesizer(AbstractSensorSynthesizer ss)
          Adds a synthesizer object to the currently running synthesizers list
static void addSynthEventListener(SynthEventListener synthListener)
          Adds a new SynthEventListener
static java.util.LinkedList<SynthEventListener> getListenerList()
          Returns the list of the SynthEventListeners
static int getNoSynths()
          Method to get the number of running SensorSynthesizer objects
static AbstractSensorSynthesizer getSynthesizer(int number)
          Method to obtain the Synthesizer whose toggle is mapped to the specified channel
static java.util.LinkedList<AbstractSensorSynthesizer> getSynthList()
          Method to obtain the list of the registered synthesizers
static boolean isEngineOn()
          Checks whether the engine is already started
static void powerOffSynthesizer()
          Stops the synthesizer engine
static void powerOnSynthesizer()
          Starts the synthesizer engine
static void removeAllSynthesizers()
          Removes all the synthesizer objects from the engine
static void removeSynthesizer(AbstractSensorSynthesizer ss)
          Removes the specified synthesizer object from the currently running synthesizers list
static void removeSynthEventListener(SynthEventListener synthListener)
          Removes a specific SynthEventListener object from the list
static void stopAllSynthesizers()
          Stops all the synthesizers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynthEngine

public SynthEngine()
Method Detail

isEngineOn

public static boolean isEngineOn()
Checks whether the engine is already started

Returns:
A boolean value indicating whether the engine is already on

powerOnSynthesizer

public static void powerOnSynthesizer()
Starts the synthesizer engine


powerOffSynthesizer

public static void powerOffSynthesizer()
Stops the synthesizer engine


addSynthesizer

public static void addSynthesizer(AbstractSensorSynthesizer ss)
Adds a synthesizer object to the currently running synthesizers list

Parameters:
ss - The SensorSynthesizer object to be added

removeSynthesizer

public static void removeSynthesizer(AbstractSensorSynthesizer ss)
Removes the specified synthesizer object from the currently running synthesizers list

Parameters:
ss - The SensorSynthesizer object to be removed

removeAllSynthesizers

public static void removeAllSynthesizers()
Removes all the synthesizer objects from the engine


stopAllSynthesizers

public static void stopAllSynthesizers()
Stops all the synthesizers


getNoSynths

public static int getNoSynths()
Method to get the number of running SensorSynthesizer objects

Returns:
The number of the active SensorSynthesizer objects

getSynthList

public static java.util.LinkedList<AbstractSensorSynthesizer> getSynthList()
Method to obtain the list of the registered synthesizers

Returns:
A LinkedList of the active synthesizers

getSynthesizer

public static AbstractSensorSynthesizer getSynthesizer(int number)
Method to obtain the Synthesizer whose toggle is mapped to the specified channel

Parameters:
channel - The channel which functions as the toggle on/off for the synthesizer
Returns:
The synthesizer object, null if no synthesizer is found on the specified channel

getListenerList

public static java.util.LinkedList<SynthEventListener> getListenerList()
Returns the list of the SynthEventListeners

Returns:
A LinkedList of the SynthEventListener objects registered

addSynthEventListener

public static void addSynthEventListener(SynthEventListener synthListener)
Adds a new SynthEventListener

Parameters:
synthListener - The SynthEventListener object to be added

removeSynthEventListener

public static void removeSynthEventListener(SynthEventListener synthListener)
Removes a specific SynthEventListener object from the list

Parameters:
synthListener - The SynthEventListener object to be removed