gwt-channel-api icon indicating copy to clipboard operation
gwt-channel-api copied to clipboard

send vs onMessage

Open diarybooker opened this issue 10 years ago • 0 comments

Your Server code uses "send" but your client code used "onMessage"

This also means there is a compiler error initially because it says you have not implemented "onMessage" in the server code

ChannelServer.java: protected static void send(String channel, Object o) { AutoBean bean = AutoBeanUtils.getAutoBean(o); String serialized = AutoBeanCodex.encode(bean).getPayload(); ChannelServiceFactory.getChannelService().sendMessage(new ChannelMessage(channel, serialized)); } Client: public void send(String message, AsyncCallback<Void> callback) { channelService.onMessage(token, channelName, message, callback); }

diarybooker avatar Jun 07 '15 18:06 diarybooker