AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Static Public Member Functions | List of all members
alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender Class Reference

#include <PostConnectSynchronizeStateSender.h>

Inheritance diagram for alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender:
Collaboration graph
[legend]

Public Member Functions

void onContextAvailable (const std::string &jsonContext) override
 
void onContextFailure (const avsCommon::sdkInterfaces::ContextRequestError error) override
 
unsigned int getOperationPriority () override
 
bool performOperation (const std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > &messageSender) override
 
void abortOperation () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface
virtual ~ContextRequesterInterface ()=default
 
virtual void onContextAvailable (const endpoints::EndpointIdentifier &endpointId, const avs::AVSContext &endpointContext, ContextRequestToken requestToken)
 
virtual void onContextFailure (const ContextRequestError error, ContextRequestToken token)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationInterface
virtual ~PostConnectOperationInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< PostConnectSynchronizeStateSendercreate (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder=nullptr)
 

Additional Inherited Members

- Static Public Attributes inherited from alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationInterface
static constexpr unsigned int VERIFY_GATEWAY_PRIORITY = 50
 Operation priority for AVS Gateway Verification. More...
 
static constexpr unsigned int ENDPOINT_DISCOVERY_PRIORITY = 100
 Operation priority for Publishing Capabilities to AVS. More...
 
static constexpr unsigned int SYNCHRONIZE_STATE_PRIORITY = 150
 Operation priority for sending SynchronizeState event to AVS. More...
 

Detailed Description

A Post connect operation to send the SynchronizeState event.

Member Function Documentation

◆ abortOperation()

void alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::abortOperation ( )
overridevirtual

Aborts an operation that is currently being executed using the performOperation() method.

Note: This method will be called from a different thread from where the performOperation() is being called from.

Already stopping, return.

Call shutdown outside the lock.

Implements alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationInterface.

◆ create()

std::shared_ptr< PostConnectSynchronizeStateSender > alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::create ( std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder = nullptr 
)
static

Creates a new instance of the PostConnectSynchronizeStateSender.

Parameters
contextManagerThe ContextManager to request the context from.
metricRecorderThe object used for metric recording.
Returns
a new instance of the PostConnectSynchronizeStateSender.

◆ getOperationPriority()

unsigned int alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::getOperationPriority ( )
overridevirtual

PostConnectOperationInterface Methods.

Implements alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationInterface.

◆ onContextAvailable()

void alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::onContextAvailable ( const std::string &  jsonContext)
overridevirtual

ContextRequesterInterface Methods.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ onContextFailure()

void alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::onContextFailure ( const avsCommon::sdkInterfaces::ContextRequestError  error)
overridevirtual

The contextManager calls this if it is unable to process a getContext request successfully.

Deprecated:
This method is being deprecated since it cannot specify the optional token.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
errorThe reason why the getContext request failed.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ performOperation()

bool alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender::performOperation ( const std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > &  messageSender)
overridevirtual

Performs the post connect operation. The implementation should ensure that the performOperation returns immediately after the abortOperation() method is called.

Note
: The performOperation() method is not expected to be called twice.
Parameters
messageSender- The MessageSenderInterface to send post connect message.
Returns
True if the post connect operation is successful, else false.

Context fetch successful, proceed to send SynchronizeState event.

Retry with backoff.

Implements alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationInterface.


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

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