jmri.jmrit.audio
Class AudioCommandThread

java.lang.Object
  extended by java.lang.Thread
      extended by jmri.jmrit.audio.AbstractAudioThread
          extended by jmri.jmrit.audio.AudioCommandThread
All Implemented Interfaces:
Runnable, AudioThread

public class AudioCommandThread
extends AbstractAudioThread

Represents a thread for processing commands contained within AudioCommand objects. All commands are processed in the order in which thet were queued


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.

Author:
Matthew Harris copyright (c) 2009

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface jmri.jmrit.audio.AudioThread
GET, NA, SET
 
Constructor Summary
AudioCommandThread(AudioFactory activeAudioFactory)
          Constructor that takes handle to current active audio factory object
 
Method Summary
protected  void cleanup()
          Shuts this thread down and clears references to created objects
 void run()
          Main loop for processing commands.
 
Methods inherited from class jmri.jmrit.audio.AbstractAudioThread
alive, die, dying, snooze
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AudioCommandThread

public AudioCommandThread(AudioFactory activeAudioFactory)
Constructor that takes handle to current active audio factory object

Parameters:
activeAudioFactory - handle to activeAudioFactory
Method Detail

run

public void run()
Main loop for processing commands. Starts out asleep, and also sleeps once finished processing commands, so must be interrupted to process any queued commands.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

cleanup

protected void cleanup()
Shuts this thread down and clears references to created objects

Overrides:
cleanup in class AbstractAudioThread


Copyright © 1997 - 2011 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