19 #ifndef GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H 20 #define GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H 53 Status req_status, std::function<
void()> requester)
106 if ((api_type_ == ApiType::SYNC) &&
107 (type == ApiType::ASYNC || type == ApiType::RAW)) {
110 }
else if (api_type_ != ApiType::SYNC) {
116 "You are marking method %s as '%s', even though it was " 117 "previously marked '%s'. This behavior will overwrite the original " 118 "behavior. If you expected this then ignore this message.",
119 name(), TypeToString(api_type_), TypeToString(type));
127 std::unique_ptr<MethodHandler> handler_;
137 case ApiType::CALL_BACK:
139 case ApiType::RAW_CALL_BACK:
140 return "raw_callback";
150 #endif // GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
ServerContext * server_context
Definition: rpc_service_method.h:61
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:141
#define GPR_INFO
Definition: log.h:56
std::function< void()> call_requester
Definition: rpc_service_method.h:64
void * server_tag() const
Definition: rpc_service_method.h:100
ApiType
Definition: rpc_service_method.h:91
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
virtual ~MethodHandler()
Definition: rpc_service_method.h:41
Definition: async_unary_call.h:304
Definition: grpc_types.h:40
MethodHandler * handler() const
if MethodHandler is nullptr, then this is an async method
Definition: rpc_service_method.h:102
RpcType
Definition: rpc_method.h:31
Call * call
Definition: rpc_service_method.h:60
void SetHandler(MethodHandler *handler)
Definition: rpc_service_method.h:104
Descriptor of an RPC method.
Definition: rpc_method.h:29
ApiType api_type() const
Definition: rpc_service_method.h:103
void set_server_tag(void *tag)
Definition: rpc_service_method.h:99
HandlerParameter(Call *c, ServerContext *context, void *req, Status req_status, std::function< void()> requester)
Constructor for HandlerParameter.
Definition: rpc_service_method.h:52
virtual void RunHandler(const HandlerParameter ¶m)=0
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
Server side rpc method class.
Definition: rpc_service_method.h:81
void SetServerApiType(RpcServiceMethod::ApiType type)
Definition: rpc_service_method.h:105
Definition: rpc_service_method.h:42
A ServerContext allows the person implementing a service handler to:
Definition: server_context.h:109
RpcServiceMethod(const char *name, RpcMethod::RpcType type, MethodHandler *handler)
Takes ownership of the handler.
Definition: rpc_service_method.h:84
~HandlerParameter()
Definition: rpc_service_method.h:59
virtual void * Deserialize(grpc_call *call, grpc_byte_buffer *req, Status *status)
Definition: rpc_service_method.h:73
Base class for running an RPC handler.
Definition: rpc_service_method.h:39
Did it work? If it didn't, why?
Definition: status.h:31
Status status
Definition: rpc_service_method.h:63
void * request
Definition: rpc_service_method.h:62
Straightforward wrapping of the C call object.
Definition: call.h:36