|
GRPC C++
1.18.0
|
Class that is passed as an argument to the Intercept method of the application's Interceptor interface implementation. More...
#include <interceptor.h>
Public Member Functions | |
| virtual | ~InterceptorBatchMethods () |
| virtual bool | QueryInterceptionHookPoint (InterceptionHookPoints type)=0 |
| Determine whether the current batch has an interception hook point of type type. More... | |
| virtual void | Proceed ()=0 |
| Signal that the interceptor is done intercepting the current batch of the RPC. More... | |
| virtual void | Hijack ()=0 |
| Indicate that the interceptor has hijacked the RPC (only valid if the batch contains send_initial_metadata on the client side). More... | |
| virtual ByteBuffer * | GetSendMessage ()=0 |
| Returns a modifable ByteBuffer holding the serialized form of the message that is going to be sent. More... | |
| virtual std::multimap< grpc::string, grpc::string > * | GetSendInitialMetadata ()=0 |
| Returns a modifiable multimap of the initial metadata to be sent. More... | |
| virtual Status | GetSendStatus ()=0 |
| Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions. More... | |
| virtual void | ModifySendStatus (const Status &status)=0 |
| Overwrites the status with status. More... | |
| virtual std::multimap< grpc::string, grpc::string > * | GetSendTrailingMetadata ()=0 |
| Returns a modifiable multimap of the trailing metadata to be sent. More... | |
| virtual void * | GetRecvMessage ()=0 |
| Returns a pointer to the modifiable received message. More... | |
| virtual std::multimap< grpc::string_ref, grpc::string_ref > * | GetRecvInitialMetadata ()=0 |
| Returns a modifiable multimap of the received initial metadata. More... | |
| virtual Status * | GetRecvStatus ()=0 |
| Returns a modifiable view of the received status on POST_RECV_STATUS interceptions; nullptr if not valid. More... | |
| virtual std::multimap< grpc::string_ref, grpc::string_ref > * | GetRecvTrailingMetadata ()=0 |
| Returns a modifiable multimap of the received trailing metadata on POST_RECV_STATUS interceptions; nullptr if not valid. More... | |
| virtual std::unique_ptr< ChannelInterface > | GetInterceptedChannel ()=0 |
| Gets an intercepted channel. More... | |
Class that is passed as an argument to the Intercept method of the application's Interceptor interface implementation.
It has five purposes:
|
inlinevirtual |
|
pure virtual |
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.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns a modifiable multimap of the received initial metadata.
Valid for POST_RECV_INITIAL_METADATA interceptions; nullptr if not valid
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
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 POST_RECV_MESSAGE interceptions; nullptr for not valid
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns a modifiable view of the received status on POST_RECV_STATUS interceptions; nullptr if not valid.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns a modifiable multimap of the received trailing metadata on POST_RECV_STATUS interceptions; nullptr if not valid.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns a modifiable multimap of the initial metadata to be sent.
Valid for PRE_SEND_INITIAL_METADATA interceptions. A value of nullptr indicates that this field is not valid.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
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.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Returns a modifiable multimap of the trailing metadata to be sent.
Valid for PRE_SEND_STATUS interceptions. A value of nullptr indicates that this field is not valid.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
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.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Overwrites the status with status.
Valid for PRE_SEND_STATUS interceptions.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
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.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
|
pure virtual |
Determine whether the current batch has an interception hook point of type type.
Implemented in grpc::internal::CancelInterceptorBatchMethods, and grpc::internal::InterceptorBatchMethodsImpl.
1.8.13