Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc::experimental::ServerRpcInfo Class Reference

#include <server_interceptor.h>

Public Types

enum  Type { Type::UNARY, Type::CLIENT_STREAMING, Type::SERVER_STREAMING, Type::BIDI_STREAMING }
 Type categorizes RPCs by unary or streaming type. More...
 

Public Member Functions

const char * method () const
 Return the fully-specified method name. More...
 
ServerRpcInfooperator= (const ServerRpcInfo &)=delete
 
ServerRpcInfooperator= (ServerRpcInfo &&)=delete
 
ServerContextBaseserver_context ()
 
 ServerRpcInfo (const ServerRpcInfo &)=delete
 
 ServerRpcInfo (ServerRpcInfo &&)=delete
 
Type type () const
 Return the type of the RPC (unary or a streaming flavor) More...
 
 ~ServerRpcInfo ()
 

Private Member Functions

void Ref ()
 
void RegisterInterceptors (const std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface >> &creators)
 
void RunInterceptor (experimental::InterceptorBatchMethods *interceptor_methods, size_t pos)
 
 ServerRpcInfo (ServerContextBase *ctx, const char *method, internal::RpcMethod::RpcType type)
 
void Unref ()
 

Private Attributes

ServerContextBasectx_ = nullptr
 
std::vector< std::unique_ptr< experimental::Interceptor > > interceptors_
 
const char * method_ = nullptr
 
std::atomic< intptr_tref_ {1}
 
const Type type_
 

Friends

class grpc::ServerContextBase
 
class internal::InterceptorBatchMethodsImpl
 

Detailed Description

ServerRpcInfo represents the state of a particular RPC as it appears to an interceptor. It is created and owned by the library and passed to the CreateServerInterceptor method of the application's ServerInterceptorFactoryInterface implementation

Definition at line 58 of file impl/codegen/server_interceptor.h.

Member Enumeration Documentation

◆ Type

Type categorizes RPCs by unary or streaming type.

Enumerator
UNARY 
CLIENT_STREAMING 
SERVER_STREAMING 
BIDI_STREAMING 

Definition at line 61 of file impl/codegen/server_interceptor.h.

Constructor & Destructor Documentation

◆ ~ServerRpcInfo()

grpc::experimental::ServerRpcInfo::~ServerRpcInfo ( )
inline

Definition at line 63 of file impl/codegen/server_interceptor.h.

◆ ServerRpcInfo() [1/3]

grpc::experimental::ServerRpcInfo::ServerRpcInfo ( const ServerRpcInfo )
delete

◆ ServerRpcInfo() [2/3]

grpc::experimental::ServerRpcInfo::ServerRpcInfo ( ServerRpcInfo &&  )
delete

◆ ServerRpcInfo() [3/3]

grpc::experimental::ServerRpcInfo::ServerRpcInfo ( ServerContextBase ctx,
const char *  method,
internal::RpcMethod::RpcType  type 
)
inlineprivate

Definition at line 97 of file impl/codegen/server_interceptor.h.

Member Function Documentation

◆ method()

const char* grpc::experimental::ServerRpcInfo::method ( ) const
inline

Return the fully-specified method name.

Definition at line 74 of file impl/codegen/server_interceptor.h.

◆ operator=() [1/2]

ServerRpcInfo& grpc::experimental::ServerRpcInfo::operator= ( const ServerRpcInfo )
delete

◆ operator=() [2/2]

ServerRpcInfo& grpc::experimental::ServerRpcInfo::operator= ( ServerRpcInfo &&  )
delete

◆ Ref()

void grpc::experimental::ServerRpcInfo::Ref ( )
inlineprivate

Definition at line 121 of file impl/codegen/server_interceptor.h.

◆ RegisterInterceptors()

void grpc::experimental::ServerRpcInfo::RegisterInterceptors ( const std::vector< std::unique_ptr< experimental::ServerInterceptorFactoryInterface >> &  creators)
inlineprivate

Definition at line 108 of file impl/codegen/server_interceptor.h.

◆ RunInterceptor()

void grpc::experimental::ServerRpcInfo::RunInterceptor ( experimental::InterceptorBatchMethods interceptor_methods,
size_t  pos 
)
inlineprivate

Definition at line 102 of file impl/codegen/server_interceptor.h.

◆ server_context()

ServerContextBase* grpc::experimental::ServerRpcInfo::server_context ( )
inline

Return a pointer to the underlying ServerContext structure associated with the RPC to support features that apply to it

Definition at line 81 of file impl/codegen/server_interceptor.h.

◆ type()

Type grpc::experimental::ServerRpcInfo::type ( ) const
inline

Return the type of the RPC (unary or a streaming flavor)

Definition at line 77 of file impl/codegen/server_interceptor.h.

◆ Unref()

void grpc::experimental::ServerRpcInfo::Unref ( )
inlineprivate

Definition at line 122 of file impl/codegen/server_interceptor.h.

Friends And Related Function Documentation

◆ grpc::ServerContextBase

friend class grpc::ServerContextBase
friend

Definition at line 135 of file impl/codegen/server_interceptor.h.

◆ internal::InterceptorBatchMethodsImpl

Definition at line 134 of file impl/codegen/server_interceptor.h.

Member Data Documentation

◆ ctx_

ServerContextBase* grpc::experimental::ServerRpcInfo::ctx_ = nullptr
private

Definition at line 128 of file impl/codegen/server_interceptor.h.

◆ interceptors_

std::vector<std::unique_ptr<experimental::Interceptor> > grpc::experimental::ServerRpcInfo::interceptors_
private

Definition at line 132 of file impl/codegen/server_interceptor.h.

◆ method_

const char* grpc::experimental::ServerRpcInfo::method_ = nullptr
private

Definition at line 129 of file impl/codegen/server_interceptor.h.

◆ ref_

std::atomic<intptr_t> grpc::experimental::ServerRpcInfo::ref_ {1}
private

Definition at line 131 of file impl/codegen/server_interceptor.h.

◆ type_

const Type grpc::experimental::ServerRpcInfo::type_
private

Definition at line 130 of file impl/codegen/server_interceptor.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:32