You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Noven <no...@yahoo.com> on 2012/12/20 20:31:08 UTC
Example of wicket atmosphere with channel
Hi,
I just saw new features released at wicket 6.40. And I am interested to see example code of the atmosphere channel. Where can i find the example of this feature?
Thanks.
Re: Example of wicket atmosphere with channel
Posted by Noven <no...@yahoo.com>.
Emond,
Sorry for my late reply. Just come back from holiday. I saw at contextAwareFilter and find it useful. But I have not tried it yet in my project. Currently I still depend on wicketstuff-push instead wicket-atmosphere. I was thinking to move to wicket-atmosphere because it is more easy to implement and has less code than wicketstuff-push.
Regards,
Noven
________________________________
From: Emond Papegaaij <em...@gmail.com>
To: users@wicket.apache.org
Sent: Thursday, December 27, 2012 1:56 PM
Subject: Re: Example of wicket atmosphere with channel
I presume you are refering to WICKET-4879, There are no examples of the new
API yet, but the changes are not that big. I did not really implement
channels, but made the changes that would allow you to implement channels.
It is now possible to post an event to a single client (rather than all
clients), either via the AtmosphereResource for that client, or its UUID. I
also added a contextAwareFilter() to @Subscribe, which allows you to access
the RequestCycle and session from the filter. This can be used to
differentiate on the receiver of the event, where filter() can only be used
to differentiate on the content of the event. Be careful with this new
method though, because it will not scale very will with large numbers of
concurrent users.
Looking at the code again, I think I'm going to change the Predicate into a
Function on AtmosphereResource. That would allow you to keep track of some
attributes in AtmosphereRequest on which to write your filter, which puts a
lot less weight on the server than setting up a RequestCycle.
Best regards,
Emond Papegaaij
On Thu, Dec 20, 2012 at 8:31 PM, Noven <no...@yahoo.com> wrote:
> Hi,
>
> I just saw new features released at wicket 6.40. And I am interested to
> see example code of the atmosphere channel. Where can i find the example of
> this feature?
>
> Thanks.
>
>
Re: Example of wicket atmosphere with channel
Posted by Emond Papegaaij <em...@gmail.com>.
I presume you are refering to WICKET-4879, There are no examples of the new
API yet, but the changes are not that big. I did not really implement
channels, but made the changes that would allow you to implement channels.
It is now possible to post an event to a single client (rather than all
clients), either via the AtmosphereResource for that client, or its UUID. I
also added a contextAwareFilter() to @Subscribe, which allows you to access
the RequestCycle and session from the filter. This can be used to
differentiate on the receiver of the event, where filter() can only be used
to differentiate on the content of the event. Be careful with this new
method though, because it will not scale very will with large numbers of
concurrent users.
Looking at the code again, I think I'm going to change the Predicate into a
Function on AtmosphereResource. That would allow you to keep track of some
attributes in AtmosphereRequest on which to write your filter, which puts a
lot less weight on the server than setting up a RequestCycle.
Best regards,
Emond Papegaaij
On Thu, Dec 20, 2012 at 8:31 PM, Noven <no...@yahoo.com> wrote:
> Hi,
>
> I just saw new features released at wicket 6.40. And I am interested to
> see example code of the atmosphere channel. Where can i find the example of
> this feature?
>
> Thanks.
>
>
Re: Example of wicket atmosphere with channel
Posted by Noven <no...@yahoo.com>.
I opened the link but unfortunately I couldn't view the source. It appears as internal error.
Thank you for the link, I will download the example and run in my local instead.
Regards,
Noven
________________________________
From: Arun Chauhan <ar...@gmail.com>
To: users@wicket.apache.org
Sent: Monday, December 24, 2012 5:06 PM
Subject: Re: Example of wicket atmosphere with channel
Have you tried looking at the Wicket framework's examples?
http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-wicket-atmosphere-with-channel-tp4654979p4655038.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: Example of wicket atmosphere with channel
Posted by Arun Chauhan <ar...@gmail.com>.
Have you tried looking at the Wicket framework's examples?
http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-wicket-atmosphere-with-channel-tp4654979p4655038.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