|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpeechEventExecutor
Interface for objects that execute Runnable
objects.
The SpeechEventExecutor
provides flexibility
to merge SpeechEvent
s with other event queues.
The general intent is that execution can be asynchronous, or at least independent of the caller. For example, one of the simplest implementations of execute is
new Thread(command).start();
For example uses of this interface to integrate speech events with
lcdui or Swing events, see
setSpeechEventExecutor
.
This interface is compatible with more complete implementations that employ queuing or pooling, or perform additional bookkeeping. For example, see JSR-166 for J2SE. Java 2 Platform SE 5.0 defines a compatible interface.
Method Summary | |
---|---|
void |
execute(Runnable command)
Executes the given command. |
Method Detail |
---|
void execute(Runnable command) throws IllegalStateException, NullPointerException
The method is defined not to throw any checked exceptions during execution of the command. Generally, any problems encountered will be asynchronous and so must be dealt with via callbacks or error handler objects. If necessary, any context-dependent catastrophic errors encountered during actions that arrange for execution could be accompanied by throwing context-dependent unchecked exceptions.
command
- the command to execute on a thread
IllegalStateException
- if this task cannot be accepted for execution
NullPointerException
- if command is null
|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.