AlexaClientSDK  1.22.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Attributes | List of all members
alexaClientSDK::acl::test::TestableMessageRouter Class Reference

#include <MessageRouterTest.h>

Inheritance diagram for alexaClientSDK::acl::test::TestableMessageRouter:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acl::test::TestableMessageRouter:
Collaboration graph
[legend]

Public Member Functions

 TestableMessageRouter (std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, std::shared_ptr< AttachmentManagerInterface > attachmentManager, std::shared_ptr< TransportFactoryInterface > factory, const std::string &avsGateway)
 
bool isExecutorReady (std::chrono::milliseconds millisecondsToWait)
 
- Public Member Functions inherited from alexaClientSDK::acl::MessageRouter
 MessageRouter (std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate, std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > attachmentManager, std::shared_ptr< TransportFactoryInterface > transportFactory, const std::string &avsGateway="", int engineType=avsCommon::sdkInterfaces::ENGINE_TYPE_ALEXA_VOICE_SERVICES, std::chrono::milliseconds serverSideDisconnectGracePeriod=DEFAULT_SERVER_SIDE_DISCONNECT_GRACE_PERIOD)
 
void onConnected (std::shared_ptr< TransportInterface > transport) override
 
void onDisconnected (std::shared_ptr< TransportInterface > transport, avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::ChangedReason reason) override
 
void onServerSideDisconnect (std::shared_ptr< TransportInterface > transport) override
 
void consumeMessage (const std::string &contextId, const std::string &message) override
 
void doShutdown () override
 
void enable () override
 
void disable () override
 
ConnectionStatus getConnectionStatus () override
 
void sendMessage (std::shared_ptr< avsCommon::avs::MessageRequest > request) override
 
void setAVSGateway (const std::string &avsGateway) override
 
std::string getAVSGateway () override
 
void onWakeConnectionRetry () override
 
void onWakeVerifyConnectivity () override
 
void setObserver (std::shared_ptr< MessageRouterObserverInterface > observer) override
 
- Public Member Functions inherited from alexaClientSDK::acl::MessageRouterInterface
 MessageRouterInterface (const std::string &name)
 
virtual ~MessageRouterInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::MessageSenderInterface
virtual ~MessageSenderInterface ()=default
 Destructor. More...
 
virtual void sendMessage (std::shared_ptr< avs::MessageRequest > request)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 
- Public Member Functions inherited from alexaClientSDK::acl::TransportObserverInterface
virtual ~TransportObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::acl::MessageConsumerInterface
virtual ~MessageConsumerInterface ()=default
 

Static Public Attributes

static const std::chrono::milliseconds SHORT_SERVER_SIDE_DISCONNECT_GRACE_PERIOD
 Short amount of time to allow for an automatic reconnect before notifying of a server side disconnect. More...
 
- Static Public Attributes inherited from alexaClientSDK::acl::MessageRouter
static const std::chrono::milliseconds DEFAULT_SERVER_SIDE_DISCONNECT_GRACE_PERIOD
 Amount of time to allow for an automatic reconnect before notifying of a server side disconnect. More...
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::acl::MessageRouterInterface
using ConnectionStatus = std::pair< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::Status, avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::ChangedReason >
 Alias to a connection status and changed reason pair. More...
 
- Static Public Member Functions inherited from alexaClientSDK::acl::MessageRouter
static std::shared_ptr< MessageRouterInterfacecreateMessageRouterInterface (const std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > &shutdownNotifier, const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate, const std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > &attachmentManager, const std::shared_ptr< TransportFactoryInterface > &transportFactory)
 
- Protected Attributes inherited from alexaClientSDK::acl::MessageRouter
avsCommon::utils::threading::Executor m_executor
 

Constructor & Destructor Documentation

◆ TestableMessageRouter()

alexaClientSDK::acl::test::TestableMessageRouter::TestableMessageRouter ( std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface authDelegate,
std::shared_ptr< AttachmentManagerInterface attachmentManager,
std::shared_ptr< TransportFactoryInterface factory,
const std::string &  avsGateway 
)
inline

Member Function Documentation

◆ isExecutorReady()

bool alexaClientSDK::acl::test::TestableMessageRouter::isExecutorReady ( std::chrono::milliseconds  millisecondsToWait)
inline

Check if the underlying executor is in ready state within a given wait time.

Parameters
timeto wait up to specified milliseconds.
Returns
Whether the underlying executor is ready or not.

Member Data Documentation

◆ SHORT_SERVER_SIDE_DISCONNECT_GRACE_PERIOD

const std::chrono::milliseconds alexaClientSDK::acl::test::TestableMessageRouter::SHORT_SERVER_SIDE_DISCONNECT_GRACE_PERIOD
static

Short amount of time to allow for an automatic reconnect before notifying of a server side disconnect.


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

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