19 #ifndef GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H 20 #define GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H 31 class AsyncGenericService;
33 class GenericServerContext;
34 class ServerCompletionQueue;
36 class ServerCredentials;
45 class ServerAsyncStreamingInterface;
103 virtual void Wait() = 0;
106 friend class ::grpc::Service;
138 virtual void ShutdownInternal(
gpr_timespec deadline) = 0;
140 virtual int max_receive_message_size()
const = 0;
152 bool delete_on_finalize);
155 bool FinalizeResult(
void** tag,
bool* status)
override;
188 IssueRequest(registered_method,
nullptr, notification_cq);
194 template <
class Message>
204 registered_method_(registered_method),
209 notification_cq_(notification_cq),
212 IssueRequest(registered_method, payload_.bbuf_ptr(), notification_cq);
222 payload_.bbuf_ptr(), request_)
228 g_core_codegen_interface->grpc_call_cancel_with_status(
230 g_core_codegen_interface->grpc_call_unref(call_);
232 stream_, call_cq_, notification_cq_, tag_,
238 return RegisteredAsyncRequest::FinalizeResult(tag, status);
242 void*
const registered_method_;
259 bool delete_on_finalize);
261 bool FinalizeResult(
void** tag,
bool* status)
override;
267 template <
class Message>
276 stream, call_cq, notification_cq, tag,
287 call_cq, notification_cq, tag);
302 #endif // GRPCPP_IMPL_CODEGEN_SERVER_INTERFACE_H struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
virtual ~ServerInterface()
Definition: server_interface.h:50
Definition: server_interface.h:180
void RequestAsyncGenericCall(GenericServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:290
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:138
void Shutdown()
Shutdown the server without a deadline and forced cancellation.
Definition: server_interface.h:94
std::string string
Definition: config.h:35
An interface allowing implementors to process and filter event tags.
Definition: completion_queue_tag.h:26
void * server_tag() const
Definition: rpc_service_method.h:64
Definition: server_interface.h:195
ServerInterface *const server_
Definition: server_interface.h:158
Desriptor of an RPC service and its various RPC methods.
Definition: service_type.h:58
Definition: server_interface.h:167
void RequestAsyncCall(internal::RpcServiceMethod *method, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, Message *message)
Definition: server_interface.h:268
Monotonic clock.
Definition: gpr_types.h:33
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:65
Definition: service_type.h:39
Definition: grpc_types.h:478
Definition: grpc_types.h:40
Definition: async_generic_service.h:62
If you are trying to use CompletionQueue::AsyncNext with a time class that isn't either gpr_timespec ...
Definition: time.h:40
PayloadAsyncRequest(void *registered_method, ServerInterface *server, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag, Message *request)
Definition: server_interface.h:197
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:58
Wrapper around grpc_server_credentials, a way to authenticate a server.
Definition: server_credentials.h:35
internal::ServerAsyncStreamingInterface *const stream_
Definition: server_interface.h:160
An Alarm posts the user provided tag to its associated completion queue upon expiry or cancellation...
Definition: alarm.h:31
const bool delete_on_finalize_
Definition: server_interface.h:163
Server side rpc method class.
Definition: rpc_service_method.h:56
CoreCodegenInterface * g_core_codegen_interface
Definition: call.h:46
void RequestAsyncCall(internal::RpcServiceMethod *method, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:280
A ServerContext allows the person implementing a service handler to:
Definition: server_context.h:96
Definition: server_interface.h:48
grpc_call * call_
Definition: server_interface.h:164
CompletionQueue *const call_cq_
Definition: server_interface.h:161
Definition: async_generic_service.h:32
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
Definition: completion_queue.h:94
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:219
void Shutdown(const T &deadline)
Shutdown does the following things:
Definition: server_interface.h:85
An abstract collection of call ops, used to generate the grpc_call_op structure to pass down to the l...
Definition: call.h:606
~PayloadAsyncRequest()
Definition: server_interface.h:215
ServerContext *const context_
Definition: server_interface.h:159
Internal errors.
Definition: status.h:127
Analogous to struct timespec.
Definition: gpr_types.h:47
Definition: server_interface.h:253
void *const tag_
Definition: server_interface.h:162
NoPayloadAsyncRequest(void *registered_method, ServerInterface *server, ServerContext *context, internal::ServerAsyncStreamingInterface *stream, CompletionQueue *call_cq, ServerCompletionQueue *notification_cq, void *tag)
Definition: server_interface.h:182
A specific type of completion queue used by the processing of notifications by servers.
Definition: completion_queue.h:364
This is an interface that Channel and Server implement to allow them to hook performing ops...
Definition: call_hook.h:30
A sequence of bytes.
Definition: byte_buffer.h:53
Definition: server_interface.h:147
Straightforward wrapping of the C call object.
Definition: call.h:663
::google::protobuf::Message Message
Definition: config_protobuf.h:72