// // // Copyright 2015 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // #ifndef GRPCPP_SUPPORT_SERVER_INTERCEPTOR_H #define GRPCPP_SUPPORT_SERVER_INTERCEPTOR_H #include <atomic> #include <vector> #include <grpc/support/log.h> #include <grpcpp/impl/rpc_method.h> #include <grpcpp/support/interceptor.h> #include <grpcpp/support/string_ref.h> namespace grpc { class ServerContextBase; namespace internal { class InterceptorBatchMethodsImpl; } namespace experimental { class ServerRpcInfo; // A factory interface for creation of server interceptors. A vector of // factories can be provided to ServerBuilder which will be used to create a new // vector of server interceptors per RPC. Server interceptor authors should // create a subclass of ServerInterceptorFactorInterface which creates objects // of their interceptors. class ServerInterceptorFactoryInterface { … }; /// 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 class ServerRpcInfo { … }; } // namespace experimental } // namespace grpc #endif // GRPCPP_SUPPORT_SERVER_INTERCEPTOR_H