001package jmri.jmrit.audio; 002 003/** 004 * Interface defining public methods and variables used in AudioThread classes 005 * <hr> 006 * This file is part of JMRI. 007 * <p> 008 * JMRI is free software; you can redistribute it and/or modify it under the 009 * terms of version 2 of the GNU General Public License as published by the Free 010 * Software Foundation. See the "COPYING" file for a copy of this license. 011 * <p> 012 * JMRI is distributed in the hope that it will be useful, but WITHOUT ANY 013 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 014 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. 015 * 016 * @author Matthew Harris copyright (c) 2009 017 */ 018public interface AudioThread extends Runnable { 019 020 /** 021 * Used to return value from synchronised boolean methods 022 */ 023 boolean GET = false; 024 025 /** 026 * Used to set value in synchronised boolean methods 027 */ 028 boolean SET = true; 029 030 /** 031 * Used as parameter when returning value from synchronised boolean methods 032 */ 033 boolean NA = false; 034 035 /** 036 * Checks if the thread is still alive (or in the process of shutting down) 037 * <p> 038 * Once cleanup has finished, this should return False 039 * 040 * @return true, while thread is alive; false, when all cleanup has finished 041 */ 042 boolean isThreadAlive(); 043 044 /** 045 * Method used to tell the thread that it should shutdown 046 */ 047 void die(); 048 049}