edu.cmu.sphinx.instrumentation
Class ConfigMonitor

java.lang.Object
  extended byedu.cmu.sphinx.instrumentation.ConfigMonitor
All Implemented Interfaces:
Configurable, java.lang.Runnable

public class ConfigMonitor
extends java.lang.Object
implements Configurable, java.lang.Runnable

Shows the configuration currently in use. This monitor is typically added as a recognition monitor such that the configuration is shown immediately after the recognizer is allocated.


Field Summary
static java.lang.String PROP_SAVE_CONFIG_AS_XML
          Sphinx property that is used to indicate whether or not this monitor should save the configuration in an XML document
static boolean PROP_SAVE_CONFIG_AS_XML_DEFAULT
          The default value for PROP_SAVE_CONFIG_AS_XML
static java.lang.String PROP_SHOW_CONFIG
          Sphinx property that is used to indicate whether or not this monitor should show the current configuration.
static java.lang.String PROP_SHOW_CONFIG_AS_GDL
          Sphinx property that is used to indicate whether or not this monitor should dump the configuration in an GDL document
static boolean PROP_SHOW_CONFIG_AS_GDL_DEFAULT
          The default value for PROP_SHOW_CONFIG_AS_GDL_DEFAULT
static java.lang.String PROP_SHOW_CONFIG_AS_HTML
          Sphinx property that is used to indicate whether or not this monitor should dump the configuration in an HTML document
static boolean PROP_SHOW_CONFIG_AS_HTML_DEFAULT
          The default value for PROP_SHOW_CONFIG_AS_HTML_DEFAULT
static boolean PROP_SHOW_CONFIG_DEFAULT
          The default value for PROP_SHOW_CONFIG
 
Constructor Summary
ConfigMonitor()
           
 
Method Summary
 java.lang.String getName()
          Retrieves the name for this configurable component
 void newProperties(PropertySheet ps)
          This method is called when this configurable component has new data.
 void register(java.lang.String name, Registry registry)
          Register my properties.
 void run()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SHOW_CONFIG

public static final java.lang.String PROP_SHOW_CONFIG
Sphinx property that is used to indicate whether or not this monitor should show the current configuration.

See Also:
Constant Field Values

PROP_SHOW_CONFIG_DEFAULT

public static final boolean PROP_SHOW_CONFIG_DEFAULT
The default value for PROP_SHOW_CONFIG

See Also:
Constant Field Values

PROP_SHOW_CONFIG_AS_HTML

public static final java.lang.String PROP_SHOW_CONFIG_AS_HTML
Sphinx property that is used to indicate whether or not this monitor should dump the configuration in an HTML document

See Also:
Constant Field Values

PROP_SHOW_CONFIG_AS_HTML_DEFAULT

public static final boolean PROP_SHOW_CONFIG_AS_HTML_DEFAULT
The default value for PROP_SHOW_CONFIG_AS_HTML_DEFAULT

See Also:
Constant Field Values

PROP_SHOW_CONFIG_AS_GDL

public static final java.lang.String PROP_SHOW_CONFIG_AS_GDL
Sphinx property that is used to indicate whether or not this monitor should dump the configuration in an GDL document

See Also:
Constant Field Values

PROP_SHOW_CONFIG_AS_GDL_DEFAULT

public static final boolean PROP_SHOW_CONFIG_AS_GDL_DEFAULT
The default value for PROP_SHOW_CONFIG_AS_GDL_DEFAULT

See Also:
Constant Field Values

PROP_SAVE_CONFIG_AS_XML

public static final java.lang.String PROP_SAVE_CONFIG_AS_XML
Sphinx property that is used to indicate whether or not this monitor should save the configuration in an XML document

See Also:
Constant Field Values

PROP_SAVE_CONFIG_AS_XML_DEFAULT

public static final boolean PROP_SAVE_CONFIG_AS_XML_DEFAULT
The default value for PROP_SAVE_CONFIG_AS_XML

See Also:
Constant Field Values
Constructor Detail

ConfigMonitor

public ConfigMonitor()
Method Detail

register

public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Description copied from interface: Configurable
Register my properties. This method is called once early in the time of the component, shortly after the component is constructed. This component should register any configuration properties that it needs to register. If this configurable extends another configurable, super.register should also be called

Specified by:
register in interface Configurable
Parameters:
name - the name of the component
registry - the registry for this component
Throws:
PropertyException

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component has new data. The component should first validate the data. If it is bad the component should return false. If the data is good, the component should record the the data internally and return true.

Specified by:
newProperties in interface Configurable
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

getName

public java.lang.String getName()
Description copied from interface: Configurable
Retrieves the name for this configurable component

Specified by:
getName in interface Configurable
Returns:
the name

run

public void run()
Specified by:
run in interface java.lang.Runnable