AlexaClientSDK  1.23.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig Class Reference

#include <HTTP2RequestConfig.h>

Public Member Functions

 HTTP2RequestConfig (HTTP2RequestType type, const std::string &url, const std::string &idPrefix)
 
void setConnectionTimeout (std::chrono::milliseconds timeout)
 
void setTransferTimeout (std::chrono::milliseconds timeout)
 
void setActivityTimeout (std::chrono::milliseconds timeout)
 
void setPriority (uint8_t priority)
 
void setRequestSource (std::shared_ptr< HTTP2RequestSourceInterface > source)
 
void setResponseSink (std::shared_ptr< HTTP2ResponseSinkInterface > sink)
 
void setIntermittentTransferExpected ()
 
void setLogicalStreamIdPrefix (std::string logicalStreamIdPrefix)
 
HTTP2RequestType getRequestType () const
 
std::string getUrl () const
 
std::chrono::milliseconds getConnectionTimeout () const
 
std::chrono::milliseconds getTransferTimeout () const
 
std::chrono::milliseconds getActivityTimeout () const
 
uint8_t getPriority () const
 
std::shared_ptr< HTTP2RequestSourceInterfacegetSource () const
 
std::shared_ptr< HTTP2ResponseSinkInterfacegetSink () const
 
bool isIntermittentTransferExpected () const
 
std::string getId () const
 

Detailed Description

Class for configuring an HTTP2 request.

Constructor & Destructor Documentation

◆ HTTP2RequestConfig()

alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::HTTP2RequestConfig ( HTTP2RequestType  type,
const std::string &  url,
const std::string &  idPrefix 
)
inline

Constructor.

Parameters
typeThe type of request.
urlThe URL to receive the request.
idPrefixPrefix used when creating the request's ID.

Member Function Documentation

◆ getActivityTimeout()

std::chrono::milliseconds alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getActivityTimeout ( ) const
inline

Get the maximum time, in milliseconds, to wait between any read or write operations for this request.

Parameters
timeoutThe max amount of time, in milliseconds, between any read or write operations for this request.

◆ getConnectionTimeout()

std::chrono::milliseconds alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getConnectionTimeout ( ) const
inline

Get the maximum time, in milliseconds, for the connection phase to the server to take.

Returns
The max amount of time, in milliseconds, for the connection phase to the server to take.

◆ getId()

std::string alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getId ( ) const
inline

Get the name used to identify the request.

Returns
the name sued to identify the request.

◆ getPriority()

uint8_t alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getPriority ( ) const
inline

Get the priority of this request.

Returns
The priority of the request. Higher values (max 255) specify higher priority. By default requests are assigned a priority of 16.
See also
https://tools.ietf.org/html/rfc7540#section-5.3

◆ getRequestType()

HTTP2RequestType alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getRequestType ( ) const
inline

Get the type of the request (like GET or POST)

Returns
the request type

◆ getSink()

std::shared_ptr< HTTP2ResponseSinkInterface > alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getSink ( ) const
inline

Get the object to receive the response to this HTTP2 request.

Returns
The object to receive the response to this HTTP2 request.

◆ getSource()

std::shared_ptr< HTTP2RequestSourceInterface > alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getSource ( ) const
inline

Get the object to provide the data for this HTTP2 request.

Returns
The object to provide the data for this HTTP2 POST request.

◆ getTransferTimeout()

std::chrono::milliseconds alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getTransferTimeout ( ) const
inline

Get the maximum time the request is allowed to take.

Returns
The max amount of time, in milliseconds, that the request is allowed to take.

◆ getUrl()

std::string alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::getUrl ( ) const
inline

Get the URL which is to receive the request.

Returns
The URL to receive the request.

◆ isIntermittentTransferExpected()

bool alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::isIntermittentTransferExpected ( ) const
inline

Whether this request expects that transfer will happen intermittently.

Returns
Whether this request expects that transfer will happen intermittently.

◆ setActivityTimeout()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setActivityTimeout ( std::chrono::milliseconds  timeout)
inline

Specify the maximum time, in milliseconds, to wait between any read or write operations for this request.

Parameters
timeoutThe max amount of time, in milliseconds, between any read or write operations for this request.

◆ setConnectionTimeout()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setConnectionTimeout ( std::chrono::milliseconds  timeout)
inline

Specify the maximum time, in milliseconds, for the connection phase to the server to take.

Parameters
timeoutThe max amount of time, in milliseconds, for the connection phase to the server to take.

◆ setIntermittentTransferExpected()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setIntermittentTransferExpected ( )
inline

If this request expects that transfer will happen intermittently, set this property. (It is false by default.)

◆ setLogicalStreamIdPrefix()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setLogicalStreamIdPrefix ( std::string  logicalStreamIdPrefix)

Set stream identification prefix to use for file names if extended curl logging is enabled. Request ID will be appended to it.

Parameters
logicalStreamIdPrefixlogical stream Id prefix to use in CURL log file names.

◆ setPriority()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setPriority ( uint8_t  priority)
inline

Specify the priority of this request.

Parameters
Thepriority of the request. Higher values (max 255) specify higher priority. By default requests are assigned a priority of 16.
See also
https://tools.ietf.org/html/rfc7540#section-5.3

◆ setRequestSource()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setRequestSource ( std::shared_ptr< HTTP2RequestSourceInterface source)
inline

Specify the object to provide the data for this HTTP2 request.

Parameters
sourceThe object to provide the data for this HTTP2 POST request.

◆ setResponseSink()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setResponseSink ( std::shared_ptr< HTTP2ResponseSinkInterface sink)
inline

Specify the object to receive the response to this HTTP2 request.

Parameters
sinkThe object to receive the response to this HTTP2 request.

◆ setTransferTimeout()

void alexaClientSDK::avsCommon::utils::http2::HTTP2RequestConfig::setTransferTimeout ( std::chrono::milliseconds  timeout)
inline

Specify the maximum time the request is allowed to take.

Parameters
timeoutThe max amount of time, in milliseconds, that the request is allowed to take.

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