Java pattern for nested callbacks?

后端 未结 4 680
滥情空心
滥情空心 2020-12-12 19:30

I\'m looking for a Java pattern for making a nested sequence of non-blocking method calls. In my case, some client code needs to asynchronously invoke a service to perform s

4条回答
  •  执笔经年
    2020-12-12 19:44

    I am not sure if I get you question correctly. If you want to invoke a service and on its completion result need to be passed to other object which can continue processing using result. You can look at using Composite and Observer to achive this.

提交回复
热议问题