Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_RPC_SERVICE_METHOD_H
20 #define GRPCPP_IMPL_RPC_SERVICE_METHOD_H
28 #include "absl/log/absl_check.h"
29 #include "absl/log/absl_log.h"
37 class ServerContextBase;
55 Status req_status,
void* handler_data,
56 std::function<
void()> requester)
80 ABSL_CHECK_EQ(req,
nullptr);
120 <<
"You are marking method " <<
name() <<
" as '"
121 << TypeToString(api_type_)
122 <<
"', even though it was previously marked '" << TypeToString(type)
123 <<
"'. This behavior will overwrite the original behavior. If "
124 "you expected this then ignore this message.";
132 std::unique_ptr<MethodHandler> handler_;
145 return "raw_callback";
155 #endif // GRPCPP_IMPL_RPC_SERVICE_METHOD_H
void SetServerApiType(RpcServiceMethod::ApiType type)
Definition: rpc_service_method.h:110
ApiType
Definition: rpc_service_method.h:96
const Status status
Definition: rpc_service_method.h:67
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
Definition: rpc_service_method.h:43
RpcServiceMethod(const char *name, RpcMethod::RpcType type, MethodHandler *handler)
Takes ownership of the handler.
Definition: rpc_service_method.h:89
void *const request
Definition: rpc_service_method.h:66
Straightforward wrapping of the C call object.
Definition: call.h:36
Base class of ServerContext.
Definition: server_context.h:124
Call *const call
Definition: rpc_service_method.h:64
virtual void * Deserialize(grpc_call *, grpc_byte_buffer *req, Status *, void **)
Definition: rpc_service_method.h:78
MethodHandler * handler() const
if MethodHandler is nullptr, then this is an async method
Definition: rpc_service_method.h:107
const char * name() const
Definition: rpc_method.h:64
void SetHandler(MethodHandler *handler)
Definition: rpc_service_method.h:109
const std::function< void()> call_requester
Definition: rpc_service_method.h:69
virtual void RunHandler(const HandlerParameter ¶m)=0
Did it work? If it didn't, why?
Definition: status.h:34
ApiType api_type() const
Definition: rpc_service_method.h:108
~HandlerParameter()
Definition: rpc_service_method.h:63
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:69
Definition: grpc_types.h:42
HandlerParameter(Call *c, grpc::ServerContextBase *context, void *req, Status req_status, void *handler_data, std::function< void()> requester)
Constructor for HandlerParameter.
Definition: rpc_service_method.h:54
void * server_tag() const
Definition: rpc_service_method.h:105
RpcType
Definition: rpc_method.h:31
Base class for running an RPC handler.
Definition: rpc_service_method.h:40
grpc::ServerContextBase *const server_context
Definition: rpc_service_method.h:65
Definition: async_unary_call.h:407
void set_server_tag(void *tag)
Definition: rpc_service_method.h:104
void *const internal_data
Definition: rpc_service_method.h:68
Server side rpc method class.
Definition: rpc_service_method.h:86
Descriptor of an RPC method.
Definition: rpc_method.h:29
virtual ~MethodHandler()
Definition: rpc_service_method.h:42