org.robokind.impl.speech
Class PortableSpeechRequest

java.lang.Object
  extended by org.robokind.impl.speech.PortableSpeechRequest
All Implemented Interfaces:
SpeechRequest

public class PortableSpeechRequest
extends Object
implements SpeechRequest

SpeechRequest implementation wrapping a SpeechRequestRecord.

Author:
Matthew Stevenson

Nested Class Summary
static class PortableSpeechRequest.Factory
           
static class PortableSpeechRequest.MessageRecordAdapter
           
static class PortableSpeechRequest.RecordMessageAdapter
           
 
Constructor Summary
PortableSpeechRequest(SpeechRequest req)
          Creates a PortableSpeechRequest from another SpeechRequest.
PortableSpeechRequest(SpeechRequestRecord record)
          Creates a new PortableSpeechRequest from the given Record.
PortableSpeechRequest(String speechServiceId, String requestSourceId, long timestampMillisecUTC, String phrase)
          Creates a new PortableSpeechRequest.
 
Method Summary
 String getPhrase()
           
 SpeechRequestRecord getRecord()
          Returns the underlying SpeechRequestRecord.
 String getRequestSourceId()
           
 String getSpeechServiceId()
           
 long getTimestampMillisecUTC()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortableSpeechRequest

public PortableSpeechRequest(SpeechRequestRecord record)
Creates a new PortableSpeechRequest from the given Record.

Parameters:
record - SpeechRequestRecord to wrap

PortableSpeechRequest

public PortableSpeechRequest(String speechServiceId,
                             String requestSourceId,
                             long timestampMillisecUTC,
                             String phrase)
Creates a new PortableSpeechRequest.

Parameters:
speechServiceId - id String of the SpeechService
requestSourceId - id String of the SpeechRequest source
timestampMillisecUTC - speech request timestamp
phrase -

PortableSpeechRequest

public PortableSpeechRequest(SpeechRequest req)
Creates a PortableSpeechRequest from another SpeechRequest. If the given SpeechRequest is a PortableSpeechRequest, the Record is simply copied. Otherwise, a new REcord is created and populated from the given request.

Parameters:
req - SpeechRequest to copy
Method Detail

getRecord

public SpeechRequestRecord getRecord()
Returns the underlying SpeechRequestRecord.

Returns:
underlying SpeechRequestRecord

getSpeechServiceId

public String getSpeechServiceId()
Specified by:
getSpeechServiceId in interface SpeechRequest

getRequestSourceId

public String getRequestSourceId()
Specified by:
getRequestSourceId in interface SpeechRequest

getTimestampMillisecUTC

public long getTimestampMillisecUTC()
Specified by:
getTimestampMillisecUTC in interface SpeechRequest

getPhrase

public String getPhrase()
Specified by:
getPhrase in interface SpeechRequest


Copyright © 2011-2012. All Rights Reserved.