16 #ifndef ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTHANDLER_H_ 17 #define ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTHANDLER_H_ 43 ,
public std::enable_shared_from_this<MessageRequestHandler> {
63 static std::shared_ptr<MessageRequestHandler>
create(
64 std::shared_ptr<ExchangeHandlerContextInterface> context,
66 std::shared_ptr<avsCommon::avs::MessageRequest> messageRequest,
67 std::shared_ptr<MessageConsumerInterface> messageConsumer,
68 std::shared_ptr<avsCommon::avs::attachment::AttachmentManagerInterface> attachmentManager,
69 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface>
metricRecorder,
70 std::shared_ptr<avsCommon::sdkInterfaces::EventTracerInterface> eventTracer =
nullptr,
71 const std::shared_ptr<avsCommon::utils::power::PowerResource>& powerResource =
nullptr);
98 std::shared_ptr<ExchangeHandlerContextInterface> context,
100 std::shared_ptr<avsCommon::avs::MessageRequest> messageRequest,
101 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> metricRecorder,
102 const std::shared_ptr<avsCommon::utils::power::PowerResource>& powerResource);
107 void reportMessageRequestAcknowledged();
112 void reportMessageRequestFinished();
118 void recordStreamMetric(std::size_t bytes);
123 void recordStartOfEventMetric();
126 std::shared_ptr<avsCommon::avs::MessageRequest> m_messageRequest;
132 const char* m_jsonNext;
135 size_t m_countOfJsonBytesLeft;
138 size_t m_countOfPartsSent;
141 std::shared_ptr<avsCommon::avs::MessageRequest::NamedReader> m_namedReader;
144 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> m_metricRecorder;
147 bool m_wasMessageRequestAcknowledgeReported;
150 bool m_wasMessageRequestFinishedReported;
156 std::shared_ptr<avsCommon::utils::power::PowerResource> m_powerResource;
162 std::size_t m_streamBytesRead;
165 bool m_recordedStreamMetric;
171 #endif // ALEXA_CLIENT_SDK_ACL_INCLUDE_ACL_TRANSPORT_MESSAGEREQUESTHANDLER_H_ void onActivity() override
::std::string string
Definition: gtest-port.h:1097
static std::shared_ptr< MessageRequestHandler > create(std::shared_ptr< ExchangeHandlerContextInterface > context, const std::string &authToken, std::shared_ptr< avsCommon::avs::MessageRequest > messageRequest, std::shared_ptr< MessageConsumerInterface > messageConsumer, std::shared_ptr< avsCommon::avs::attachment::AttachmentManagerInterface > attachmentManager, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder, std::shared_ptr< avsCommon::sdkInterfaces::EventTracerInterface > eventTracer=nullptr, const std::shared_ptr< avsCommon::utils::power::PowerResource > &powerResource=nullptr)
~MessageRequestHandler() override
Definition: HTTP2MimeRequestSourceInterface.h:35
std::vector< std::string > getRequestHeaderLines() override
static std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder
Metric recorder shared ptr.
Definition: BaseAPLCapabilityAgentTest.cpp:261
HTTP2ResponseFinishedStatus
Definition: HTTP2ResponseFinishedStatus.h:29
Definition: ExchangeHandler.h:31
avsCommon::utils::http2::HTTP2GetMimeHeadersResult getMimePartHeaderLines() override
Definition: MessageRequestHandler.h:39
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: MimeResponseStatusHandlerInterface.h:29
Status
Definition: MessageRequestObserverInterface.h:33
Definition: HTTP2SendDataResult.h:32
avsCommon::utils::http2::HTTP2SendDataResult onSendMimePartData(char *bytes, size_t size) override
void onResponseFinished(avsCommon::utils::http2::HTTP2ResponseFinishedStatus status, const std::string &nonMimeBody) override
bool onReceiveResponseCode(long responseCode) override