我的 GWT 应用程序是用 IDEA 编写的。为了进行 gwt RPC 调用,我创建了两个接口。第一个:
RemoteServiceRelativePath("ServerManagement")
public interface ServerManagement extends RemoteService {
String userLogin(String customerId, String login, String password) throws Exception;
ArrayList<PropertyItem> getProperties(String customerId) throws Exception;
void receive(String customerId) throws Exception;
第二个异步:
public interface ServerManagementAsync {
void userLogin(String customerId, String login, String password, AsyncCallback<String> asyncCallback);
void getProperties(String customerId, AsyncCallback<ArrayList<PropertyItem>> asyncCallback);
void receive(String customerId, AsyncCallback<String> asyncCallback);
}
但是在两个接口中,带有“receive”方法的行取消了红色,并且 ide 返回了消息:
Methods of asynchronous remote service 'ServerManagementAsync' are not consistent with 'ServerManagement' less... (Ctrl+F1)
This inspection reports any inconsistency between a methods of synchronous and asynchronous interfaces of remote service
如何解决这个问题?