AlexaClientSDK  1.23.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::acl::ExchangeHandlerContextInterface Class Referenceabstract

#include <ExchangeHandlerContextInterface.h>

Inheritance diagram for alexaClientSDK::acl::ExchangeHandlerContextInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~ExchangeHandlerContextInterface ()=default
 
virtual void onDownchannelConnected ()=0
 
virtual void onDownchannelFinished ()=0
 
virtual void onMessageRequestSent (const std::shared_ptr< avsCommon::avs::MessageRequest > &request)=0
 
virtual void onMessageRequestTimeout ()=0
 
virtual void onMessageRequestAcknowledged (const std::shared_ptr< avsCommon::avs::MessageRequest > &request)=0
 
virtual void onMessageRequestFinished ()=0
 
virtual void onPingRequestAcknowledged (bool success)=0
 
virtual void onPingTimeout ()=0
 
virtual void onActivity ()=0
 
virtual void onForbidden (const std::string &authToken="")=0
 
virtual std::shared_ptr< avsCommon::utils::http2::HTTP2RequestInterfacecreateAndSendRequest (const avsCommon::utils::http2::HTTP2RequestConfig &cfg)=0
 
virtual std::string getAVSGateway ()=0
 

Detailed Description

Interface providing context that an ExchangeHandler operates within.

Constructor & Destructor Documentation

◆ ~ExchangeHandlerContextInterface()

virtual alexaClientSDK::acl::ExchangeHandlerContextInterface::~ExchangeHandlerContextInterface ( )
virtualdefault

Destructor

Member Function Documentation

◆ createAndSendRequest()

virtual std::shared_ptr<avsCommon::utils::http2::HTTP2RequestInterface> alexaClientSDK::acl::ExchangeHandlerContextInterface::createAndSendRequest ( const avsCommon::utils::http2::HTTP2RequestConfig cfg)
pure virtual

Create an HTTP2Request for this HTTP2Transport.

Parameters
cfgThe configuration object which defines the request.
Returns
The new instance of HTTP2RequestInterface, or nullptr if the operation failed.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ getAVSGateway()

virtual std::string alexaClientSDK::acl::ExchangeHandlerContextInterface::getAVSGateway ( )
pure virtual

◆ onActivity()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onActivity ( )
pure virtual

Notification of network activity between this client and AVS. (this is used to detect sustained inactivity requiring the send of a ping).

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onDownchannelConnected()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onDownchannelConnected ( )
pure virtual

Notification that the downchannel has been established.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onDownchannelFinished()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onDownchannelFinished ( )
pure virtual

Notification that the downchannel has failed to be established or has disconnected.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onForbidden()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onForbidden ( const std::string &  authToken = "")
pure virtual

Notification that a request received a FORBIDDEN (403) response.

Parameters
authTokenThe auth token used for the forbidden request or an empty string if the token is not specified.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onMessageRequestAcknowledged()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onMessageRequestAcknowledged ( const std::shared_ptr< avsCommon::avs::MessageRequest > &  request)
pure virtual

Notification that sending a MessageRequest has failed or been acknowledged by AVS (this is used to indicate it is okay to send the next message).

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onMessageRequestFinished()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onMessageRequestFinished ( )
pure virtual

Notification tht a message request has finished it's exchange with AVS.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onMessageRequestSent()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onMessageRequestSent ( const std::shared_ptr< avsCommon::avs::MessageRequest > &  request)
pure virtual

Notification that an MessageRequest has been sent.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onMessageRequestTimeout()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onMessageRequestTimeout ( )
pure virtual

Notification that sending a message request timed out.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onPingRequestAcknowledged()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onPingRequestAcknowledged ( bool  success)
pure virtual

Notification that sending a ping to AVS has failed or been acknowledged by AVS.

Parameters
successWhether the ping was acknowledged successfully.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.

◆ onPingTimeout()

virtual void alexaClientSDK::acl::ExchangeHandlerContextInterface::onPingTimeout ( )
pure virtual

Notification that a ping request timed out.

Implemented in alexaClientSDK::acl::HTTP2Transport, and alexaClientSDK::acl::transport::test::MockExchangeHandlerContext.


The documentation for this class was generated from the following file:

AlexaClientSDK 1.23.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0