public class AlexaSession extends AlexaActor
| Constructor and Description |
|---|
AlexaSession(AlexaClient client) |
AlexaSession(AlexaClient client,
com.amazon.speech.speechlet.Session session) |
| Modifier and Type | Method and Description |
|---|---|
AlexaResponse |
cancel()
Fires the builtin cancel-intent.
|
AlexaSession |
delay(long millis)
Sleeps for some time to delay the next request.
|
void |
endSession() |
void |
endSession(com.amazon.speech.speechlet.SessionEndedRequest.Reason reason) |
com.amazon.speech.json.SpeechletRequestEnvelope |
envelope(AlexaRequest request)
The method of enveloping a speechlet request is delegated to the actor as he is
the one able to decide how to do it.
|
void |
exploitResponse(AlexaResponse response)
Once a request was made to the skill a response is received.
|
static String |
generateSessionId() |
AlexaResponse |
help()
Fires the builtin help-intent.
|
AlexaResponse |
intent(String intentName)
Fires an intent without any slots.
|
AlexaResponse |
intent(String intentName,
List<com.amazon.speech.slu.Slot> slots)
Fires an intent with zero to many slots
|
AlexaResponse |
intent(String intentName,
Map<String,Object> slots)
Fires an intent with zero to many slots
|
AlexaResponse |
intent(String intentName,
String slotName,
Object slotValue)
Fires an intent with a single slot
|
AlexaResponse |
launch()
Fires a launch request
|
AlexaResponse |
loopOff()
Fires the builtin loop-off-intent.
|
AlexaResponse |
loopOn()
Fires the builtin loop-on-intent.
|
AlexaResponse |
next()
Fires the builtin next-intent.
|
AlexaResponse |
no()
Fires the builtin no-intent.
|
AlexaResponse |
pause()
Fires the builtin pause-intent.
|
AlexaResponse |
previous()
Fires the builtin previous-intent.
|
AlexaResponse |
repeat()
Fires the builtin repeat-intent.
|
AlexaResponse |
resume()
Fires the builtin resume-intent.
|
AlexaResponse |
say(String utterance) |
AlexaResponse |
shuffleOff()
Fires the builtin shuffle-off-intent.
|
AlexaResponse |
shuffleOn()
Fires the builtin shuffle-on-intent.
|
AlexaResponse |
startOver()
Fires the builtin start-over-intent.
|
AlexaResponse |
stop()
Fires the builtin stop-intent.
|
AlexaResponse |
yes()
Fires the builtin yes-intent.
|
getClientpublic AlexaSession(AlexaClient client, com.amazon.speech.speechlet.Session session)
public AlexaSession(AlexaClient client)
public static String generateSessionId()
public com.amazon.speech.json.SpeechletRequestEnvelope envelope(AlexaRequest request)
AlexaActorenvelope in class AlexaActorrequest - the request that needs an envelopmentpublic void exploitResponse(AlexaResponse response)
AlexaActorexploitResponse in class AlexaActorresponse - the response to exploitpublic AlexaResponse intent(String intentName)
intentName - name of the intentpublic AlexaResponse intent(String intentName, String slotName, Object slotValue)
intentName - name of the intentslotName - name of the slotslotValue - value of the slotpublic AlexaResponse intent(String intentName, Map<String,Object> slots)
intentName - name of the intentslots - collection of slotspublic AlexaResponse intent(String intentName, List<com.amazon.speech.slu.Slot> slots)
intentName - name of the intentslots - collection of slotspublic AlexaResponse say(String utterance)
public AlexaResponse launch()
public AlexaResponse repeat()
public AlexaResponse yes()
public AlexaResponse no()
public AlexaResponse cancel()
public AlexaResponse stop()
public AlexaResponse startOver()
public AlexaResponse next()
public AlexaResponse previous()
public AlexaResponse pause()
public AlexaResponse resume()
public AlexaResponse shuffleOn()
public AlexaResponse shuffleOff()
public AlexaResponse loopOn()
public AlexaResponse loopOff()
public AlexaResponse help()
public AlexaSession delay(long millis)
millis - milliseconds to sleeppublic void endSession()
public void endSession(com.amazon.speech.speechlet.SessionEndedRequest.Reason reason)
Copyright © 2018. All rights reserved.