/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/exceptions/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include #include "thrift/compiler/test/fixtures/exceptions/gen-cpp2/RaiserAsyncClient.h" #include "thrift/compiler/test/fixtures/exceptions/gen-cpp2/module_types.h" namespace folly { class IOBuf; class IOBufQueue; } namespace apache { namespace thrift { class Cpp2RequestContext; class BinaryProtocolReader; class CompactProtocolReader; namespace transport { class THeader; } }} namespace cpp2 { class Raiser; class RaiserAsyncProcessor; class RaiserServiceInfoHolder : public apache::thrift::ServiceInfoHolder { public: apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override; static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap(); }; } // namespace cpp2 namespace apache::thrift { template <> class ServiceHandler<::cpp2::Raiser> : public apache::thrift::ServerInterface { public: std::string_view getGeneratedName() const override { return "Raiser"; } typedef ::cpp2::RaiserAsyncProcessor ProcessorType; std::unique_ptr getProcessor() override; CreateMethodMetadataResult createMethodMetadata() override; private: std::optional> getServiceRequestInfoMap() const; public: virtual void sync_doBland(); [[deprecated("Use sync_doBland instead")]] virtual void doBland(); virtual folly::Future future_doBland(); virtual folly::SemiFuture semifuture_doBland(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_doBland(); virtual folly::coro::Task co_doBland(apache::thrift::RequestParams params); #endif virtual void async_tm_doBland(std::unique_ptr> callback); virtual void sync_doRaise(); [[deprecated("Use sync_doRaise instead")]] virtual void doRaise(); virtual folly::Future future_doRaise(); virtual folly::SemiFuture semifuture_doRaise(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task co_doRaise(); virtual folly::coro::Task co_doRaise(apache::thrift::RequestParams params); #endif virtual void async_tm_doRaise(std::unique_ptr> callback); virtual void sync_get200(::std::string& /*_return*/); [[deprecated("Use sync_get200 instead")]] virtual void get200(::std::string& /*_return*/); virtual folly::Future> future_get200(); virtual folly::SemiFuture> semifuture_get200(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_get200(); virtual folly::coro::Task> co_get200(apache::thrift::RequestParams params); #endif virtual void async_tm_get200(std::unique_ptr>> callback); virtual void sync_get500(::std::string& /*_return*/); [[deprecated("Use sync_get500 instead")]] virtual void get500(::std::string& /*_return*/); virtual folly::Future> future_get500(); virtual folly::SemiFuture> semifuture_get500(); #if FOLLY_HAS_COROUTINES virtual folly::coro::Task> co_get500(); virtual folly::coro::Task> co_get500(apache::thrift::RequestParams params); #endif virtual void async_tm_get500(std::unique_ptr>> callback); private: static ::cpp2::RaiserServiceInfoHolder __fbthrift_serviceInfoHolder; std::atomic __fbthrift_invocation_doBland{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_doRaise{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_get200{apache::thrift::detail::si::InvocationType::AsyncTm}; std::atomic __fbthrift_invocation_get500{apache::thrift::detail::si::InvocationType::AsyncTm}; }; } // namespace apache::thrift namespace cpp2 { using RaiserSvIf [[deprecated("Use apache::thrift::ServiceHandler instead")]] = ::apache::thrift::ServiceHandler; } // namespace cpp2 namespace cpp2 { class RaiserSvNull : public ::apache::thrift::ServiceHandler { public: void doBland() override; void doRaise() override; void get200(::std::string& /*_return*/) override; void get500(::std::string& /*_return*/) override; }; class RaiserAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase { public: const char* getServiceName() override; void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override; using BaseAsyncProcessor = void; protected: ::apache::thrift::ServiceHandler<::cpp2::Raiser>* iface_; public: void processSerializedCompressedRequestWithMetadata(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata, apache::thrift::protocol::PROTOCOL_TYPES protType, apache::thrift::Cpp2RequestContext* context, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) override; void executeRequest(apache::thrift::ServerRequest&& serverRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata) override; public: using ProcessFuncs = GeneratedAsyncProcessorBase::ProcessFuncs; using ProcessMap = GeneratedAsyncProcessorBase::ProcessMap; static const RaiserAsyncProcessor::ProcessMap& getOwnProcessMap(); private: static const RaiserAsyncProcessor::ProcessMap kOwnProcessMap_; private: template void setUpAndProcess_doBland(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_doBland(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_doBland(apache::thrift::ContextStack* ctx); template static void throw_wrapped_doBland(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_doRaise(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_doRaise(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_doRaise(apache::thrift::ContextStack* ctx); template static void throw_wrapped_doRaise(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_get200(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_get200(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_get200(apache::thrift::ContextStack* ctx, ::std::string const& _return); template static void throw_wrapped_get200(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); template void setUpAndProcess_get500(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm); template void executeRequest_get500(apache::thrift::ServerRequest&& serverRequest); template static apache::thrift::SerializedResponse return_get500(apache::thrift::ContextStack* ctx, ::std::string const& _return); template static void throw_wrapped_get500(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx); public: RaiserAsyncProcessor(::apache::thrift::ServiceHandler<::cpp2::Raiser>* iface) : iface_(iface) {} ~RaiserAsyncProcessor() override {} }; } // namespace cpp2