Package jmri.jmrit.audio
Class DefaultAudioManager
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.beans.VetoableChangeSupport
jmri.managers.AbstractManager<Audio>
jmri.managers.AbstractAudioManager
jmri.jmrit.audio.DefaultAudioManager
- All Implemented Interfaces:
PropertyChangeListener,VetoableChangeListener,EventListener,AudioManager,PropertyChangeFirer,PropertyChangeProvider,SilenceablePropertyChangeProvider,VetoableChangeFirer,VetoableChangeProvider,Manager<Audio>
Provide the concrete implementation for the Internal Audio Manager.
This file is part of JMRI.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity -
Field Summary
FieldsFields inherited from class jmri.managers.AbstractManager
_beans, _tsys, _tuser, memo, silenceableProperties, silencedPropertiesFields inherited from class jmri.beans.VetoableChangeSupport
vetoableChangeSupportFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupportFields inherited from interface jmri.AudioManager
MAX_BUFFERS, MAX_LISTENERS, MAX_SOURCESFields inherited from interface jmri.Manager
ANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_GLOBAL_VARIABLES, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, PROPERTY_BEANS, PROPERTY_CAN_DELETE, PROPERTY_DISPLAY_LIST_NAME, PROPERTY_DO_DELETE, PROPERTY_DO_NOT_DELETE, PROPERTY_LENGTH, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Perform any clean-up operationsprotected AudiocreateNewAudio(String systemName, String userName) Internal method to invoke the factory, after all the logic for returning an existing Audio has been invoked.voidderegister(Audio s) Forget a NamedBean Object created outside the manager.voiddispose()Free resources when no longer used.Returns the currently active AudioFactory object.getNamedBeanSet(char subType) Get the specified Audio sub-type NamedBeans.intDetermine the order that types should be written when storing panel files.voidinit()Initialise the manager and make connections.booleanDetermine if this AudioManager is initialisedMethods inherited from class jmri.managers.AbstractAudioManager
getAudio, getBeanTypeHandled, getBySystemName, getByUserName, getNamedBeanClass, newAudio, provideAudio, typeLetterMethods inherited from class jmri.managers.AbstractManager
addDataListener, checkNumeric, createSystemName, deleteBean, fireDataListenersAdded, fireDataListenersRemoved, fireVetoableChange, getAutoSystemName, getBySystemName, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getOuterBean, getSystemPrefix, handleUserNameUniqueness, makeSystemName, propertyChange, register, registerSelf, registerUserName, removeDataListener, setDataListenerMute, setPropertyChangesSilenced, updateAutoNumber, validSystemNameFormat, vetoableChangeMethods inherited from class jmri.beans.VetoableChangeSupport
addVetoableChangeListener, addVetoableChangeListener, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListenerMethods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.Manager
addDataListener, deleteBean, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormatMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilencedMethods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
audioShutDownTask
-
-
Constructor Details
-
DefaultAudioManager
-
-
Method Details
-
getXMLOrder
Description copied from interface:ManagerDetermine the order that types should be written when storing panel files. Uses one of the constants defined in this class.Yes, that's an overly-centralized methodology, but it works for now.
- Returns:
- write order for this Manager; larger is later.
-
createNewAudio
Description copied from class:AbstractAudioManagerInternal method to invoke the factory, after all the logic for returning an existing Audio has been invoked.- Specified by:
createNewAudioin classAbstractAudioManager- Parameters:
systemName- Audio object system name (for example IAS1, IAB4)userName- Audio object user name- Returns:
- never null
- Throws:
AudioException- if error occurs during creation
-
getNamedBeanSet
Get the specified Audio sub-type NamedBeans.- Parameters:
subType- sub-type to retrieve- Returns:
- Unmodifiable access to a SortedSet of NamedBeans for the specified Audio sub-type .
-
init
Initialise the manager and make connections. -
isInitialised
Determine if this AudioManager is initialised- Returns:
- true if initialised
-
deregister
Description copied from class:AbstractManagerForget a NamedBean Object created outside the manager.The non-system-specific RouteManager uses this method.
- Specified by:
deregisterin interfaceManager<Audio>- Overrides:
deregisterin classAbstractManager<Audio>- Parameters:
s- the bean
-
cleanup
Description copied from interface:AudioManagerPerform any clean-up operations -
dispose
Description copied from class:AbstractManagerFree resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected. -
getActiveAudioFactory
Description copied from interface:AudioManagerReturns the currently active AudioFactory object.An Audio factory is responsible for the creation of implementation specific audio objects.
- Returns:
- current active AudioFactory object
-