Package io.grpc.internal
Class MessageDeframer.SingleMessageProducer
- java.lang.Object
-
- io.grpc.internal.MessageDeframer.SingleMessageProducer
-
- All Implemented Interfaces:
StreamListener.MessageProducer
- Enclosing class:
- MessageDeframer
private static class MessageDeframer.SingleMessageProducer extends java.lang.Object implements StreamListener.MessageProducer
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.InputStream
message
-
Constructor Summary
Constructors Modifier Constructor Description private
SingleMessageProducer(java.io.InputStream message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
next()
Returns the next gRPC message, if the data has been received by the deframer and the application has requested another message.
-
-
-
Method Detail
-
next
@Nullable public java.io.InputStream next()
Description copied from interface:StreamListener.MessageProducer
Returns the next gRPC message, if the data has been received by the deframer and the application has requested another message.The provided
message
InputStream
must be closed by the listener.This is intended to be used similar to an iterator, invoking
next()
to obtain messages until the producer returns null, at which point the producer may be discarded.- Specified by:
next
in interfaceStreamListener.MessageProducer
-
-