当前位置: 首页>>代码示例>>Java>>正文


Java SessionEndedRequest类代码示例

本文整理汇总了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));
}
 
开发者ID:kebernet,项目名称:skillz,代码行数:23,代码来源:SimpleSpeechletInvocationTests.java

示例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
}
 
开发者ID:arun-gupta,项目名称:alexa-skill-java,代码行数:8,代码来源:HelloWorldSpeechlet.java

示例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
}
 
开发者ID:jneong,项目名称:CS370_Echo_Demo,代码行数:8,代码来源:TemplateBaseSkillSpeechlet.java

示例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();
}
 
开发者ID:KayLerch,项目名称:alexa-skills-kit-tester-java,代码行数:10,代码来源:AlexaSessionEndedRequest.java

示例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
}
 
开发者ID:bellissimo,项目名称:AlexaSky,代码行数:8,代码来源:SkySpeechlet.java

示例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
}
 
开发者ID:beckdac,项目名称:alexa_domoticz_bridge,代码行数:9,代码来源:DomoticzSpeechlet.java

示例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());
}
 
开发者ID:vqtran,项目名称:EchoQuery,代码行数:8,代码来源:EchoQuerySpeechlet.java

示例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());
}
 
开发者ID:fabric8io,项目名称:kubernetes-alexa,代码行数:4,代码来源:RequestDispatcher.java

示例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;
}
 
开发者ID:comtel2000,项目名称:fritz-home-skill,代码行数:6,代码来源:FritzHomeSpeechlet.java

示例10: onSessionEnded

import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
void onSessionEnded(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope);
 
开发者ID:nitroventures,项目名称:bot4j,代码行数:3,代码来源:Bot4jSpeechlet.java

示例11: onSessionEnded

import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(final SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope) {
}
 
开发者ID:nitroventures,项目名称:bot4j,代码行数:4,代码来源:Bot4jSpeechletImpl.java

示例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);
  }
}
 
开发者ID:rainu,项目名称:alexa-skill,代码行数:7,代码来源:SpeechletServletDispatcher.java

示例13: onSessionEnded

import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
@Override
public void onSessionEnded(SessionEndedRequest request, Session session) throws SpeechletException {
	// Do nothing
}
 
开发者ID:speedyllama,项目名称:nyctransit,代码行数:5,代码来源:MTAStatusSpeechlet.java

示例14: AlexaSessionEndedRequest

import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
public AlexaSessionEndedRequest(final AlexaSession actor) {
    this(actor, SessionEndedRequest.Reason.USER_INITIATED);
}
 
开发者ID:KayLerch,项目名称:alexa-skills-kit-tester-java,代码行数:4,代码来源:AlexaSessionEndedRequest.java

示例15: endSession

import com.amazon.speech.speechlet.SessionEndedRequest; //导入依赖的package包/类
public void endSession() {
    endSession(SessionEndedRequest.Reason.USER_INITIATED);
}
 
开发者ID:KayLerch,项目名称:alexa-skills-kit-tester-java,代码行数:4,代码来源:AlexaSession.java


注:本文中的com.amazon.speech.speechlet.SessionEndedRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。