Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_RPC_SERVICE_METHOD_H
20 #define GRPCPP_IMPL_RPC_SERVICE_METHOD_H
35 class ServerContextBase;
53 Status req_status,
void* handler_data,
54 std::function<
void()> requester)
119 "You are marking method %s as '%s', even though it was "
120 "previously marked '%s'. This behavior will overwrite the original "
121 "behavior. If you expected this then ignore this message.",
122 name(), TypeToString(api_type_), TypeToString(type));
130 std::unique_ptr<MethodHandler> handler_;
143 return "raw_callback";
153 #endif // GRPCPP_IMPL_RPC_SERVICE_METHOD_H
void SetServerApiType(RpcServiceMethod::ApiType type)
Definition: rpc_service_method.h:108
ApiType
Definition: rpc_service_method.h:94
const Status status
Definition: rpc_service_method.h:65
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:32
Definition: rpc_service_method.h:41
RpcServiceMethod(const char *name, RpcMethod::RpcType type, MethodHandler *handler)
Takes ownership of the handler.
Definition: rpc_service_method.h:87
void *const request
Definition: rpc_service_method.h:64
Straightforward wrapping of the C call object.
Definition: call.h:36
#define GPR_ASSERT(x)
abort() the process if x is zero, having written a line to the log.
Definition: log.h:95
Base class of ServerContext.
Definition: server_context.h:124
Call *const call
Definition: rpc_service_method.h:62
virtual void * Deserialize(grpc_call *, grpc_byte_buffer *req, Status *, void **)
Definition: rpc_service_method.h:76
MethodHandler * handler() const
if MethodHandler is nullptr, then this is an async method
Definition: rpc_service_method.h:105
const char * name() const
Definition: rpc_method.h:64
void SetHandler(MethodHandler *handler)
Definition: rpc_service_method.h:107
const std::function< void()> call_requester
Definition: rpc_service_method.h:67
virtual void RunHandler(const HandlerParameter ¶m)=0
#define GPR_INFO
Definition: log.h:54
Did it work? If it didn't, why?
Definition: status.h:35
ApiType api_type() const
Definition: rpc_service_method.h:106
~HandlerParameter()
Definition: rpc_service_method.h:61
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:52
void * server_tag() const
Definition: rpc_service_method.h:103
RpcType
Definition: rpc_method.h:31
Base class for running an RPC handler.
Definition: rpc_service_method.h:38
grpc::ServerContextBase *const server_context
Definition: rpc_service_method.h:63
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
Definition: async_unary_call.h:405
void set_server_tag(void *tag)
Definition: rpc_service_method.h:102
void *const internal_data
Definition: rpc_service_method.h:66
Server side rpc method class.
Definition: rpc_service_method.h:84
Descriptor of an RPC method.
Definition: rpc_method.h:29
virtual ~MethodHandler()
Definition: rpc_service_method.h:40