#include <interceptor_common.h>
|
void | AddInterceptionHookPoint (experimental::InterceptionHookPoints type) |
|
void | ClearState () |
|
void | FailHijackedRecvMessage () override |
|
void | FailHijackedSendMessage () override |
|
std::unique_ptr< ChannelInterface > | GetInterceptedChannel () override |
|
std::multimap< grpc::string_ref, grpc::string_ref > * | GetRecvInitialMetadata () override |
|
void * | GetRecvMessage () override |
|
Status * | GetRecvStatus () override |
|
std::multimap< grpc::string_ref, grpc::string_ref > * | GetRecvTrailingMetadata () override |
|
std::multimap< std::string, std::string > * | GetSendInitialMetadata () override |
|
const void * | GetSendMessage () override |
|
bool | GetSendMessageStatus () override |
|
Status | GetSendStatus () override |
| Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions. More...
|
|
std::multimap< std::string, std::string > * | GetSendTrailingMetadata () override |
|
ByteBuffer * | GetSerializedSendMessage () override |
|
void | Hijack () override |
|
| InterceptorBatchMethodsImpl () |
|
bool | InterceptorsListEmpty () |
|
void | ModifySendMessage (const void *message) override |
|
void | ModifySendStatus (const Status &status) override |
|
void | Proceed () override |
|
bool | QueryInterceptionHookPoint (experimental::InterceptionHookPoints type) override |
|
bool | RunInterceptors () |
|
bool | RunInterceptors (std::function< void(void)> f) |
|
void | SetCall (Call *call) |
|
void | SetCallOpSetInterface (CallOpSetInterface *ops) |
|
void | SetRecvInitialMetadata (MetadataMap *map) |
|
void | SetRecvMessage (void *message, bool *hijacked_recv_message_failed) |
|
void | SetRecvStatus (Status *status) |
|
void | SetRecvTrailingMetadata (MetadataMap *map) |
|
void | SetReverse () |
|
void | SetSendInitialMetadata (std::multimap< std::string, std::string > *metadata) |
|
void | SetSendMessage (ByteBuffer *buf, const void **msg, bool *fail_send_message, std::function< Status(const void *)> serializer) |
|
void | SetSendStatus (grpc_status_code *code, std::string *error_details, std::string *error_message) |
|
void | SetSendTrailingMetadata (std::multimap< std::string, std::string > *metadata) |
|
| ~InterceptorBatchMethodsImpl () override |
|
virtual | ~InterceptorBatchMethods () |
|
Definition at line 37 of file interceptor_common.h.
◆ InterceptorBatchMethodsImpl()
grpc::internal::InterceptorBatchMethodsImpl::InterceptorBatchMethodsImpl |
( |
| ) |
|
|
inline |
◆ ~InterceptorBatchMethodsImpl()
grpc::internal::InterceptorBatchMethodsImpl::~InterceptorBatchMethodsImpl |
( |
| ) |
|
|
inlineoverride |
◆ AddInterceptionHookPoint()
◆ ClearHookPoints()
void grpc::internal::InterceptorBatchMethodsImpl::ClearHookPoints |
( |
| ) |
|
|
inlineprivate |
◆ ClearState()
void grpc::internal::InterceptorBatchMethodsImpl::ClearState |
( |
| ) |
|
|
inline |
◆ FailHijackedRecvMessage()
void grpc::internal::InterceptorBatchMethodsImpl::FailHijackedRecvMessage |
( |
| ) |
|
|
inlineoverridevirtual |
◆ FailHijackedSendMessage()
void grpc::internal::InterceptorBatchMethodsImpl::FailHijackedSendMessage |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetInterceptedChannel()
std::unique_ptr<ChannelInterface> grpc::internal::InterceptorBatchMethodsImpl::GetInterceptedChannel |
( |
| ) |
|
|
inlineoverridevirtual |
Gets an intercepted channel. When a call is started on this interceptor, only interceptors after the current interceptor are created from the factory objects registered with the channel. This allows calls to be started from interceptors without infinite regress through the interceptor list.
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 184 of file interceptor_common.h.
◆ GetRecvInitialMetadata()
◆ GetRecvMessage()
void* grpc::internal::InterceptorBatchMethodsImpl::GetRecvMessage |
( |
| ) |
|
|
inlineoverridevirtual |
Returns a pointer to the modifiable received message. Note that the message is already deserialized but the type is not set; the interceptor should static_cast to the appropriate type before using it. This is valid for PRE_RECV_MESSAGE and POST_RECV_MESSAGE interceptions; nullptr for not valid
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 123 of file interceptor_common.h.
◆ GetRecvStatus()
Status* grpc::internal::InterceptorBatchMethodsImpl::GetRecvStatus |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetRecvTrailingMetadata()
◆ GetSendInitialMetadata()
std::multimap<std::string, std::string>* grpc::internal::InterceptorBatchMethodsImpl::GetSendInitialMetadata |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetSendMessage()
const void* grpc::internal::InterceptorBatchMethodsImpl::GetSendMessage |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetSendMessageStatus()
bool grpc::internal::InterceptorBatchMethodsImpl::GetSendMessageStatus |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetSendStatus()
Status grpc::internal::InterceptorBatchMethodsImpl::GetSendStatus |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetSendTrailingMetadata()
std::multimap<std::string, std::string>* grpc::internal::InterceptorBatchMethodsImpl::GetSendTrailingMetadata |
( |
| ) |
|
|
inlineoverridevirtual |
◆ GetSerializedSendMessage()
ByteBuffer* grpc::internal::InterceptorBatchMethodsImpl::GetSerializedSendMessage |
( |
| ) |
|
|
inlineoverridevirtual |
Send Message Methods GetSerializedSendMessage and GetSendMessage/ModifySendMessage are the available methods to view and modify the request payload. An interceptor can access the payload in either serialized form or non-serialized form but not both at the same time. gRPC performs serialization in a lazy manner, which means that a call to GetSerializedSendMessage will result in a serialization operation if the payload stored is not in the serialized form already; the non-serialized form will be lost and GetSendMessage will no longer return a valid pointer, and this will remain true for later interceptors too. This can change however if ModifySendMessage is used to replace the current payload. Note that ModifySendMessage requires a new payload message in the non-serialized form. This will overwrite the existing payload irrespective of whether it had been serialized earlier. Also note that gRPC Async API requires early serialization of the payload which means that the payload would be available in the serialized form only unless an interceptor replaces the payload with ModifySendMessage. Returns a modifable ByteBuffer holding the serialized form of the message that is going to be sent. Valid for PRE_SEND_MESSAGE interceptions. A return value of nullptr indicates that this ByteBuffer is not valid.
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 83 of file interceptor_common.h.
◆ Hijack()
void grpc::internal::InterceptorBatchMethodsImpl::Hijack |
( |
| ) |
|
|
inlineoverridevirtual |
Indicate that the interceptor has hijacked the RPC (only valid if the batch contains send_initial_metadata on the client side). Later interceptors in the interceptor list will not be called. Later batches on the same RPC will go through interception, but only up to the point of the hijacking interceptor.
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 64 of file interceptor_common.h.
◆ InterceptorsListEmpty()
bool grpc::internal::InterceptorBatchMethodsImpl::InterceptorsListEmpty |
( |
| ) |
|
|
inline |
◆ ModifySendMessage()
void grpc::internal::InterceptorBatchMethodsImpl::ModifySendMessage |
( |
const void * |
message | ) |
|
|
inlineoverridevirtual |
Overwrites the message to be sent with message. message should be in the non-serialized form expected by the method. Valid for PRE_SEND_MESSAGE interceptions. Note that the interceptor is responsible for maintaining the life of the message till it is serialized or it receives the POST_SEND_MESSAGE interception point, whichever happens earlier. The modifying interceptor may itself force early serialization by calling GetSerializedSendMessage.
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 97 of file interceptor_common.h.
◆ ModifySendStatus()
void grpc::internal::InterceptorBatchMethodsImpl::ModifySendStatus |
( |
const Status & |
status | ) |
|
|
inlineoverridevirtual |
◆ Proceed()
void grpc::internal::InterceptorBatchMethodsImpl::Proceed |
( |
| ) |
|
|
inlineoverridevirtual |
Signal that the interceptor is done intercepting the current batch of the RPC. Every interceptor must either call Proceed or Hijack on each interception. In most cases, only Proceed will be used. Explicit use of Proceed is what enables interceptors to delay the processing of RPCs while they perform other work. Proceed is a no-op if the batch contains PRE_SEND_CANCEL. Simply returning from the Intercept method does the job of continuing the RPC in this case. This is because PRE_SEND_CANCEL is always in a separate batch and is not allowed to be delayed.
Implements grpc::experimental::InterceptorBatchMethods.
Definition at line 56 of file interceptor_common.h.
◆ ProceedClient()
void grpc::internal::InterceptorBatchMethodsImpl::ProceedClient |
( |
| ) |
|
|
inlineprivate |
◆ ProceedServer()
void grpc::internal::InterceptorBatchMethodsImpl::ProceedServer |
( |
| ) |
|
|
inlineprivate |
◆ QueryInterceptionHookPoint()
◆ RunClientInterceptors()
void grpc::internal::InterceptorBatchMethodsImpl::RunClientInterceptors |
( |
| ) |
|
|
inlineprivate |
◆ RunInterceptors() [1/2]
bool grpc::internal::InterceptorBatchMethodsImpl::RunInterceptors |
( |
| ) |
|
|
inline |
◆ RunInterceptors() [2/2]
bool grpc::internal::InterceptorBatchMethodsImpl::RunInterceptors |
( |
std::function< void(void)> |
f | ) |
|
|
inline |
◆ RunServerInterceptors()
void grpc::internal::InterceptorBatchMethodsImpl::RunServerInterceptors |
( |
| ) |
|
|
inlineprivate |
◆ SetCall()
void grpc::internal::InterceptorBatchMethodsImpl::SetCall |
( |
Call * |
call | ) |
|
|
inline |
◆ SetCallOpSetInterface()
void grpc::internal::InterceptorBatchMethodsImpl::SetCallOpSetInterface |
( |
CallOpSetInterface * |
ops | ) |
|
|
inline |
◆ SetRecvInitialMetadata()
void grpc::internal::InterceptorBatchMethodsImpl::SetRecvInitialMetadata |
( |
MetadataMap * |
map | ) |
|
|
inline |
◆ SetRecvMessage()
void grpc::internal::InterceptorBatchMethodsImpl::SetRecvMessage |
( |
void * |
message, |
|
|
bool * |
hijacked_recv_message_failed |
|
) |
| |
|
inline |
◆ SetRecvStatus()
void grpc::internal::InterceptorBatchMethodsImpl::SetRecvStatus |
( |
Status * |
status | ) |
|
|
inline |
◆ SetRecvTrailingMetadata()
void grpc::internal::InterceptorBatchMethodsImpl::SetRecvTrailingMetadata |
( |
MetadataMap * |
map | ) |
|
|
inline |
◆ SetReverse()
void grpc::internal::InterceptorBatchMethodsImpl::SetReverse |
( |
| ) |
|
|
inline |
◆ SetSendInitialMetadata()
void grpc::internal::InterceptorBatchMethodsImpl::SetSendInitialMetadata |
( |
std::multimap< std::string, std::string > * |
metadata | ) |
|
|
inline |
◆ SetSendMessage()
◆ SetSendStatus()
void grpc::internal::InterceptorBatchMethodsImpl::SetSendStatus |
( |
grpc_status_code * |
code, |
|
|
std::string * |
error_details, |
|
|
std::string * |
error_message |
|
) |
| |
|
inline |
◆ SetSendTrailingMetadata()
void grpc::internal::InterceptorBatchMethodsImpl::SetSendTrailingMetadata |
( |
std::multimap< std::string, std::string > * |
metadata | ) |
|
|
inline |
◆ call_
Call* grpc::internal::InterceptorBatchMethodsImpl::call_ = nullptr |
|
private |
◆ callback_
std::function<void(void)> grpc::internal::InterceptorBatchMethodsImpl::callback_ |
|
private |
◆ code_
◆ current_interceptor_index_
size_t grpc::internal::InterceptorBatchMethodsImpl::current_interceptor_index_ = 0 |
|
private |
◆ error_details_
std::string* grpc::internal::InterceptorBatchMethodsImpl::error_details_ = nullptr |
|
private |
◆ error_message_
std::string* grpc::internal::InterceptorBatchMethodsImpl::error_message_ = nullptr |
|
private |
◆ fail_send_message_
bool* grpc::internal::InterceptorBatchMethodsImpl::fail_send_message_ = nullptr |
|
private |
◆ hijacked_recv_message_failed_
bool* grpc::internal::InterceptorBatchMethodsImpl::hijacked_recv_message_failed_ = nullptr |
|
private |
◆ hooks_
◆ ops_
◆ orig_send_message_
const void** grpc::internal::InterceptorBatchMethodsImpl::orig_send_message_ = nullptr |
|
private |
◆ ran_hijacking_interceptor_
bool grpc::internal::InterceptorBatchMethodsImpl::ran_hijacking_interceptor_ = false |
|
private |
◆ recv_initial_metadata_
MetadataMap* grpc::internal::InterceptorBatchMethodsImpl::recv_initial_metadata_ = nullptr |
|
private |
◆ recv_message_
void* grpc::internal::InterceptorBatchMethodsImpl::recv_message_ = nullptr |
|
private |
◆ recv_status_
Status* grpc::internal::InterceptorBatchMethodsImpl::recv_status_ = nullptr |
|
private |
◆ recv_trailing_metadata_
MetadataMap* grpc::internal::InterceptorBatchMethodsImpl::recv_trailing_metadata_ = nullptr |
|
private |
◆ reverse_
bool grpc::internal::InterceptorBatchMethodsImpl::reverse_ = false |
|
private |
◆ send_initial_metadata_
std::multimap<std::string, std::string>* grpc::internal::InterceptorBatchMethodsImpl::send_initial_metadata_ |
|
private |
◆ send_message_
ByteBuffer* grpc::internal::InterceptorBatchMethodsImpl::send_message_ = nullptr |
|
private |
◆ send_trailing_metadata_
std::multimap<std::string, std::string>* grpc::internal::InterceptorBatchMethodsImpl::send_trailing_metadata_ = nullptr |
|
private |
◆ serializer_
The documentation for this class was generated from the following file: