package com.wicketinaction;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.WebApplication;
/**
* Application object for your web application. If you want to run this
* application without deploying, run the Start class.
*/
public class WicketApplication extends WebApplication
{
@Override
public Class<? extends WebPage> getHomePage()
{
return FeedPage.class;
}
/**
* @see org.apache.wicket.Application#init()
*/
@Override
public void init()
{
super.init();
mountPage("feed", FeedPage.class);
mountPage("add-content", AddContentPage.class);
ScheduledExecutorService executor = Executors.newScheduledThreadPool(2);
executor.scheduleAtFixedRate(new TimestamperTask(this), 0, 30, TimeUnit.SECONDS);
}
}