Package com.wicketinaction

Source Code of com.wicketinaction.WicketApplication

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);
  }
}
TOP

Related Classes of com.wicketinaction.WicketApplication

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.