Open 3D Engine AWSCore Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AWSCore::AwsApiRequestJob< RequestTraits > Class Template Reference

An Az::Job that that executes a specific AWS request. More...

#include <AWSApiRequestJob.h>

Inherits AWSCore::AwsApiClientJob< RequestTraits::ClientType >.

Inherited by AWSCore::AwsApiRequestJob< RequestTraits >::Function.

Classes

class  Function
 

Public Types

using AwsApiRequestJobType = AwsApiRequestJob< RequestTraits >
 
using AwsApiClientJobType = AwsApiClientJob< typename RequestTraits::ClientType >
 
using ClientType = typename RequestTraits::ClientType
 
using RequestType = typename RequestTraits::RequestType
 
using OutcomeType = typename RequestTraits::OutcomeType
 
using ResultType = typename RequestTraits::ResultType
 
using ErrorType = typename RequestTraits::ErrorType
 
using IConfig = IAwsApiRequestJobConfig< RequestTraits >
 
using Config = AwsApiRequestJobConfig< RequestTraits >
 
using OnSuccessFunction = AZStd::function< void(AwsApiRequestJob *job)>
 
using OnFailureFunction = AZStd::function< void(AwsApiRequestJob *job)>
 
- Public Types inherited from AWSCore::AwsApiClientJob< RequestTraits::ClientType >
using AwsApiClientJobType = AwsApiClientJob< RequestTraits::ClientType >
 
using IConfig = IAwsApiClientJobConfig< RequestTraits::ClientType >
 
using Config = AwsApiClientJobConfig< RequestTraits::ClientType >
 
- Public Types inherited from AWSCore::AwsApiJob
using IConfig = IAwsApiJobConfig
 
using Config = AwsApiJobConfig
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (AwsApiRequestJob, AZ::SystemAllocator)
 
 AwsApiRequestJob (bool isAutoDelete, IConfig *config=GetDefaultConfig())
 
void Reset (bool isClearDependent) override
 
bool WasSuccess ()
 Determines if the request was successful.
 
template<class Allocator >
AwsApiRequestJob< RequestTraits > * Create (OnSuccessFunction onSuccess, OnFailureFunction onFailure, IConfig *config)
 
- Public Member Functions inherited from AWSCore::AwsApiClientJob< RequestTraits::ClientType >
 AZ_CLASS_ALLOCATOR (AwsApiClientJob, AZ::SystemAllocator)
 
- Public Member Functions inherited from AWSCore::AwsApiJob
 AZ_CLASS_ALLOCATOR (AwsApiJob, AZ::SystemAllocator)
 

Static Public Member Functions

template<class Allocator = AZ::SystemAllocator>
static AwsApiRequestJobCreate (OnSuccessFunction onSuccess, OnFailureFunction onFailure=OnFailureFunction{}, IConfig *config=GetDefaultConfig())
 
static ConfigGetDefaultConfig ()
 
- Static Public Member Functions inherited from AWSCore::AwsApiClientJob< RequestTraits::ClientType >
static ConfigGetDefaultConfig ()
 
- Static Public Member Functions inherited from AWSCore::AwsApiJob
static ConfigGetDefaultConfig ()
 

Public Attributes

RequestType request
 
ResultType result
 
ErrorType error
 

Protected Member Functions

void Process () override
 
virtual bool PrepareRequest ()
 
virtual void OnSuccess ()
 Called when request has completed successfully.
 
virtual void OnFailure ()
 Called when the request fails.
 
virtual void DoCleanup ()
 Called when request can't process and still requires cleanup (Specifically for the derived class AwsApiRequestJob<RequestTraits>::Function which does not use auto delete)
 
- Protected Member Functions inherited from AWSCore::AwsApiClientJob< RequestTraits::ClientType >
 AwsApiClientJob (bool isAutoDelete, IConfig *config=GetDefaultConfig())
 
- Protected Member Functions inherited from AWSCore::AwsApiJob
 AwsApiJob (bool isAutoDelete, IConfig *config=GetDefaultConfig())
 

Protected Attributes

bool m_wasSuccess { false }
 
- Protected Attributes inherited from AWSCore::AwsApiClientJob< RequestTraits::ClientType >
std::shared_ptr< RequestTraits::ClientType > m_client
 

Additional Inherited Members

- Static Protected Attributes inherited from AWSCore::AwsApiJob
static const char * COMPONENT_DISPLAY_NAME
 Used for error messages.
 

Detailed Description

template<class RequestTraits>
class AWSCore::AwsApiRequestJob< RequestTraits >

An Az::Job that that executes a specific AWS request.

Member Function Documentation

◆ PrepareRequest()

template<class RequestTraits >
virtual bool AWSCore::AwsApiRequestJob< RequestTraits >::PrepareRequest ( )
inlineprotectedvirtual

Called by Process to prepare the request. By default no changes are made to the request object. Override to defer the preparation of request data until your running on the job's worker thread, instead of setting the request data before calling Start.

Returns
true if the request should be made.

◆ Reset()

template<class RequestTraits >
void AWSCore::AwsApiRequestJob< RequestTraits >::Reset ( bool  isClearDependent)
inlineoverride

Override AZ:Job defined method to reset request state when the job object is reused.


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