Go to the documentation of this file.
19 #ifndef GRPCPP_SERVER_H
20 #define GRPCPP_SERVER_H
47 class AsyncGenericService;
49 class ServerInitializer;
52 class ExternalConnectionAcceptorImpl;
121 std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
177 std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
179 int min_pollers,
int max_pollers,
int sync_cq_timeout_msec,
180 std::vector<std::shared_ptr<internal::ExternalConnectionAcceptorImpl>>
185 std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>
202 std::unique_ptr<HealthCheckServiceInterface>
service) {
214 std::vector<std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>*
224 class CallbackRequestBase;
225 template <
class ServerContextType>
271 std::vector<
std::shared_ptr<
internal::ExternalConnectionAcceptorImpl>>
298 bool shutdown_notified_
347 #endif // GRPCPP_SERVER_H
std::unique_ptr< ServerInitializer > server_initializer_
int max_receive_message_size_
void RegisterCallbackGenericService(CallbackGenericService *service) override
bool health_check_service_disabled() const
NOTE: This method is not part of the public API for this class.
std::unique_ptr< CallbackGenericService > unimplemented_service_
struct grpc_resource_quota grpc_resource_quota
grpc_server * server() override
virtual void PreServerStart(Server *)
Called before server is started.
std::shared_ptr< std::vector< std::unique_ptr< ServerCompletionQueue > > > sync_server_cqs_
Server(ChannelArguments *args, std::shared_ptr< std::vector< std::unique_ptr< ServerCompletionQueue >>> sync_server_cqs, int min_pollers, int max_pollers, int sync_cq_timeout_msec, std::vector< std::shared_ptr< internal::ExternalConnectionAcceptorImpl >> acceptors, grpc_server_config_fetcher *server_config_fetcher=nullptr, grpc_resource_quota *server_rq=nullptr, std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface >> interceptor_creators=std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface >>())
static unsigned int callbacks
experimental_type experimental()
std::atomic_int shutdown_refs_outstanding_
std::vector< std::shared_ptr< internal::ExternalConnectionAcceptorImpl > > acceptors_
internal::CondVar shutdown_cv_
void ShutdownInternal(gpr_timespec deadline) ABSL_LOCKS_EXCLUDED(mu_) override
std::shared_ptr< Channel > InProcessChannelWithInterceptors(const ChannelArguments &args, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
int max_receive_message_size() const override
Classes that require gRPC to be initialized should inherit from this class.
bool has_callback_methods_
bool has_callback_generic_service_
bool health_check_service_disabled_
Desriptor of an RPC service and its various RPC methods.
ServerInitializer * initializer()
static void SetGlobalCallbacks(GlobalCallbacks *callbacks)
experimental_type(Server *server)
CompletionQueue * CallbackCQ() ABSL_LOCKS_EXCLUDED(mu_) override
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
A builder class for the creation and startup of grpc::Server instances.
void RegisterAsyncGenericService(AsyncGenericService *service) override
Wrapper around grpc_server_credentials, a way to authenticate a server.
#define ABSL_EXCLUSIVE_LOCKS_REQUIRED(...)
std::unique_ptr< internal::MethodHandler > generic_handler_
std::shared_ptr< GlobalCallbacks > global_callbacks_
std::unique_ptr< HealthCheckServiceInterface > health_check_service_
int AddListeningPort(const std::string &addr, ServerCredentials *creds) override
void set_health_check_service(std::unique_ptr< HealthCheckServiceInterface > service)
NOTE: This method is not part of the public API for this class.
struct grpc_server grpc_server
std::unique_ptr< ContextAllocator > context_allocator_
std::vector< std::string > services_
virtual ~GlobalCallbacks()
std::unique_ptr< internal::MethodHandler > resource_exhausted_handler_
Straightforward wrapping of the C call object.
virtual void UpdateArguments(ChannelArguments *)
Called before server is created.
bool RegisterService(const std::string *addr, Service *service) override
std::atomic< CompletionQueue * > callback_cq_
void UnrefAndWaitLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
HealthCheckServiceInterface * GetHealthCheckService() const
Returns the health check service.
std::shared_ptr< Channel > InProcessChannel(const ChannelArguments &args)
Establish a channel for in-process communication.
void RegisterContextAllocator(std::unique_ptr< ContextAllocator > context_allocator)
internal::CondVar shutdown_done_cv_
#define ABSL_LOCKS_EXCLUDED(...)
void Start(ServerCompletionQueue **cqs, size_t num_cqs) override
std::vector< CompletionQueue * > cq_list_
std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface > > interceptor_creators_
ContextAllocator * context_allocator()
bool shutdown_ ABSL_GUARDED_BY(mu_)
void Wait() ABSL_LOCKS_EXCLUDED(mu_) override
bool has_async_generic_service_
grpc::ClientContext context
virtual void PreSynchronousRequest(ServerContext *context)=0
Called before application callback for each synchronous server request.
void UnrefWithPossibleNotify() ABSL_LOCKS_EXCLUDED(mu_)
void PerformOpsOnCall(internal::CallOpSetInterface *ops, internal::Call *call) override
~Server() ABSL_LOCKS_EXCLUDED(mu_) override
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
virtual void PostSynchronousRequest(ServerContext *context)=0
Called after application callback for each synchronous server request.
std::vector< std::unique_ptr< SyncRequestThreadManager > > sync_req_mgrs_
std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface > > * interceptor_creators() override
virtual void AddPort(Server *, const std::string &, ServerCredentials *, int)
Called after a server port is added.
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:16