Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 调用onMessage()时无法使用gwt通道api触发并捕获事件_Java_Google App Engine_Gwt_Channel Api - Fatal编程技术网

Java 调用onMessage()时无法使用gwt通道api触发并捕获事件

Java 调用onMessage()时无法使用gwt通道api触发并捕获事件,java,google-app-engine,gwt,channel-api,Java,Google App Engine,Gwt,Channel Api,我正在使用GWT+应用程序引擎通道api,我想在收到消息时触发一个事件。 我创建了一个接口DataUpdateHandler(扩展EventHandler)和一个类DataUpdateEvent(扩展GwtEvent),并在SimpleEventBus中使用addHandler(…)和fireEvent(…)方法注册处理程序,并在收到消息时处理事件。 问题是,尽管触发了事件,但事件没有到达其处理程序(Dispatch(event))上不会发生任何事情 如果我只是创建并使用一个简单的接口,并且只调

我正在使用GWT+应用程序引擎通道api,我想在收到消息时触发一个事件。 我创建了一个接口DataUpdateHandler(扩展EventHandler)和一个类DataUpdateEvent(扩展GwtEvent),并在SimpleEventBus中使用addHandler(…)和fireEvent(…)方法注册处理程序,并在收到消息时处理事件。 问题是,尽管触发了事件,但事件没有到达其处理程序(Dispatch(event))上不会发生任何事情

如果我只是创建并使用一个简单的接口,并且只调用它的方法,那么一切都正常(但是接下来我必须为每个想要处理onMessage(…)的类创建一个对象列表)。
我做错了什么?

接受就是你“做错了”如果你能至少告诉我一个原因会很有帮助:)事实上,我的意思是,为什么这与我原来的问题有关,但我会自己搜索最后一个问题的答案:)