Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H
20 #define GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H
56 void* req,
Status req_status,
void* handler_data,
57 std::function<
void()> requester)
122 "You are marking method %s as '%s', even though it was "
123 "previously marked '%s'. This behavior will overwrite the original "
124 "behavior. If you expected this then ignore this message.",
125 name(), TypeToString(api_type_), TypeToString(type));
133 std::unique_ptr<MethodHandler> handler_;
146 return "raw_callback";
156 #endif // GRPCPP_IMPL_CODEGEN_RPC_SERVICE_METHOD_H
void SetServerApiType(RpcServiceMethod::ApiType type)
Definition: rpc_service_method.h:111
ApiType
Definition: rpc_service_method.h:97
#define GPR_INFO
Definition: log.h:56
::grpc_impl::ServerContextBase *const server_context
Definition: rpc_service_method.h:66
const Status status
Definition: rpc_service_method.h:68
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
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: rpc_service_method.h:44
RpcServiceMethod(const char *name, RpcMethod::RpcType type, MethodHandler *handler)
Takes ownership of the handler.
Definition: rpc_service_method.h:90
void *const request
Definition: rpc_service_method.h:67
Straightforward wrapping of the C call object.
Definition: call.h:38
Base class of ServerContext. Experimental until callback API is final.
Definition: server_context_impl.h:123
Call *const call
Definition: rpc_service_method.h:65
virtual void * Deserialize(grpc_call *, grpc_byte_buffer *req, Status *, void **)
Definition: rpc_service_method.h:79
MethodHandler * handler() const
if MethodHandler is nullptr, then this is an async method
Definition: rpc_service_method.h:108
const char * name() const
Definition: rpc_method.h:47
void SetHandler(MethodHandler *handler)
Definition: rpc_service_method.h:110
const std::function< void()> call_requester
Definition: rpc_service_method.h:70
virtual void RunHandler(const HandlerParameter ¶m)=0
Did it work? If it didn't, why?
Definition: status.h:31
ApiType api_type() const
Definition: rpc_service_method.h:109
~HandlerParameter()
Definition: rpc_service_method.h:64
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
Definition: grpc_types.h:40
HandlerParameter(Call *c, ::grpc_impl::ServerContextBase *context, void *req, Status req_status, void *handler_data, std::function< void()> requester)
Constructor for HandlerParameter.
Definition: rpc_service_method.h:55
void * server_tag() const
Definition: rpc_service_method.h:106
RpcType
Definition: rpc_method.h:31
Base class for running an RPC handler.
Definition: rpc_service_method.h:41
::grpc_impl::ServerContextBase ServerContextBase
Definition: server_context.h:36
Definition: async_unary_call_impl.h:301
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
void set_server_tag(void *tag)
Definition: rpc_service_method.h:105
void *const internal_data
Definition: rpc_service_method.h:69
#define GPR_CODEGEN_ASSERT(x)
Codegen specific version of GPR_ASSERT.
Definition: core_codegen_interface.h:146
Server side rpc method class.
Definition: rpc_service_method.h:87
Descriptor of an RPC method.
Definition: rpc_method.h:29
virtual ~MethodHandler()
Definition: rpc_service_method.h:43