The difference is in the first parameter, the caller can limit the type that is returned to some extent, while for the second you only know that you will receive a ResponseCallBack , and you will have to do the translation if you want a subtype.
For example, from the first you can do:
Subtype temp = caller.<subtype> sendData(...); // Can also skip explicitly passing the type parameter too
instead
Subtype temp = (Subtype) caller.sendData(...);
Thus, I believe this is a way to provide type safety during a call, and also allows the caller to exclude casts from his code.
awksp
source share