getMessage() doesn't return message

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

getMessage() doesn't return message

hokada
AtmosphereEvent.getMessage() doesn't return a message(returns null) in onMessage using atmosphere-portable-runtime-0.2-SNAPSHOT.jar. But I tried to do using the following attached file, it does work.

http://n2.nabble.com/AtmosphereEvents-are-not-getting-removed-even-after-connections-are-closed---Tomcat-tc2868873.html

This is the code:
public AtmosphereEvent<HttpServletRequest, HttpServletResponse> onEvent(AtmosphereEvent<HttpServletRequest, HttpServletResponse> event) throws IOException {
  ...
  event.getBroadcaster().broadcast("ABCD");
  ...
}

public AtmosphereEvent<HttpServletRequest, HttpServletResponse> onMessage(AtmosphereEvent<HttpServletRequest, HttpServletResponse> event) throws IOException {
        if (event.isCancelled()) {
                log.info("Cancelled");
        } else if (event.isResuming() || event.isResumedOnTimeout()) {
                log.info("Resumed");
        } else {
                log.info("## Broadcasted Message ## " + event.getMessage());
                         .....
        }
        return event;
}

--
AtmosphereEvent.getMessage() seems to return null. Are there any issues in my code?

Thank you in advance,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getMessage() doesn't return message

Jeanfrancois Arcand
Salut,

sorry for the delay. It seems the upload of the SNAPSHOT failed for
several days, as this issue has been fixed (was there for 1 day). I'm
re-uploading the SNAPSHOT now.

Apology for the delay...JavaOne circus :-)

A+

-- Jeanfrancois

hokada wrote:

> AtmosphereEvent.getMessage() doesn't return a message(returns null) in
> onMessage using atmosphere-portable-runtime-0.2-SNAPSHOT.jar. But I tried to
> do using the following attached file, it does work.
>
> http://n2.nabble.com/AtmosphereEvents-are-not-getting-removed-even-after-connections-are-closed---Tomcat-tc2868873.html
>
> This is the code:
> public AtmosphereEvent<HttpServletRequest, HttpServletResponse>
> onEvent(AtmosphereEvent<HttpServletRequest, HttpServletResponse> event)
> throws IOException {
>   ...
>   event.getBroadcaster().broadcast("ABCD");
>   ...
> }
>
> public AtmosphereEvent<HttpServletRequest, HttpServletResponse>
> onMessage(AtmosphereEvent<HttpServletRequest, HttpServletResponse> event)
> throws IOException {
> if (event.isCancelled()) {
> log.info("Cancelled");
> } else if (event.isResuming() || event.isResumedOnTimeout()) {
> log.info("Resumed");
> } else {
> log.info("## Broadcasted Message ## " + event.getMessage());
>                          .....
> }
> return event;
> }
>
> --
> AtmosphereEvent.getMessage() seems to return null. Are there any issues in
> my code?
>
> Thank you in advance,
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: getMessage() doesn't return message

hokada
Thank you for fixing. It did work!!
Loading...