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 message
jspb.Message -
onReceiveMetadata(metadata)
-
Inbound metadata receiver.
Parameters:
Name Type Description metadata
Metadata -
onReceiveStatus(status)
-
Inbound status receiver.
Parameters:
Name Type Description status
grpc~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 context
object Carries objects needed for streaming operations.
message
jspb.Message The message received.