Package com.zb.mom.ww.mxgateway.client
Class DeployEventStream
java.lang.Object
com.zb.mom.ww.mxgateway.client.DeployEventStream
- All Implemented Interfaces:
AutoCloseable,Iterator<GalaxyRepositoryOuterClass.DeployEvent>
public final class DeployEventStream
extends Object
implements Iterator<GalaxyRepositoryOuterClass.DeployEvent>, AutoCloseable
Iterator-style adaptor over the
WatchDeployEvents server-streaming
RPC. Mirrors MxEventStream: events arrive on a background gRPC thread
and are buffered in a bounded blocking queue; the iterator drains them.
Closing the stream cancels the underlying gRPC call.-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<GalaxyRepositoryOuterClass.DeployEvent>
-
next
- Specified by:
nextin interfaceIterator<GalaxyRepositoryOuterClass.DeployEvent>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-