Skip to content

Wait until get all Blogs #5

@arturmkr

Description

@arturmkr

There is a method, which returns stream response of Blog:

 public java.util.Iterator<com.proto.blog.ListBlogResponse> listBlog(
        com.proto.blog.ListBlogRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getListBlogMethod(), getCallOptions(), request);
    }

To print each blog one be one:

        blogClient.listBlog(ListBlogRequest.newBuilder().build()).forEachRemaining(
                listBlogResponse -> System.out.println(listBlogResponse.getBlog().toString())
        );

But if it's needed on client to wait until getting all blogs and having it as com.proto.blog.ListBlogResponse, what's the best option to do?

@simplesteph , could you please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions