Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of wicket atmosphere with channel

Tags:

java

wicket

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.

like image 621
code_fish Avatar asked Dec 21 '12 05:12

code_fish


2 Answers

Here's a quickstart application of integrating Wicket and Atmosphere.

https://github.com/papegaaij/wicket-atmosphere-quickstart

  • atmosphere.xml can be found under src/main/webapp/META-INF/
  • web.xml under src/main/webapp/WEB-INF/
like image 179
RJo Avatar answered Nov 14 '22 20:11

RJo


Here is a minimal example: http://examples7x.wicket.apache.org/atmosphere/?0

It is similar to RJo's link. In addition:

  • There is an online demo.
  • Custom objects are pushed to the EventBus, so You'll see that everything might be transfered as long as it is Serializable.

Summary:

  • An EventBus instance is initialized in AtmosphereApplication.java.
  • This EventBus is used in HomePage.java to push messages.
  • @Subscribe annotations in HomePage.java are used to receive messages.
like image 38
Christian Strempfer Avatar answered Nov 14 '22 21:11

Christian Strempfer