new InterceptingListener(next_listener [, delegate])
A chain-able listener object which will delegate to a custom listener when appropriate.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
next_listener |
InterceptingListener | null | The next InterceptingListener in the chain |
|
delegate |
grpc~Listener |
<optional> |
A custom listener object which may implement specific operations |
Methods
-
onReceiveMessage(message)
-
Inbound message receiver.
Parameters:
Name Type Description messagejspb.Message -
onReceiveMetadata(metadata)
-
Inbound metadata receiver.
Parameters:
Name Type Description metadataMetadata -
onReceiveStatus(status)
-
Inbound status receiver.
Parameters:
Name Type Description statusgrpc~StatusObject -
recvMessageWithContext(context, message)
-
When intercepting streaming message, we need to pass the streaming context transparently along the chain. Hides the context from the delegate listener methods.
Parameters:
Name Type Description contextobject Carries objects needed for streaming operations.
messagejspb.Message The message received.