org.robokind.impl.speech
Class JMSSpeechService
java.lang.Object
org.robokind.api.common.playable.AbstractPlayable
org.robokind.impl.messaging.RemoteServiceFacade<org.robokind.avrogen.speech.SpeechConfigRecord>
org.robokind.impl.speech.JMSSpeechService
- All Implemented Interfaces:
- org.robokind.api.common.playable.Playable, org.robokind.api.messaging.RemoteService<org.robokind.avrogen.speech.SpeechConfigRecord>, org.robokind.api.speech.SpeechService
public class JMSSpeechService
- extends org.robokind.impl.messaging.RemoteServiceFacade<org.robokind.avrogen.speech.SpeechConfigRecord>
- implements org.robokind.api.speech.SpeechService
- Author:
- Matthew Stevenson
Fields inherited from class org.robokind.impl.messaging.RemoteServiceFacade |
COMMAND_MIME_TYPE, CONFIG_MIME_TYPE |
Fields inherited from class org.robokind.api.common.playable.AbstractPlayable |
myElapsedPauseTime, myPauseTime, myPlayableListeners, myPlayState, myResumeTime, myStartTime, myStopTime |
Constructor Summary |
JMSSpeechService(javax.jms.Session session,
javax.jms.Destination cmdDest,
javax.jms.Destination errDest,
javax.jms.Destination requestDest,
javax.jms.Destination eventDest)
Connects to a remote SpeechService through JMS and Avro |
Method Summary |
void |
addRequestListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechRequest> listener)
|
void |
addSpeechEventListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechEventList> listener)
|
void |
close()
|
void |
initialize(org.robokind.avrogen.speech.SpeechConfigRecord config)
|
void |
removeRequestListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechRequest> listener)
|
void |
removeSpeechEventListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechEventList> listener)
|
void |
speak(String text)
|
void |
start()
|
Methods inherited from class org.robokind.impl.messaging.RemoteServiceFacade |
getConfigClass, getReusableConfig, onComplete, onPause, onResume, onStart, onStop, send, sendCommand, setReceiver, setSender, setSession |
Methods inherited from class org.robokind.api.common.playable.AbstractPlayable |
addPlayableListener, afterComplete, complete, firePlayStateChanged, getElapsedPauseTime, getElapsedPlayTime, getPauseTime, getPlayState, getResumeTime, getStartTime, getStopTime, pause, removePlayableListener, resume, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.robokind.api.common.playable.Playable |
addPlayableListener, complete, getElapsedPauseTime, getElapsedPlayTime, getPauseTime, getPlayState, getResumeTime, getStartTime, getStopTime, pause, removePlayableListener, resume, start, stop |
JMSSpeechService
public JMSSpeechService(javax.jms.Session session,
javax.jms.Destination cmdDest,
javax.jms.Destination errDest,
javax.jms.Destination requestDest,
javax.jms.Destination eventDest)
throws Exception
- Connects to a remote SpeechService through JMS and Avro
- Parameters:
session
- JMS Session to usecmdDest
- JMS Destination for sending service commandserrDest
- JMS Destination for receiving service errorsrequestDest
- JMS Destination for sending SpeechRequestseventDest
- JMS Destination for receiving SpeechEvents
- Throws:
NullPointerException
- if an argument is null
Exception
- if there is an error connecting
initialize
public void initialize(org.robokind.avrogen.speech.SpeechConfigRecord config)
throws IOException,
javax.jms.JMSException,
Exception
- Specified by:
initialize
in interface org.robokind.api.messaging.RemoteService<org.robokind.avrogen.speech.SpeechConfigRecord>
- Overrides:
initialize
in class org.robokind.impl.messaging.RemoteServiceFacade<org.robokind.avrogen.speech.SpeechConfigRecord>
- Throws:
IOException
javax.jms.JMSException
Exception
start
public void start()
throws Exception
- Specified by:
start
in interface org.robokind.api.speech.SpeechService
- Throws:
Exception
speak
public void speak(String text)
- Specified by:
speak
in interface org.robokind.api.speech.SpeechService
close
public void close()
- Specified by:
close
in interface org.robokind.api.speech.SpeechService
addRequestListener
public void addRequestListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechRequest> listener)
- Specified by:
addRequestListener
in interface org.robokind.api.speech.SpeechService
removeRequestListener
public void removeRequestListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechRequest> listener)
- Specified by:
removeRequestListener
in interface org.robokind.api.speech.SpeechService
addSpeechEventListener
public void addSpeechEventListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechEventList> listener)
- Specified by:
addSpeechEventListener
in interface org.robokind.api.speech.SpeechService
removeSpeechEventListener
public void removeSpeechEventListener(org.robokind.api.common.utils.Listener<org.robokind.api.speech.SpeechEventList> listener)
- Specified by:
removeSpeechEventListener
in interface org.robokind.api.speech.SpeechService
Copyright © 2011. All Rights Reserved.