java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
除非完成所有块,否则不会调用events()方法。
但是,大块的流预计将被大块交付,这似乎不会发生。
我已尝试使用和不使用@Streaming注释API,但行为是相同的。
我曾使用Android Retrofit 2 + RxJava: listen to endless stream作为参与我的实现
答案 0 :(得分:5)
好的家伙我找到了答案。这是因为我使用Body属性
进行记录logging.setLevel(HttpLoggingInterceptor.Level.BODY);
因此,由于记录器正在等待整个身体打印它,它的行为与问题中提到的方式相同。