Instance Methods | Class Methods | List of all members
GRPCInterceptorManager Class Reference

#import <GRPCInterceptor.h>

Inheritance diagram for GRPCInterceptorManager:
Inheritance graph
[legend]

Instance Methods

(void) - cancelNextInterceptor
 
(void) - finishNextInterceptor
 
(void) - forwardPreviousInterceptorCloseWithTrailingMetadata:error:
 
(void) - forwardPreviousInterceptorDidWriteData
 
(void) - forwardPreviousInterceptorWithData:
 
(void) - forwardPreviousInterceptorWithInitialMetadata:
 
(nullable instancetype) - initWithFactories:previousInterceptor:transportID:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - receiveNextInterceptorMessages:
 
(void) - shutDown
 
(void) - startNextInterceptorWithRequest:callOptions:
 
(void) - writeNextInterceptorWithData:
 
- Instance Methods inherited from <GRPCInterceptorInterface>
(void) - cancel
 
(void) - finish
 
(void) - receiveNextMessages:
 
(void) - startWithRequestOptions:callOptions:
 
(void) - writeData:
 
- Instance Methods inherited from <GRPCResponseHandler>
(void) - didCloseWithTrailingMetadata:error:
 
(void) - didReceiveData:
 
(void) - didReceiveInitialMetadata:
 
(void) - didReceiveRawMessage:
 
(void) - didWriteData
 

Class Methods

(instancetype) + NS_UNAVAILABLE
 

Additional Inherited Members

- Properties inherited from <GRPCDispatchable>
dispatch_queue_t dispatchQueue
 

Detailed Description

GRPCInterceptorManager is a helper class to forward messages between the interceptors. The interceptor manager object retains reference to the next and previous interceptor object in the interceptor chain, and forward corresponding events to them.

All methods except the initializer of the class can only be called on the manager's dispatch queue. Since the manager's dispatch queue targets corresponding interceptor's dispatch queue, it is also safe to call the manager's methods in the corresponding interceptor instance's methods that implement GRPCInterceptorInterface.

When an interceptor is shutting down, it must invoke -shutDown method of its corresponding manager so that references to other interceptors can be released and proper clean-up is made.

Definition at line 187 of file GRPCInterceptor.h.

Method Documentation

◆ cancelNextInterceptor

- (void) cancelNextInterceptor

Notify the next interceptor in the chain to cancel the call

◆ finishNextInterceptor

- (void) finishNextInterceptor

Notify the next interceptor in the chain to finish the call

◆ forwardPreviousInterceptorCloseWithTrailingMetadata:error:

- (void) forwardPreviousInterceptorCloseWithTrailingMetadata: (nullable NSDictionary *)  trailingMetadata
error: (nullable NSError *)  error 

Forward call close and trailing metadata to the previous interceptor in the chain

◆ forwardPreviousInterceptorDidWriteData

- (void) forwardPreviousInterceptorDidWriteData

Forward write completion to the previous interceptor in the chain

◆ forwardPreviousInterceptorWithData:

- (void) forwardPreviousInterceptorWithData: (nullable id data

Forward a received message to the previous interceptor in the chain

◆ forwardPreviousInterceptorWithInitialMetadata:

- (void) forwardPreviousInterceptorWithInitialMetadata: (nullable NSDictionary *)  initialMetadata

Forward initial metadata to the previous interceptor in the chain

◆ initWithFactories:previousInterceptor:transportID:

- (nullable instancetype) initWithFactories: (nullable NSArray< id< GRPCInterceptorFactory >> *)  factories
previousInterceptor: (nullable id< GRPCResponseHandler >)  previousInterceptor
transportID: (GRPCTransportID transportID 

◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE

◆ receiveNextInterceptorMessages:

- (void) receiveNextInterceptorMessages: (NSUInteger)  numberOfMessages

Notify the next interceptor in the chain to receive more messages

◆ shutDown

- (void) shutDown

Notify the manager that the interceptor has shut down and the manager should release references to other interceptors and stop forwarding requests/responses.

◆ startNextInterceptorWithRequest:callOptions:

- (void) startNextInterceptorWithRequest: (GRPCRequestOptions *)  requestOptions
callOptions: (GRPCCallOptions *)  callOptions 

Notify the next interceptor in the chain to start the call and pass arguments

◆ writeNextInterceptorWithData:

- (void) writeNextInterceptorWithData: (id data

Pass a message to be sent to the next interceptor in the chain


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


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