Package io.grpc.internal
Class MigratingThreadDeframer.DeframeMessageProducer
- java.lang.Object
-
- io.grpc.internal.MigratingThreadDeframer.DeframeMessageProducer
-
- All Implemented Interfaces:
StreamListener.MessageProducer,java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- MigratingThreadDeframer
class MigratingThreadDeframer.DeframeMessageProducer extends java.lang.Object implements StreamListener.MessageProducer, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description DeframeMessageProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.io.InputStreamnext()Returns the next gRPC message, if the data has been received by the deframer and the application has requested another message.
-
-
-
Method Detail
-
next
public java.io.InputStream next()
Description copied from interface:StreamListener.MessageProducerReturns the next gRPC message, if the data has been received by the deframer and the application has requested another message.The provided
messageInputStreammust 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:
nextin interfaceStreamListener.MessageProducer
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-