Service interface
- Code: Select all
public interface TestService extends RemoteService {
/**
* Utility class for simplifying access to the instance of async service.
*/
public static class Util {
private static TestServiceAsync instance;
public static TestServiceAsync getInstance(){
if (instance == null) {
instance = (TestServiceAsync) GWT.create(TestService.class);
ServiceDefTarget target = (ServiceDefTarget) instance;
target.setServiceEntryPoint(GWT.getModuleBaseURL() + "TestService");
}
return instance;
}
}
public void testCall();
}
Designer generated the its Async interface as following:
- Code: Select all
public interface TestServiceAsync {
public void testCall(AsyncCallback<void> callback);
}
which causes a compiler error and need to be corrected with <Void> instead of <void>.