users@grizzly.java.net

info about comet and gwt

From: Stefano Ruffolo <smartsr_at_gmail.com>
Date: Thu, 26 Feb 2009 11:37:51 +0100

Hi,
I have tried the example that you given me (MyApplication.jar), and
it's ok!
I have just modified this example, I have inserted a Texarea with a
Button, so I want notify the message that I have written in the
TextArea (to All contact tha are connected).
I don't know how to do.




Client-side :

cometAsync.sendMessage(string,new AsyncCallback() {
         public void onFailure(Throwable caught) {

         }
         public void onSuccess(Object result) {

         }

}

Server-side:

On cometServiceImpl:

  public String sendMessage(String s) {

        return null;
     }


onEvent:
..
   CometServiceImpl.class.getMethod("sendMessage"),string);
                String encoded = RPC.encodeResponseForSuccess(
             writeResponse(request, response, encoded);
             removeThisFromContext();
....


Thanks