AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler Class Reference

Minimal DirectiveHandlerInterface implementation so we can generate instance pointers. More...

Inheritance diagram for alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler:
Collaboration graph
[legend]

Public Member Functions

void handleDirectiveImmediately (std::shared_ptr< AVSDirective >) override
 
void preHandleDirective (std::shared_ptr< AVSDirective >, std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface >) override
 
bool handleDirective (const std::string &) override
 
void cancelDirective (const std::string &) override
 
void onDeregistered () override
 
avs::DirectiveHandlerConfiguration getConfiguration () const override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface
virtual ~DirectiveHandlerInterface ()=default
 
virtual void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive)=0
 
virtual void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::unique_ptr< DirectiveHandlerResultInterface > result)=0
 

Detailed Description

Minimal DirectiveHandlerInterface implementation so we can generate instance pointers.

Member Function Documentation

◆ cancelDirective()

void alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::cancelDirective ( const std::string &  messageId)
inlineoverridevirtual

Cancel an ongoing preHandleDirective() or handleDirective() operation for the specified AVSDirective. Once this has been called the DirectiveHandler should not expect to receive further calls regarding this directive.

Note
The implementation of this method MUST be thread-safe.
The implementation of this method MUST return quickly. Failure to do so blocks the processing of subsequent AVSDirectives.
Parameters
messageIdThe message ID of a directive previously passed to preHandleDirective().

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ getConfiguration()

avs::DirectiveHandlerConfiguration alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::getConfiguration ( ) const
inlineoverridevirtual

Returns the configuration of the directive handler.

The configuration consists of multiple directive routing rules and their respective blocking policy. The directives will be matched from the most specific rule (with all fields defined) to the least specific rule (which only matches the directive endpointId).

Returns
The avs::DirectiveHandlerConfiguration of the handler.

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ handleDirective()

bool alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::handleDirective ( const std::string &  messageId)
inlineoverridevirtual

Handle the action specified by the directive identified by messageId. The handling of subsequent directives with the same DialogRequestId may be blocked until the DirectiveHandler calls the setSucceeded() method of the DirectiveHandlingResult instance passed in to the preHandleDirective() call for the directive specified by messageId. If handling of this directive fails such that subsequent directives with the same DialogRequestId should be cancelled, this DirectiveHandler should instead call setFailed() to indicate a failure.

Note
If this operation fails, an ExceptionEncountered message should be sent to AVS.
The implementation of this method MUST be thread-safe.
The implementation of this method MUST return quickly. Failure to do so blocks the processing of subsequent AVSDirectives.
Parameters
messageIdThe message ID of a directive previously passed to preHandleDirective().
Returns
false when messageId is not recognized, else true. Any errors related to handling of a valid messageId should be reported using DirectiveHandlerResultInterface::setFailed().

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ handleDirectiveImmediately()

void alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::handleDirectiveImmediately ( std::shared_ptr< AVSDirective )
inlineoverride

◆ onDeregistered()

void alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::onDeregistered ( )
inlineoverridevirtual

Notification that this handler has been de-registered and will not receive any more calls.

Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.

◆ preHandleDirective()

void alexaClientSDK::avsCommon::avs::test::TestDirectiveHandler::preHandleDirective ( std::shared_ptr< AVSDirective ,
std::unique_ptr< sdkInterfaces::DirectiveHandlerResultInterface  
)
inlineoverride

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