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

#include <MessageRouterInterface.h>

Inheritance diagram for alexaClientSDK::acl::MessageRouterInterface:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::acl::MessageRouterInterface:
Collaboration graph
[legend]

Public Types

using ConnectionStatus = std::pair< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::Status, avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::ChangedReason >
 Alias to a connection status and changed reason pair. More...
 

Public Member Functions

 MessageRouterInterface (const std::string &name)
 
virtual void enable ()=0
 
virtual void disable ()=0
 
virtual ConnectionStatus getConnectionStatus ()=0
 
virtual void setAVSGateway (const std::string &avsGateway)=0
 
virtual std::string getAVSGateway ()=0
 
virtual void onWakeConnectionRetry ()=0
 
virtual void onWakeVerifyConnectivity ()=0
 
virtual void setObserver (std::shared_ptr< MessageRouterObserverInterface > observer)=0
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
virtual void doShutdown ()=0
 

Detailed Description

This specifies the interface to manage an actual connection over some medium to AVS.

Implementations of this class are required to be thread-safe.

Member Typedef Documentation

◆ ConnectionStatus

Alias to a connection status and changed reason pair.

Constructor & Destructor Documentation

◆ MessageRouterInterface()

alexaClientSDK::acl::MessageRouterInterface::MessageRouterInterface ( const std::string &  name)
inline

Constructor.

◆ ~MessageRouterInterface()

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

Destructor.

Member Function Documentation

◆ disable()

virtual void alexaClientSDK::acl::MessageRouterInterface::disable ( )
pure virtual

Close the AVS connection. If the underlying implementation is not connected, or is in the process of changing its connection state, this function should do nothing.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ enable()

virtual void alexaClientSDK::acl::MessageRouterInterface::enable ( )
pure virtual

Begin the process of establishing an AVS connection. If the underlying implementation is already connected, or is in the process of changing its connection state, this function should do nothing.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ getAVSGateway()

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

Get the gateway URL for the AVS connection.

Returns
The URL for the current AVS gateway.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ getConnectionStatus()

virtual ConnectionStatus alexaClientSDK::acl::MessageRouterInterface::getConnectionStatus ( )
pure virtual

Queries the status of the connection.

Returns
Returns the connection status and changed reason pair of the underlying implementation.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ onWakeConnectionRetry()

virtual void alexaClientSDK::acl::MessageRouterInterface::onWakeConnectionRetry ( )
pure virtual

This method is a hint to retry connecting (if not connected).

Implemented in alexaClientSDK::acl::MessageRouter.

◆ onWakeVerifyConnectivity()

virtual void alexaClientSDK::acl::MessageRouterInterface::onWakeVerifyConnectivity ( )
pure virtual

This method is a hint to verify that there is a valid connection to AVS.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ setAVSGateway()

virtual void alexaClientSDK::acl::MessageRouterInterface::setAVSGateway ( const std::string &  avsGateway)
pure virtual

Set the gateway URL for the AVS connection. Calling this function with a new value will cause the current active connection to be closed, and a new one opened to the new gateway.

Parameters
avsGatewayThe URL for the new AVS gateway.

Implemented in alexaClientSDK::acl::MessageRouter.

◆ setObserver()

virtual void alexaClientSDK::acl::MessageRouterInterface::setObserver ( std::shared_ptr< MessageRouterObserverInterface observer)
pure virtual

Set the observer to this object.

Parameters
observerAn observer to this class, which will be notified when the connection status changes, and when messages arrive from AVS.

Implemented in alexaClientSDK::acl::MessageRouter.


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

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