AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Aws::Eventstreamrpc::ClientOperation Class Referenceabstract

#include <EventStreamClient.h>

Inheritance diagram for Aws::Eventstreamrpc::ClientOperation:
Aws::Eventstreamrpc::ClientContinuationHandler Aws::Greengrass::AuthorizeClientDeviceActionOperation Aws::Greengrass::CancelLocalDeploymentOperation Aws::Greengrass::CreateDebugPasswordOperation Aws::Greengrass::CreateLocalDeploymentOperation Aws::Greengrass::DeferComponentUpdateOperation Aws::Greengrass::DeleteThingShadowOperation Aws::Greengrass::GetClientDeviceAuthTokenOperation Aws::Greengrass::GetComponentDetailsOperation Aws::Greengrass::GetConfigurationOperation Aws::Greengrass::GetLocalDeploymentStatusOperation Aws::Greengrass::GetSecretValueOperation Aws::Greengrass::GetThingShadowOperation Aws::Greengrass::ListComponentsOperation Aws::Greengrass::ListLocalDeploymentsOperation Aws::Greengrass::ListNamedShadowsForThingOperation Aws::Greengrass::PauseComponentOperation Aws::Greengrass::PublishToIoTCoreOperation Aws::Greengrass::PublishToTopicOperation Aws::Greengrass::PutComponentMetricOperation Aws::Greengrass::RestartComponentOperation Aws::Greengrass::ResumeComponentOperation Aws::Greengrass::SendConfigurationValidityReportOperation Aws::Greengrass::StopComponentOperation Aws::Greengrass::SubscribeToCertificateUpdatesOperation Aws::Greengrass::SubscribeToComponentUpdatesOperation Aws::Greengrass::SubscribeToConfigurationUpdateOperation Aws::Greengrass::SubscribeToIoTCoreOperation Aws::Greengrass::SubscribeToTopicOperation Aws::Greengrass::SubscribeToValidateConfigurationUpdatesOperation Aws::Greengrass::UpdateConfigurationOperation Aws::Greengrass::UpdateStateOperation Aws::Greengrass::UpdateThingShadowOperation Aws::Greengrass::ValidateAuthorizationTokenOperation Aws::Greengrass::VerifyClientDeviceIdentityOperation

Public Member Functions

 ClientOperation (ClientConnection &connection, std::shared_ptr< StreamResponseHandler > streamHandler, const OperationModelContext &operationModelContext, Crt::Allocator *allocator) noexcept
 
 ~ClientOperation () noexcept
 
 ClientOperation (const ClientOperation &clientOperation) noexcept=delete
 
 ClientOperation (ClientOperation &&clientOperation) noexcept=delete
 
bool operator= (const ClientOperation &clientOperation) noexcept=delete
 
bool operator= (ClientOperation &&clientOperation) noexcept=delete
 
std::future< RpcErrorClose (OnMessageFlushCallback onMessageFlushCallback=nullptr) noexcept
 
std::future< TaggedResultGetOperationResult () noexcept
 
void WithLaunchMode (std::launch mode) noexcept
 
- Public Member Functions inherited from Aws::Eventstreamrpc::ClientContinuationHandler
virtual ~ClientContinuationHandler () noexcept=default
 

Protected Member Functions

std::future< RpcErrorActivate (const AbstractShapeBase *shape, OnMessageFlushCallback onMessageFlushCallback) noexcept
 
virtual Crt::String GetModelName () const noexcept=0
 

Protected Attributes

const OperationModelContextm_operationModelContext
 
std::launch m_asyncLaunchMode
 

Detailed Description

Interface for an RPC operation.

Constructor & Destructor Documentation

◆ ClientOperation() [1/3]

Aws::Eventstreamrpc::ClientOperation::ClientOperation ( ClientConnection connection,
std::shared_ptr< StreamResponseHandler streamHandler,
const OperationModelContext operationModelContext,
Crt::Allocator allocator 
)
noexcept

◆ ~ClientOperation()

Aws::Eventstreamrpc::ClientOperation::~ClientOperation ( )
noexcept

◆ ClientOperation() [2/3]

Aws::Eventstreamrpc::ClientOperation::ClientOperation ( const ClientOperation clientOperation)
deletenoexcept

◆ ClientOperation() [3/3]

Aws::Eventstreamrpc::ClientOperation::ClientOperation ( ClientOperation &&  clientOperation)
deletenoexcept

Member Function Documentation

◆ Activate()

std::future< RpcError > Aws::Eventstreamrpc::ClientOperation::Activate ( const AbstractShapeBase shape,
OnMessageFlushCallback  onMessageFlushCallback 
)
protectednoexcept

Initiate a new client stream. Send the shape for the new stream.

Parameters
shapeA parameter for RPC operation.
onMessageFlushCallbackCallback to invoke when the shape is flushed to the underlying transport.
Returns
Future which will be resolved once the message is sent.

◆ Close()

std::future< RpcError > Aws::Eventstreamrpc::ClientOperation::Close ( OnMessageFlushCallback  onMessageFlushCallback = nullptr)
noexcept

Close the stream on which operation is sent.

Note
This function sends a message with the message flag set to terminate the stream.
Parameters
onMessageFlushCallbackCallback to invoke when the closing message is flushed to the underlying transport.
Returns
Future which will be resolved once the message is sent.

◆ GetModelName()

virtual Crt::String Aws::Eventstreamrpc::ClientOperation::GetModelName ( ) const
protectedpure virtualnoexcept

Returns the canonical model name associated with this operation across any client language. Namespace included.

Returns
The model name.

Implemented in Aws::Greengrass::CreateLocalDeploymentOperation, Aws::Greengrass::PauseComponentOperation, Aws::Greengrass::StopComponentOperation, Aws::Greengrass::ListLocalDeploymentsOperation, Aws::Greengrass::SubscribeToComponentUpdatesOperation, Aws::Greengrass::ListNamedShadowsForThingOperation, Aws::Greengrass::CancelLocalDeploymentOperation, Aws::Greengrass::UpdateStateOperation, Aws::Greengrass::GetSecretValueOperation, Aws::Greengrass::GetLocalDeploymentStatusOperation, Aws::Greengrass::RestartComponentOperation, Aws::Greengrass::ValidateAuthorizationTokenOperation, Aws::Greengrass::UpdateConfigurationOperation, Aws::Greengrass::UpdateThingShadowOperation, Aws::Greengrass::SendConfigurationValidityReportOperation, Aws::Greengrass::GetThingShadowOperation, Aws::Greengrass::CreateDebugPasswordOperation, Aws::Greengrass::ListComponentsOperation, Aws::Greengrass::AuthorizeClientDeviceActionOperation, Aws::Greengrass::VerifyClientDeviceIdentityOperation, Aws::Greengrass::SubscribeToCertificateUpdatesOperation, Aws::Greengrass::PublishToTopicOperation, Aws::Greengrass::GetClientDeviceAuthTokenOperation, Aws::Greengrass::GetComponentDetailsOperation, Aws::Greengrass::SubscribeToTopicOperation, Aws::Greengrass::GetConfigurationOperation, Aws::Greengrass::SubscribeToValidateConfigurationUpdatesOperation, Aws::Greengrass::DeferComponentUpdateOperation, Aws::Greengrass::PutComponentMetricOperation, Aws::Greengrass::DeleteThingShadowOperation, Aws::Greengrass::SubscribeToConfigurationUpdateOperation, Aws::Greengrass::PublishToIoTCoreOperation, Aws::Greengrass::ResumeComponentOperation, and Aws::Greengrass::SubscribeToIoTCoreOperation.

◆ GetOperationResult()

std::future< TaggedResult > Aws::Eventstreamrpc::ClientOperation::GetOperationResult ( )
noexcept

Get an operation result.

Returns
Future which will be resolved when the corresponding RPC request completes.

◆ operator=() [1/2]

bool Aws::Eventstreamrpc::ClientOperation::operator= ( ClientOperation &&  clientOperation)
deletenoexcept

◆ operator=() [2/2]

bool Aws::Eventstreamrpc::ClientOperation::operator= ( const ClientOperation clientOperation)
deletenoexcept

◆ WithLaunchMode()

void Aws::Eventstreamrpc::ClientOperation::WithLaunchMode ( std::launch  mode)
noexcept

Set the launch mode for executing operations. The mode is set to std::launch::deferred by default.

Parameters
modeThe launch mode to use.

Member Data Documentation

◆ m_asyncLaunchMode

std::launch Aws::Eventstreamrpc::ClientOperation::m_asyncLaunchMode
protected

◆ m_operationModelContext

const OperationModelContext& Aws::Eventstreamrpc::ClientOperation::m_operationModelContext
protected

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