Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CODEGEN_INTERCEPTOR_H
20 #define GRPCPP_IMPL_CODEGEN_INTERCEPTOR_H
32 class ChannelInterface;
35 namespace experimental {
114 virtual void Hijack() = 0;
160 virtual std::multimap<grpc::string, grpc::string>*
173 virtual std::multimap<grpc::string, grpc::string>*
186 virtual std::multimap<grpc::string_ref, grpc::string_ref>*
195 virtual std::multimap<grpc::string_ref, grpc::string_ref>*
229 #endif // GRPCPP_IMPL_CODEGEN_INTERCEPTOR_H
virtual Status * GetRecvStatus()=0
Returns a modifiable view of the received status on PRE_RECV_STATUS and POST_RECV_STATUS interception...
virtual void Intercept(InterceptorBatchMethods *methods)=0
The one public method of an Interceptor interface.
virtual bool QueryInterceptionHookPoint(InterceptionHookPoints type)=0
Determine whether the current batch has an interception hook point of type type.
virtual void FailHijackedRecvMessage()=0
On a hijacked RPC, an interceptor can decide to fail a PRE_RECV_MESSAGE op.
The first three in this list are for clients and servers.
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
The following two are for all clients and servers.
virtual void FailHijackedSendMessage()=0
On a hijacked RPC/ to-be hijacked RPC, this can be called to fail a SEND MESSAGE op.
virtual const void * GetSendMessage()=0
Returns a non-modifiable pointer to the non-serialized form of the message to be sent.
virtual std::multimap< grpc::string, grpc::string > * GetSendTrailingMetadata()=0
Returns a modifiable multimap of the trailing metadata to be sent.
virtual void Hijack()=0
Indicate that the interceptor has hijacked the RPC (only valid if the batch contains send_initial_met...
virtual void * GetRecvMessage()=0
Returns a pointer to the modifiable received message.
virtual std::multimap< grpc::string, grpc::string > * GetSendInitialMetadata()=0
Returns a modifiable multimap of the initial metadata to be sent.
virtual bool GetSendMessageStatus()=0
Checks whether the SEND MESSAGE op succeeded.
This is a special hook point available to both clients and servers when TryCancel() is performed.
virtual void ModifySendMessage(const void *message)=0
Overwrites the message to be sent with message.
Did it work? If it didn't, why?
Definition: status.h:31
virtual std::unique_ptr< ChannelInterface > GetInterceptedChannel()=0
Gets an intercepted channel.
virtual std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvTrailingMetadata()=0
Returns a modifiable multimap of the received trailing metadata on PRE_RECV_STATUS and POST_RECV_STAT...
virtual std::multimap< grpc::string_ref, grpc::string_ref > * GetRecvInitialMetadata()=0
Returns a modifiable multimap of the received initial metadata.
A sequence of bytes.
Definition: byte_buffer.h:67
virtual ~Interceptor()
Definition: interceptor.h:219
virtual ByteBuffer * GetSerializedSendMessage()=0
Send Message Methods GetSerializedSendMessage and GetSendMessage/ModifySendMessage are the available ...
virtual ~InterceptorBatchMethods()
Definition: interceptor.h:95
::google::protobuf::util::Status Status
Definition: config_protobuf.h:90
Interface for an interceptor.
Definition: interceptor.h:217
virtual Status GetSendStatus()=0
Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions.
virtual void ModifySendStatus(const Status &status)=0
Overwrites the status with status.
Class that is passed as an argument to the Intercept method of the application's Interceptor interfac...
Definition: interceptor.h:93
virtual void Proceed()=0
Signal that the interceptor is done intercepting the current batch of the RPC.
InterceptionHookPoints
An enumeration of different possible points at which the Intercept method of the Interceptor interfac...
Definition: interceptor.h:54
The following three are for hijacked clients only.