jmri.jmrit.audio
Class DefaultAudioManager

Show UML class diagram
java.lang.Object
  extended by jmri.managers.AbstractManager
      extended by jmri.managers.AbstractAudioManager
          extended by jmri.jmrit.audio.DefaultAudioManager
All Implemented Interfaces:
PropertyChangeListener, EventListener, AudioManager, Manager

public class DefaultAudioManager
extends AbstractAudioManager

Provide the concrete implementation for the Internal Audio Manager.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Field Summary
(package private)  ShutDownTask audioShutDownTask
           
 
Fields inherited from class jmri.managers.AbstractManager
_tsys, _tuser
 
Fields inherited from interface jmri.AudioManager
MAX_BUFFERS, MAX_LISTENERS, MAX_SOURCES
 
Fields inherited from interface jmri.Manager
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXS, MEMORIES, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
 
Constructor Summary
DefaultAudioManager()
           
 
Method Summary
 void cleanUp()
          Perform any clean-up operations
protected  Audio createNewAudio(String systemName, String userName)
          Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.
 void deregister(NamedBean s)
          Forget a NamedBean Object created outside the manager.
 AudioFactory getActiveAudioFactory()
          Returns the currently active AudioFactory object.
 List<String> getSystemNameList(char subType)
          Get a list of specified Audio sub-type objects' system names.
 List<String> getSystemNameList(int subType)
          Deprecated. 
 String getSystemPrefix()
          Provides access to the system prefix string.
 int getXMLOrder()
           
 void init()
          Method used to initialise the manager
static DefaultAudioManager instance()
          Return the current instance of this object.
 
Methods inherited from class jmri.managers.AbstractAudioManager
getAudio, getBySystemName, getByUserName, newAudio, provideAudio, typeLetter
 
Methods inherited from class jmri.managers.AbstractManager
addPropertyChangeListener, dispose, firePropertyChange, getBeanBySystemName, getBeanByUserName, getInstanceBySystemName, getInstanceByUserName, getNamedBean, getNamedBeanList, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, registerSelf, removePropertyChangeListener, systemLetter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.AudioManager
getSystemNameList
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, dispose, getBeanBySystemName, getBeanByUserName, getNamedBean, getNamedBeanList, getSystemNameArray, makeSystemName, register, removePropertyChangeListener, systemLetter
 

Field Detail

audioShutDownTask

ShutDownTask audioShutDownTask
Constructor Detail

DefaultAudioManager

public DefaultAudioManager()
Method Detail

getXMLOrder

public int getXMLOrder()
Specified by:
getXMLOrder in interface Manager
Specified by:
getXMLOrder in class AbstractManager

getSystemPrefix

public String getSystemPrefix()
Description copied from interface: Manager
Provides access to the system prefix string. This was previously called the "System letter"


createNewAudio

protected Audio createNewAudio(String systemName,
                               String userName)
                        throws AudioException
Description copied from class: AbstractAudioManager
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.

Specified by:
createNewAudio in class AbstractAudioManager
Parameters:
systemName - Audio object system name (e.g. IAS1, IAB4)
userName - Audio object user name
Returns:
never null
Throws:
AudioException - if error occurs during creation

getSystemNameList

@Deprecated
public List<String> getSystemNameList(int subType)
Deprecated. 

Description copied from interface: AudioManager
Get a list of specified Audio sub-type objects' system names.

Parameters:
subType - sub-type to retrieve
Returns:
List of specified Audio sub-type objects' system names.

getSystemNameList

public List<String> getSystemNameList(char subType)
Description copied from interface: AudioManager
Get a list of specified Audio sub-type objects' system names.

Parameters:
subType - sub-type to retrieve
Returns:
List of specified Audio sub-type objects' system names.

init

public void init()
Method used to initialise the manager


deregister

public void deregister(NamedBean s)
Description copied from class: AbstractManager
Forget a NamedBean Object created outside the manager.

The non-system-specific RouteManager uses this method.

Specified by:
deregister in interface Manager
Overrides:
deregister in class AbstractManager

cleanUp

public void cleanUp()
Description copied from interface: AudioManager
Perform any clean-up operations


getActiveAudioFactory

public AudioFactory getActiveAudioFactory()
Description copied from interface: AudioManager
Returns the currently active AudioFactory object.

An Audio factory is responsible for the creation of implementation specific audio objects.

Returns:
current active AudioFactory object

instance

public static DefaultAudioManager instance()
Return the current instance of this object.

If not existing, create a new instance.

Returns:
reference to currently active AudioManager


Copyright © 1997-2014 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads