34 #ifndef GRPCXX_SERVER_H 35 #define GRPCXX_SERVER_H 57 class GenericServerContext;
58 class AsyncGenericService;
59 class ServerAsyncStreamingInterface;
61 class ServerInitializer;
62 class ThreadPoolInterface;
109 class ShutdownRequest;
111 class UnimplementedAsyncRequestContext;
112 class UnimplementedAsyncRequest;
113 class UnimplementedAsyncResponse;
121 Server(ThreadPoolInterface* thread_pool,
bool thread_pool_owned,
158 void RunRpc() GRPC_OVERRIDE;
161 void ScheduleCallback() GRPC_OVERRIDE;
165 void ShutdownInternal(
gpr_timespec deadline) GRPC_OVERRIDE;
167 int max_message_size() const GRPC_OVERRIDE {
return max_message_size_; };
169 grpc_server* server() GRPC_OVERRIDE {
return server_; };
173 const int max_message_size_;
182 bool shutdown_notified_;
189 std::shared_ptr<GlobalCallbacks> global_callbacks_;
191 std::list<SyncRequest>* sync_methods_;
192 std::vector<grpc::string> services_;
193 std::unique_ptr<RpcServiceMethod> unknown_method_;
194 bool has_generic_service_;
199 ThreadPoolInterface* thread_pool_;
201 bool thread_pool_owned_;
203 std::unique_ptr<ServerInitializer> server_initializer_;
208 #endif // GRPCXX_SERVER_H
std::string string
Definition: config.h:118
An abstract collection of call ops, used to generate the grpc_call_op structure to pass down to the l...
Definition: call.h:563
Options for channel creation.
Definition: channel_arguments.h:52
Definition: service_type.h:64
Definition: sync_no_cxx11.h:45
Definition: server_initializer.h:47
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:57
virtual ~GlobalCallbacks()
Definition: server.h:83
Definition: async_generic_service.h:60
static void SetGlobalCallbacks(GlobalCallbacks *callbacks)
Set the global callback object.
Classes that require gRPC to be initialized should inherit from this class.
Definition: grpc_library.h:53
Definition: sync_no_cxx11.h:87
CompletionQueue * completion_queue()
virtual void PreSynchronousRequest(ServerContext *context)=0
Called before application callback for each synchronous server request.
Definition: server_credentials.h:50
Models a gRPC server.
Definition: server.h:67
Definition: server_context.h:91
Models a gRPC server.
Definition: server_interface.h:58
A thin wrapper around grpc_completion_queue (see / src/core/surface/completion_queue.h).
Definition: completion_queue.h:97
#define GRPC_FINAL
Definition: config.h:72
Global Callbacks.
Definition: server.h:81
virtual void UpdateArguments(ChannelArguments *args)
Called before server is created.
Definition: server.h:85
A specific type of completion queue used by the processing of notifications by servers.
Definition: completion_queue.h:235
void Wait() GRPC_OVERRIDE
Block waiting for all work to complete.
virtual void PostSynchronousRequest(ServerContext *context)=0
Called after application callback for each synchronous server request.
#define GRPC_OVERRIDE
Definition: config.h:78
A builder class for the creation and startup of grpc::Server instances.
Definition: server_builder.h:61