You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fachhoch <fa...@gmail.com> on 2015/02/23 23:14:47 UTC
wicket atmosphere broadcast to all except for orign page
I am trying to use wicket atmosphere, I want to broadcast msg for all the
resources except for the one which broadcasted the msg, please advice
how to exclude a resource .
In a page on click of a link I call Event.get().post and this same page
has a public method with @org.apache.wicket.atmosphere.Subscribe
annotation ,this method gets called when msg is broadcasted. I want to
broadcast msg to all other sessions except for current session which
broadcasted , please advice.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-broadcast-to-all-except-for-orign-page-tp4669723.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: wicket atmosphere broadcast to all except for orign page
Posted by Emond Papegaaij <em...@topicus.nl>.
The @Subscribe annotation has 2 filter options. In this case, I would go for
the first: 'filter()'. The Predicate type you need to specify gets an
AtmosphereEvent, where the payload is set to the object you are broadcasted.
If you change this object to a little more than just a message, you can add
the UUID from AtmosphereBehavior.getUUID(page) to this event. In the Predicate
you can now check this UUID agains event.getResource().uuid(). If these match,
you know the message is sent to the page that triggered the event and needs to
be skipped (let the predicate return false).
Best regards,
Emond
On Monday 23 February 2015 14:14:47 fachhoch wrote:
> I am trying to use wicket atmosphere, I want to broadcast msg for all
> the resources except for the one which broadcasted the msg, please
> advice how to exclude a resource .
>
> In a page on click of a link I call Event.get().post and this same page
> has a public method with @org.apache.wicket.atmosphere.Subscribe
> annotation ,this method gets called when msg is broadcasted. I want to
> broadcast msg to all other sessions except for current session which
> broadcasted , please advice.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-broadcast-to-a
> ll-except-for-orign-page-tp4669723.html Sent from the Users forum mailing
> list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org