本文整理汇总了Java中com.amazon.speech.speechlet.SessionEndedRequest类的典型用法代码示例。如果您正苦于以下问题:Java SessionEndedRequest类的具体用法?Java SessionEndedRequest怎么用?Java SessionEndedRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SessionEndedRequest类属于com.amazon.speech.speechlet包,在下文中一共展示了SessionEndedRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Test
public void onSessionEnded() throws Exception {
IntrospectionData data = registry.getDataForPath("/invoked").orElseThrow(RuntimeException::new);
final ArrayListMultimap<String, InvokableMethod> methods = ArrayListMultimap.create();
data.getMethods().forEach(m->methods.put(m.getName(), m));
InvokedTestSkill skill = new InvokedTestSkill();
DynamicSpeechlet speechlet = new DynamicSpeechlet(methods, data, new FormatterMappings(),
registry, skill, new DefaultTypeFactory());
SessionEndedRequest request = SessionEndedRequest.builder()
.withRequestId("id")
.withReason(SessionEndedRequest.Reason.USER_INITIATED)
.withTimestamp(new Date()).build();
Stopwatch stopwatch = Stopwatch.createStarted();
speechlet.onSessionEnded(request, session);
Logger.getAnonymousLogger().info("onSessionEnded complete in "+stopwatch.elapsed(TimeUnit.MILLISECONDS));
assertTrue(skill.onSessionEnded.get());
stopwatch = Stopwatch.createStarted();
speechlet.onSessionEnded(request, session);
Logger.getAnonymousLogger().info("onSessionEnded, second run complete in "+stopwatch.elapsed(TimeUnit.MILLISECONDS));
}
示例2: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SessionEndedRequest request, final Session session)
throws SpeechletException {
log.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(),
session.getSessionId());
// any cleanup logic goes here
}
示例3: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SessionEndedRequest request, final Session session)
throws SpeechletException {
log.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(),
session.getSessionId());
// any session cleanup logic would go here
}
示例4: getSpeechletRequest
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public SpeechletRequest getSpeechletRequest() {
return SessionEndedRequest.builder()
.withRequestId(generateRequestId())
.withTimestamp(session.getClient().getCurrentTimestamp())
.withReason(reason)
.withLocale(session.getClient().getLocale())
.build();
}
示例5: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SessionEndedRequest request, final Session session)
throws SpeechletException {
log.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(),
session.getSessionId());
// any cleanup logic goes here
}
示例6: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SessionEndedRequest request, final Session session)
throws SpeechletException {
log.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(),
session.getSessionId());
// any cleanup logic goes here
}
示例7: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(
final SessionEndedRequest request, final Session session)
throws SpeechletException {
log.info("onSessionEnded requestId={}, sessionId={}",
request.getRequestId(), session.getSessionId());
}
示例8: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
public void onSessionEnded(SessionEndedRequest request, Session session) throws SpeechletException {
LOGGER.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(), session.getSessionId());
}
示例9: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SessionEndedRequest request, final Session session) throws SpeechletException {
logger.info("onSessionEnded requestId={}, sessionId={}", request.getRequestId(), session.getSessionId());
service = null;
}
示例10: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
void onSessionEnded(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope);
示例11: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope) {
}
示例12: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(SpeechletRequestEnvelope<SessionEndedRequest> req) {
for(SpeechletHandler<OnSessionEnded> endHandler : handler.onSessionEnded) {
call(endHandler, req);
}
}
示例13: onSessionEnded
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(SessionEndedRequest request, Session session) throws SpeechletException {
// Do nothing
}
示例14: AlexaSessionEndedRequest
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
public AlexaSessionEndedRequest(final AlexaSession actor) {
this(actor, SessionEndedRequest.Reason.USER_INITIATED);
}
示例15: endSession
import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
public void endSession() {
endSession(SessionEndedRequest.Reason.USER_INITIATED);
}