34 #ifndef GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H
35 #define GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H
45 class AsyncGenericService;
46 class GenericServerContext;
48 class ServerAsyncStreamingInterface;
49 class ServerCompletionQueue;
51 class ServerCredentials;
53 class ThreadPoolInterface;
92 virtual void Wait() = 0;
140 bool delete_on_finalize);
176 IssueRequest(registered_method,
nullptr, notification_cq);
182 template <
class Message>
193 IssueRequest(registered_method, &payload_, notification_cq);
197 bool serialization_status =
198 *status && payload_ &&
201 *status = serialization_status && *status;
216 bool delete_on_finalize);
224 template <
class Message>
232 stream, call_cq, notification_cq, tag,
242 call_cq, notification_cq, tag);
257 #endif // GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:86
PayloadAsyncRequest(void *registered_method, ServerInterface *server, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, Message *request)
Definition: server_interface.h:185
virtual ~ServerInterface()
Definition: server_interface.h:62
An interface allowing implementors to process and filter event tags.
Definition: completion_queue_tag.h:40
Definition: server_interface.h:168
void Shutdown()
Shutdown the server, waiting for all rpc processing to finish.
Definition: server_interface.h:83
std::string string
Definition: config.h:50
virtual gpr_timespec gpr_inf_future(gpr_clock_type type)=0
virtual void Start(ServerCompletionQueue **cqs, size_t num_cqs)=0
Start the server.
An abstract collection of call ops, used to generate the grpc_call_op structure to pass down to the l...
Definition: call.h:567
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:137
Definition: server_interface.h:183
ServerInterface *const server_
Definition: server_interface.h:146
Desriptor of an RPC service and its various RPC methods.
Definition: service_type.h:71
virtual void ShutdownInternal(gpr_timespec deadline)=0
Definition: server_interface.h:155
Definition: service_type.h:53
Monotonic clock.
Definition: gpr_types.h:48
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:81
RegisteredAsyncRequest(ServerInterface *server, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, void *tag)
Definition: grpc_types.h:433
Definition: grpc_types.h:56
Definition: async_generic_service.h:60
If you are trying to use CompletionQueue::AsyncNext with a time class that isn't either gpr_timespec ...
Definition: time.h:53
virtual ~BaseAsyncRequest()
Server side rpc method class.
Definition: rpc_service_method.h:71
virtual int max_receive_message_size() const =0
void RequestAsyncCall(RpcServiceMethod *method, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:236
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:64
bool FinalizeResult(void **tag, bool *status) override
Called prior to returning from Next(), return value is the status of the operation (return status is ...
virtual grpc_server * server()=0
Wrapper around grpc_server_credentials, a way to authenticate a server.
Definition: server_credentials.h:50
virtual void PerformOpsOnCall(CallOpSetInterface *ops, Call *call)=0
Straightforward wrapping of the C call object.
Definition: call.h:638
const bool delete_on_finalize_
Definition: server_interface.h:151
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:64
A ServerContext allows the person implementing a service handler to:
Definition: server_context.h:109
Models a gRPC server.
Definition: server_interface.h:60
grpc_call * call_
Definition: server_interface.h:152
CompletionQueue *const call_cq_
Definition: server_interface.h:149
virtual bool RegisterService(const grpc::string *host, Service *service)=0
Register a service.
ServerAsyncStreamingInterface *const stream_
Definition: server_interface.h:148
Definition: async_generic_service.h:47
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
Definition: completion_queue.h:101
bool FinalizeResult(void **tag, bool *status) override
Called prior to returning from Next(), return value is the status of the operation (return status is ...
Definition: server_interface.h:196
void Shutdown(const T &deadline)
Shutdown the server, blocking until all rpc processing finishes.
Definition: server_interface.h:74
BaseAsyncRequest(ServerInterface *server, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, void *tag, bool delete_on_finalize)
ServerContext *const context_
Definition: server_interface.h:147
bool FinalizeResult(void **tag, bool *status) override
Called prior to returning from Next(), return value is the status of the operation (return status is ...
virtual void RegisterAsyncGenericService(AsyncGenericService *service)=0
Register a generic service.
virtual int AddListeningPort(const grpc::string &addr, ServerCredentials *creds)=0
Tries to bind server to the given addr.
void * server_tag() const
Definition: rpc_service_method.h:79
Analogous to struct timespec.
Definition: gpr_types.h:62
Definition: server_interface.h:210
void RequestAsyncGenericCall(GenericServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:245
void *const tag_
Definition: server_interface.h:150
void IssueRequest(void *registered_method, grpc_byte_buffer **payload, ServerCompletionQueue *notification_cq)
virtual void Wait()=0
Block waiting for all work to complete.
A specific type of completion queue used by the processing of notifications by servers.
Definition: completion_queue.h:291
GenericAsyncRequest(ServerInterface *server, GenericServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, bool delete_on_finalize)
NoPayloadAsyncRequest(void *registered_method, ServerInterface *server, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:170
This is an interface that Channel and Server implement to allow them to hook performing ops...
Definition: call_hook.h:44
Definition: server_interface.h:135
void RequestAsyncCall(RpcServiceMethod *method, ServerContext *context, ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, Message *message)
Definition: server_interface.h:225
::google::protobuf::Message Message
Definition: config_protobuf.h:87