AWS IoT Device SDK C++ v2 1.44.2
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Eventstreamrpc::ClientOperation Class Reference

#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 std::shared_ptr< OperationModelContext > &operationModelContext, Crt::Allocator *allocator) noexcept
 ~ClientOperation () noexcept override
 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
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, std::function< void(EventstreamResultVariantType &&)> &&onResultCallback) noexcept
std::future< RpcErrorSendStreamMessage (const AbstractShapeBase *shape, OnMessageFlushCallback &&onMessageFlushCallback) noexcept
virtual Crt::String GetModelName () const noexcept

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 std::shared_ptr< OperationModelContext > & operationModelContext,
Crt::Allocator * allocator )
noexcept

◆ ~ClientOperation()

Aws::Eventstreamrpc::ClientOperation::~ClientOperation ( )
overridenoexcept

◆ 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,
std::function< void(EventstreamResultVariantType &&)> && onResultCallback )
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.
onResultCallbackCallback to invoke with the untransformed activation result
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()

Crt::String Aws::Eventstreamrpc::ClientOperation::GetModelName ( ) const
protectedvirtualnoexcept

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

Returns
The model name.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ SendStreamMessage()

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

Sends a message on the stream

Parameters
shapeModeled representation of the message to send
onMessageFlushCallbackOptional callback to invoke when the message is written or fails to send
Returns
Future which will be resolved once the message is sent.

◆ WithLaunchMode()

void Aws::Eventstreamrpc::ClientOperation::WithLaunchMode ( std::launch mode)
noexcept
Deprecated
This no longer does anything useful. Launch policy was added because of a mistake in the implementation that was attempting to chain two promises together.

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

Parameters
modeThe launch mode to use.

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