org.jvoicexml.implementation.jsapi10.jvxml
Class SpokenInputFactory

java.lang.Object
  extended by org.jvoicexml.implementation.jsapi10.jvxml.SpokenInputFactory
All Implemented Interfaces:
ResourceFactory<SpokenInput>

public final class SpokenInputFactory
extends Object
implements ResourceFactory<SpokenInput>

Demo implementation of a ResourceFactory for the SpokenInput based on JSAPI 1.0.

Since:
0.5.5
Version:
$Revision: 172 $

Copyright © 2006 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Constructor Summary
SpokenInputFactory()
          Constructs a new object.
 
Method Summary
 SpokenInput createResource()
          Factory method to create a resource.
 RecognizerModeDesc getEngineProperties()
          Get the required engine properties.
 int getInstances()
          Retrieves the number of instances, that this factory will create using ResourceFactory.createResource().
 String getType()
          Retrieves the type of the resources that are created by this factory.
 void setInstances(int number)
          Sets the number of instances that this factory will create.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpokenInputFactory

public SpokenInputFactory()
Constructs a new object.

Method Detail

createResource

public SpokenInput createResource()
                           throws NoresourceError
Factory method to create a resource.

Specified by:
createResource in interface ResourceFactory<SpokenInput>
Returns:
The created resource.
Throws:
NoresourceError - error creating the requested resource.

setInstances

public void setInstances(int number)
Sets the number of instances that this factory will create.

Parameters:
number - Number of instances to create.

getInstances

public int getInstances()
Retrieves the number of instances, that this factory will create using ResourceFactory.createResource().

Specified by:
getInstances in interface ResourceFactory<SpokenInput>
Returns:
Number of instances.

getType

public String getType()
Retrieves the type of the resources that are created by this factory.

Specified by:
getType in interface ResourceFactory<SpokenInput>
Returns:
Type of this implementation platform.

getEngineProperties

public RecognizerModeDesc getEngineProperties()
Get the required engine properties.

Returns:
Required engine properties or null for default engine selection
Stuff to complete
This is more or less a bogus implementation and has to be replaced, if sphinx4 is more JSAPI compliant.


Copyright © 2005-2007 JVoiceXML group.