Reputation: 6285
According to the official doc, an async callback should have 2 interfaces, one of them could be generated from the other. Not mentioning, it is very hard to follow call hierarchy this way. Isn't there a DRY way to define such interfaces?
To add an AsyncCallback parameter to all of our service methods, you must define a new interface as follows:
- It must have the same name as the service interface, appended with Async (for example, StockPriceServiceAsync).
- It must be located in the same package as the service interface.
- Each method must have the same name and signature as in the service interface with an important difference: the method has no return type and the last parameter is an AsyncCallback object.
Upvotes: 0
Views: 83
Reputation: 3048
Well, after you have defined your sync interface (the one implemented by your RemoteServiceServlet
extension) you can generate the async interface using:
Upvotes: 4