Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CODEGEN_SERVER_CONTEXT_H
20 #define GRPCPP_IMPL_CODEGEN_SERVER_CONTEXT_H
30 #include <type_traits>
55 template <
class W,
class R>
56 class ServerAsyncReader;
58 class ServerAsyncWriter;
60 class ServerAsyncResponseWriter;
61 template <
class W,
class R>
62 class ServerAsyncReaderWriter;
71 template <
class ServiceType,
class RequestType,
class ResponseType>
72 class BidiStreamingHandler;
73 template <
class RequestType,
class ResponseType>
74 class CallbackUnaryHandler;
75 template <
class RequestType,
class ResponseType>
76 class CallbackClientStreamingHandler;
77 template <
class RequestType,
class ResponseType>
78 class CallbackServerStreamingHandler;
79 template <
class RequestType,
class ResponseType>
80 class CallbackBidiHandler;
81 template <
class ServiceType,
class RequestType,
class ResponseType>
82 class ClientStreamingHandler;
83 template <
class ResponseType>
87 class BaseRequestType,
class BaseResponseType>
88 class RpcMethodHandler;
90 class FinishOnlyReactor;
91 template <
class W,
class R>
92 class ServerReaderWriterBody;
93 template <
class ServiceType,
class RequestType,
class ResponseType>
94 class ServerStreamingHandler;
96 template <
class Streamer,
bool WriteNeeded>
97 class TemplatedBidiStreamingHandler;
98 template <grpc::StatusCode code>
99 class ErrorMethodHandler;
103 class CompletionQueue;
104 class GenericServerContext;
106 class ServerInterface;
107 class ContextAllocator;
108 class GenericCallbackServerContext;
115 class InteropServerContextInspector;
116 class ServerContextTestSpouse;
117 class DefaultReactorTestPeer;
120 namespace experimental {
121 class OrcaServerInterceptor;
122 class CallMetricRecorder;
344 old,
true, std::memory_order_relaxed));
367 template <
class W,
class R>
373 template <
class W,
class R>
379 template <
class W,
class R>
381 template <
class ResponseType>
386 class BaseRequestType,
class BaseResponseType>
388 template <
class ServiceType,
class RequestType,
class ResponseType>
390 template <
class ServiceType,
class RequestType,
class ResponseType>
392 template <
class Streamer,
bool WriteNeeded>
394 template <
class RequestType,
class ResponseType>
396 template <
class RequestType,
class ResponseType>
398 template <
class RequestType,
class ResponseType>
400 template <
class RequestType,
class ResponseType>
402 template <grpc::StatusCode code>
404 template <
class Base>
431 const std::vector<std::unique_ptr<
433 if (!creators.empty()) {
522 status_set_.store(
true, std::memory_order_release);
527 return status_set_.load(std::memory_order_acquire);
669 "improper base class");
672 "improper base class");
679 #endif // GRPCPP_IMPL_CODEGEN_SERVER_CONTEXT_H
grpc::internal::CallOpSet< grpc::internal::CallOpSendInitialMetadata, grpc::internal::CallOpSendMessage > pending_ops_
struct census_context census_context
void SendInitialMetadata() override
const std::function< void(grpc::Status s)> func_
const struct census_context * census_context() const
Get the census context associated with this server call.
void set_context_allocator(ContextAllocator *context_allocator)
bool compression_level_set_
grpc_compression_level compression_level() const
Return the compression algorithm to be used by the server call.
void AddTrailingMetadata(const std::string &key, const std::string &value)
std::multimap< std::string, std::string > trailing_metadata_
std::chrono::time_point< std::chrono::system_clock, D > time_point
void set_message_allocator_state(RpcAllocatorState *allocator_state)
void CallOnDone() override
grpc_compression_algorithm
std::atomic_bool status_set_
std::atomic_bool marked_cancelled_
ServerContextBase()
Constructors for use by derived classes.
grpc::CompletionQueue * cq_
grpc::ServerUnaryReactor * DefaultReactor()
ContextAllocator * context_allocator() const
The base class of ServerCallbackUnary etc.
grpc_compression_algorithm compression_algorithm_
void BeginCompletionOp(grpc::internal::Call *call, std::function< void(bool)> callback, grpc::internal::ServerCallbackCall *callback_controller)
virtual ~ContextAllocator()
virtual CallbackServerContext * NewCallbackServerContext()
std::chrono::system_clock::time_point deadline() const
Return the deadline for the server call.
grpc::internal::MetadataMap client_metadata_
A wrapper class of an application provided rpc method handler.
grpc::ServerUnaryReactor *const reactor_
void AddInitialMetadata(const std::string &key, const std::string &value)
std::shared_ptr< const grpc::AuthContext > auth_context() const
void MaybeMarkCancelledOnRead()
CallbackServerContext & operator=(const CallbackServerContext &)=delete
bool compression_level_set() const
grpc_compression_level compression_level_
void RegisterInterceptors(const std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface >> &creators)
CoreCodegenInterface * g_core_codegen_interface
TestServerCallbackUnary(ServerContextBase *ctx, std::function< void(grpc::Status)> func)
void * async_notify_when_done_tag_
grpc_compression_algorithm compression_algorithm() const
ContextAllocator * context_allocator_
bool InternalInlineable() override
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
bool test_status_set() const
void CreateCallMetricRecorder()
Base class of ServerContext.
uint32_t initial_metadata_flags() const
static void * tag(intptr_t t)
virtual void Release(GenericCallbackServerContext *)
std::atomic_bool default_reactor_used_
grpc::Status status() const
void BindReactor(Reactor *reactor)
struct grpc_call grpc_call
std::multimap< std::string, std::string > initial_metadata_
grpc::internal::CompletionQueueTag * GetCompletionOpTag()
Return the tag queued by BeginCompletionOp()
experimental::CallMetricRecorder * ExperimentalGetCallMetricRecorder()
void Finish(grpc::Status s) override
const std::multimap< grpc::string_ref, grpc::string_ref > & client_metadata() const
RpcAllocatorState * GetRpcAllocatorState()
static void callback(void *arg, int status, int timeouts, struct hostent *host)
grpc::internal::CallbackWithSuccessTag completion_tag_
gpr_timespec raw_deadline() const
Return a gpr_timespec representation of the server call's deadline.
void SetLoadReportingCosts(const std::vector< std::string > &cost_data)
Set the serialized load reporting costs in cost_data for the call.
virtual GenericCallbackServerContext * NewGenericCallbackServerContext()
Straightforward wrapping of the C call object.
ServerContext & operator=(const ServerContext &)=delete
std::shared_ptr< const grpc::AuthContext > auth_context_
grpc::experimental::ServerRpcInfo * rpc_info_
void set_call(grpc_call *call)
std::chrono::system_clock::time_point Timespec2Timepoint(gpr_timespec t)
A test-only class to access private members and methods of ServerContext.
grpc::internal::ServerReactor * reactor() override
bool sent_initial_metadata_
virtual void Release(CallbackServerContext *)
bool has_notify_when_done_tag_
RpcAllocatorState * message_allocator_state_
std::unique_ptr< TestServerCallbackUnary > test_unary_
ServerContextBase & operator=(const ServerContextBase &)
GRPC_CUSTOM_UTIL_STATUS Status
void AsyncNotifyWhenDone(void *tag)
std::shared_ptr< const AuthContext > CreateAuthContext(grpc_call *call)
void SetupTestDefaultReactor(std::function< void(grpc::Status)> func)
experimental::CallMetricRecorder * call_metric_recorder_
grpc::string_ref ExperimentalGetAuthority() const
virtual ~ServerContextBase()
An interface allowing implementors to process and filter event tags.
grpc::experimental::ServerRpcInfo * set_server_rpc_info(const char *method, grpc::internal::RpcMethod::RpcType type, const std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface >> &creators)
CompletionOp * completion_op_
void set_compression_level(grpc_compression_level level)
A wrapper class of an application provided server streaming handler.
A wrapper class of an application provided client streaming handler.
virtual int grpc_call_failed_before_recv_message(const grpc_call *c)=0
void UnaryRunHandlerHelper(const grpc::internal::MethodHandler::HandlerParameter &, ResponseType *, grpc::Status &)
ServerContext(gpr_timespec deadline, grpc_metadata_array *arr)
void BindDeadlineAndMetadata(gpr_timespec deadline, grpc_metadata_array *arr)
std::aligned_storage< sizeof(Reactor), alignof(Reactor)>::type default_reactor_
void set_compression_algorithm(grpc_compression_algorithm algorithm)
grpc::Status test_status() const
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17